예제 #1
0
class Animal(db_context.Model):

    __tablename__ = "ANIMALES"

    identificacion_animal = db_context.Column(db_context.Integer,
                                              primary_key=True)
    id_raza = db_context.Column(db_context.Integer,
                                db_context.ForeignKey(RaceAnimal.id_raza),
                                nullable=False)
    fecha_nacimiento = db_context.Column(db_context.Date, nullable=False)
    id_madre = db_context.Column(db_context.Integer, nullable=True)
    id_padre = db_context.Column(db_context.Integer, nullable=True)
    procedencia = db_context.Column(db_context.String(100), nullable=False)
    raza = db_context.relationship(RaceAnimal,
                                   backref="ANIMALES",
                                   uselist=False)
예제 #2
0
class User(db_context.Model):


    __tablename__ = "Usuario"

    identificacion = db_context.Column(db_context.Integer, primary_key=True)
    nombre = db_context.Column(db_context.String(100), nullable=False)
    apellido1 = db_context.Column(db_context.String(100), nullable=False)
    apellido2 = db_context.Column(db_context.String(100), nullable=True)
    correo = db_context.Column(db_context.String(200), nullable=False)
    telefono = db_context.Column(db_context.String(20), nullable=True)
    contrasena = db_context.Column(db_context.String(20), nullable=True)
    id_perfil = db_context.Column(db_context.Integer, nullable=False)

    def serialize(self):
        return {
            "identificacion": self.identificacion,
            "nombre": self.nombre,
            "apellido1": self.apellido1,
            "apellido2": self.apellido2,
            "correo": self.correo,
            "telefono": self.telefono,
            "id_perfil": self.id_perfil
        }
예제 #3
0
class TypesService(db_context.Model):

    __tablename__ = "TIPOS_SERVICIOS "

    id_tipo_servicio = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #4
0
class Profile(db_context.Model):

    __tablename__ = "Perfil"

    id_perfil = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #5
0
class CagesBirth(db_context.Model):

    __tablename__ = "JAULAS_PARTOS"

    id_jaula_parto = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #6
0
class AnimalVaccination(db_context.Model):

    __tablename__ = "VACUNAS_ANIMALES"

    identificacion_animal = db_context.Column(db_context.Integer,
                                              primary_key=True)
    id_vacuna = db_context.Column(db_context.Integer, primary_key=True)
    fecha_programada = db_context.Column(db_context.Date, primary_key=True)
    evento = db_context.Column(db_context.String(100), nullable=False)
    fecha_ejecucion = db_context.Column(db_context.Date, nullable=True)
    id_via_aplicacion = db_context.Column(db_context.Integer, nullable=False)
    dosis = db_context.Column(db_context.Integer, nullable=False)
    id_laboratorio = db_context.Column(db_context.Integer, nullable=False)
    reg_ica = db_context.Column(db_context.String(100), nullable=False)
    nro_lote = db_context.Column(db_context.String(100), nullable=False)
    tiempo_retiro = db_context.Column(db_context.String(100), nullable=True)
    observaciones = db_context.Column(db_context.String(200), nullable=True)
예제 #7
0
class RaceAnimal(db_context.Model):

    __tablename__ = "RAZAS"

    id_raza = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #8
0
class Vaccines(db_context.Model):

    __tablename__ = "VACUNAS"

    id_vacuna = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #9
0
class Cageslitters(db_context.Model):

    __tablename__ = "JAULAS_DESTETES"

    id_jaula_destete = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #10
0
class Laboratory(db_context.Model):

    __tablename__ = "LABORATORIOS"

    id_laboratorio = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)
예제 #11
0
class ViaApplication(db_context.Model):

    __tablename__ = "VIAS_APLICACION"

    id_via_aplicacion = db_context.Column(db_context.Integer, primary_key=True)
    descripcion = db_context.Column(db_context.String(100), nullable=False)