covot/database/models.py

24 lines
831 B
Python
Raw Normal View History

2020-11-17 14:16:44 +01:00
from sqlalchemy import Column
2020-11-25 11:05:24 +01:00
from sqlalchemy.types import Date, Integer, String, Text
2020-11-17 14:16:44 +01:00
from database import Base
2020-11-25 18:21:22 +01:00
class User(Base):
__tablename__ = "user"
2020-11-17 14:16:44 +01:00
id = Column(Integer, primary_key=True, autoincrement=True)
primer_apellido = Column(String, nullable=False)
segundo_apellido = Column(String, nullable=False)
nombre = Column(String, nullable=False)
tipo_de_documento = Column(String, nullable=False)
numero_de_documento = Column(String, nullable=False, unique=True)
centro_academico = Column(String, nullable=False)
correo_institucional = Column(String, nullable=False, unique=True)
2020-11-25 11:05:24 +01:00
tipo_alojamiento = Column(String)
tipo_caso = Column(String)
comienzo_aislamiento = Column(Date)
fin_aislamiento = Column(Date)
observaciones = Column(Text)
codigo = Column(String)