Timestamps and uuids everywhere
This commit is contained in:
@@ -2,14 +2,13 @@ from sqlalchemy import String, Column
|
||||
from sqlalchemy.dialects.postgresql import ARRAY
|
||||
from sqlalchemy.orm.attributes import flag_modified
|
||||
|
||||
from atst.models import Base
|
||||
from .types import Id
|
||||
from atst.models import Base, types, mixins
|
||||
|
||||
|
||||
class Role(Base):
|
||||
class Role(Base, mixins.TimestampsMixin):
|
||||
__tablename__ = "roles"
|
||||
|
||||
id = Id()
|
||||
id = types.Id()
|
||||
name = Column(String, index=True, unique=True)
|
||||
description = Column(String)
|
||||
permissions = Column(ARRAY(String), index=True, server_default="{}")
|
||||
|
||||
Reference in New Issue
Block a user