class DogEmergency(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(32)) phone = db.Column(db.Integer()) city = db.Column(db.String(10)) customer_id = db.Column(db.Integer, db.ForeignKey('customer.id')) status = db.Column(db.Integer(), default=0) pet_name = db.Column(db.String(32)) pet_id = db.Column(db.Integer, db.ForeignKey('pet.id')) def __repr__(self): return '<name {}>, <phone {}>, <city {}>'.format( self.name, self.phone, self.city)
class Employee(db.Model): id = db.Column(db.Integer, primary_key=True) employee_number = db.Column(db.Integer(), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) password_hash = db.Column(db.String(128)) def __repr__(self): return '<User {}>'.format(self.username)
class HandleDetails(db.Model): id = db.Column(db.Integer, primary_key=True) appointment_id = db.Column(db.Integer, index=True) pet_type = db.Column(db.Integer, index=True) appointment_type = db.Column(db.Integer, index=True) employee_name = db.Column(db.String(64), index=True) date = db.Column(db.String(64), index=True) employee_id = db.Column(db.Integer, db.ForeignKey(Employee.id)) treatment_date = db.Column(db.String(32), default='Undetermined') finish_date = db.Column(db.String(32), default='Undetermined') leave_date = db.Column(db.String(32), default='Undetermined') name = db.Column(db.String(32)) phone = db.Column(db.Integer()) city = db.Column(db.String(10)) pet_name = db.Column(db.String(32)) pet_id = db.Column(db.Integer()) priority = db.Column(db.Integer, index=True)