class bus_stop(db.Model): __tablename__ = 'bus_stop' id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) line = db.Column(db.String(30), nullable=False) name = db.Column(db.String(20), nullable=False) x = db.Column(db.DECIMAL(7, 4)) y = db.Column(db.DECIMAL(7, 4)) def __init__(self, id, line, name, x, y): self.id = id self.line = line self.name = name self.x = x self.y = y def __repr__(self): return 'id=%r, line=%r, name=%r, , x=%r, y=%r' % (self.id, self.line, self.name, self.x, self.y)
class coordinate(db.Model): __tablename__ = 'coordinate' name = db.Column(db.String(50), primary_key=True, nullable=False) x = db.Column(db.DECIMAL(7, 4)) y = db.Column(db.DECIMAL(7, 4)) def __init__(self, name, x, y): self.name = name self.x = x self.y = y def __repr__(self): return 'name=%r, x=%r, y=%r' % (self.name, self.x, self.y)
class medical_institution(db.Model): __tablename__ = 'medical_institution' id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) name = db.Column(db.String(40), unique=True) x = db.Column(db.DECIMAL(7, 4)) y = db.Column(db.DECIMAL(7, 4)) def __init__(self, id, name, x, y): self.id = id self.name = name self.x = x self.y = y def __repr__(self): return 'id=%r, name=%r, phone_number=%r, x=%r, y=%r' % (self.id, self.name, self.phone_number, self.x, self.y)
class building(db.Model): __tablename__ = 'building' id = db.Column(db.String(25), primary_key=True, nullable=False) name = db.Column(db.String(50)) address = db.Column(db.String(50)) land_area = db.Column(db.DECIMAL(5, 2)) floor_no = db.Column(db.String(10)) floor_total = db.Column(db.String(10)) type = db.Column(db.String(45)) total_area = db.Column(db.DECIMAL(5, 2)) room = db.Column(db.Integer) parlor = db.Column(db.Integer) bath = db.Column(db.Integer) total_price = db.Column(db.Integer) price_per = db.Column(db.Integer) parking_space_area = db.Column(db.DECIMAL(4, 2)) parking_space_price = db.Column(db.Integer) balcony_area = db.Column(db.DECIMAL(4, 2)) elevator = db.Column(db.String(3)) def __init__(self, id, name, address, land_area, floor_no, floor_total, type, total_area, room, parlor, bath, total_price, price_per, parking_space_area, parking_space_price, balcony_area, elevator): self.id = id self.name = name self.address = address self.land_area = land_area self.floor_no = floor_no self.floor_total = floor_total self.type = type self.total_area = total_area self.room = room self.parlor = parlor self.bath = bath self.total_price = total_price self.price_per = price_per self.parking_space_area = parking_space_area self.parking_space_price = parking_space_price self.balcony_area = balcony_area self.elevator = elevator def __repr__(self): return 'id=%r, name=%r, address=%r, land_area=%r, floor_no=%r, floor_total=%r, type=%r, total_area=%r, room=%r, parlor=%r, bath=%r, total_price=%r, price_per=%r, \ parking_space_area=%r, parking_space_price=%r, balcony_area=%r, elevator=%r' \ % (self.id, self.name, self.address, self.land_area, self.floor_no, self.floor_total, self.type, self.total_area, self.room, self.parlor, self.bath, self.total_price, self.price_per, self.parking_space_area, self.parking_space_price, self.balcony_area, self.elevator)
class school(db.Model): __tablename__ = 'school' id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) name = db.Column(db.String(45), unique=True, nullable=False) x = db.Column(db.DECIMAL(7, 4)) y = db.Column(db.DECIMAL(7, 4)) def __init__(self, name, id, x, y): self.id = id self.name = name self.x = x self.y = y def __repr__(self): return 'id=%r, name=%r, x=%r, y=%r' % (self.id, self.name, self.x, self.y)