예제 #1
0
class pushpin(db.Model):
    pushPinID = db.Column(db.Integer, primary_key=True)
    corkBoardID = db.Column(db.Integer,
                            db.ForeignKey('corkboard.corkBoardID'),
                            nullable=False)
    image_URL = db.Column(db.String(250), nullable=False)
    description = db.Column(db.String(200), nullable=False)
    pinned_time = db.Column(db.DateTime, nullable=True)
예제 #2
0
class likes(db.Model):
    LikesID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250),
                      db.ForeignKey('user.email'),
                      nullable=False)
    pushPinID = db.Column(db.Integer,
                          db.ForeignKey('pushpin.pushPinID'),
                          nullable=False)
예제 #3
0
class comment(db.Model):
    commentID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250),
                      db.ForeignKey('user.email'),
                      nullable=False)
    content = db.Column(db.String(250), nullable=True)
    pushPinID = db.Column(db.Integer,
                          db.ForeignKey('pushpin.pushPinID'),
                          nullable=False)
    added_time = db.Column(db.DateTime, nullable=True)
예제 #4
0
class corkboard(db.Model):
    corkBoardID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250),
                      db.ForeignKey('user.email'),
                      nullable=False)
    cat_name = db.Column(db.String(250),
                         db.ForeignKey('category.cat_name'),
                         nullable=False)
    title = db.Column(db.String(250), nullable=False)
    last_update = db.Column(db.DateTime, nullable=True)
예제 #5
0
class user(db.Model, UserMixin):
    def get_id(self):
        return (self.userID)

    userID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250), unique=True, nullable=False)
    pin = db.Column(db.String(4), nullable=False)
    name = db.Column(db.String(100), nullable=False)

    def __repr__(self):
        return f"User('{self.name}', '{self.email}')"
예제 #6
0
class watch(db.Model):
    WatchID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250), nullable=False)
    corkBoardID = db.Column(db.Integer,
                            db.ForeignKey('corkboard.corkBoardID'),
                            nullable=False)
예제 #7
0
class follow(db.Model):
    followID = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(250), nullable=False)
    owner_email = db.Column(db.String(250), nullable=False)
예제 #8
0
class tag(db.Model):
    tagID = db.Column(db.Integer, primary_key=True)
    pushPinID = db.Column(db.Integer,
                          db.ForeignKey('pushpin.pushPinID'),
                          nullable=False)
    tag = db.Column(db.String(20), nullable=False)
예제 #9
0
class privatecorkboard(db.Model):
    corkBoardID = db.Column(db.Integer,
                            db.ForeignKey('corkboard.corkBoardID'),
                            primary_key=True)
    password = db.Column(db.String(250), nullable=False)
    last_update = db.Column(db.DateTime, nullable=True)
예제 #10
0
class category(db.Model):
    categoryID = db.Column(db.Integer, primary_key=True)
    cat_name = db.Column(db.String(250), unique=True, nullable=False)