class GenreEntity(GenreBaseEntity): """ genre entity class. """ _extend_existing = True name = CoreColumn('name', Unicode(50), unique=True, nullable=False) is_main = CoreColumn('is_main', Boolean, nullable=False, default=False)
class LanguageEntity(LanguageBaseEntity): """ language entity class. """ _extend_existing = True name = CoreColumn('name', Unicode(50), nullable=False, unique=True)
class ActorBaseEntity(CoreEntity): """ actor base entity class. """ _table = 'actor' person_id = CoreColumn('person_id', Integer, ForeignKey('person.id'), index=True, primary_key=True, autoincrement=False)
class GenreBaseEntity(CoreEntity): """ genre base entity class. """ _table = 'genre' id = CoreColumn('id', Integer, index=True, primary_key=True, autoincrement=True)
class PersonBaseEntity(CoreEntity): """ person base entity class. """ _table = 'person' id = CoreColumn('id', Integer, index=True, primary_key=True, autoincrement=True)
class LanguageBaseEntity(CoreEntity): """ language base entity class. """ _table = 'language' id = CoreColumn('id', Integer, index=True, primary_key=True, autoincrement=True)
class PersonEntity(PersonBaseEntity): """ person entity class. """ _extend_existing = True fullname = CoreColumn('fullname', Unicode(200), nullable=False) search_name = CoreColumn('search_name', Unicode(200), exposed=False, nullable=False, index=True) imdb_page = CoreColumn('imdb_page', Unicode(150), unique=True) identifier = CoreColumn('identifier', Unicode(150), exposed=False, unique=True, index=True) photo_name = CoreColumn('photo_name', Unicode(250), unique=True) add_date = CoreColumn('add_date', TIMESTAMP(timezone=True), nullable=False, default=datetime_services.now)