示例#1
0
class BookedRoom(db.Model):
    __tablename__ = 'bookedroom'
    id = db.Column(db.Integer, primary_key=True)
    userId = db.Column(db.Integer, db.ForeignKey('user.id'))
    user = db.relationship('User', backref='bookedroom')

    roomId = db.Column(db.Integer, db.ForeignKey('meetingroom.id'))
    meetingRoom = db.relationship('MeetingRoom', backref='bookedroom')

    bookDate = db.Column(db.String(20), nullable=False)
    timeId = db.Column(db.Integer, nullable=False)
示例#2
0
class User(db.Model):
    __tablename__ = 'user'
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(50), nullable=False, unique=True)
    password = db.Column(db.String(50), nullable=False)
    email = db.Column(db.String(30))
    telephone = db.Column(db.String(20))
    menu = db.Column(db.String(20))

    departId = db.Column(db.Integer, db.ForeignKey('depart.id'))
    depart = db.relationship('Depart', backref='user')
示例#3
0
class RoomLevel(db.Model):
    __tablename__ = 'roomlevel'
    id = db.Column(db.Integer, primary_key=True)
    level = db.Column(db.String(10), nullable=False, unique=True)
示例#4
0
class Menus(db.Model):
    __tablename__ = 'menus'
    id = db.Column(db.Integer, primary_key=True)
    menuname = db.Column(db.String(50), nullable=False)
示例#5
0
class DateTime(db.Model):
    __tablename__ = 'datetime'
    id = db.Column(db.Integer, primary_key=True)
    PreviousId = db.Column(db.Integer, nullable=False)
    startTime = db.Column(db.String(20), nullable=False)
    endTime = db.Column(db.String(20), nullable=False)
示例#6
0
class MeetingRoom(db.Model):
    __tablename__ = 'meetingroom'
    id = db.Column(db.Integer, primary_key=True)
    roomname = db.Column(db.String(50), nullable=False)
    level = db.Column(db.Integer, nullable=False)
示例#7
0
class Depart(db.Model):
    __tablename__ = 'depart'
    id = db.Column(db.Integer, primary_key=True)
    departname = db.Column(db.String(50), nullable=False)