class Main(Base):
__tablename__ = 'data_main'
id = Column(BigInteger, primary_key=True)
position = Column(String(250))
surname = Column(String(30))
name = Column(String(30))
second_name = Column(String(30))
birthday = Column(DateTime(), nullable=True)
class Mainemail(Base):
__tablename__ = 'data_mainemail'
id = Column(BigInteger, primary_key=True)
email = Column(String(254))
main_id = Column(Integer(), ForeignKey('data_main.id'))
class Mainphone(Base):
__tablename__ = 'data_mainphone'
id = Column(BigInteger, primary_key=True)
phone = Column(String(254))
main_id = Column(Integer(), ForeignKey('data_main.id'))