Exemple #1
0
class QuestionDislikes(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
    question_id = db.Column(db.Integer, db.ForeignKey('questions.id'))

    def __init__(self, user, question_id):
        self.user = user
        self.question_id = question_id
Exemple #2
0
class Education(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    school = db.Column(db.String(100), nullable=True)
    fromDate = db.Column(db.String(5), nullable=True)
    toDate = db.Column(db.Numeric(5, 0), nullable=True)
    description = db.Column(db.String(160), nullable=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
Exemple #3
0
class Questions(db.Model):
    # For flask-whooshalchemy, searchable through it's title and description
    __searchable__ = ['title', 'description']
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    title = db.Column(db.String(100), nullable=True)
    description = db.Column(db.String(500), nullable=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))

    likes = db.relationship('QuestionLikes', backref='question')
    dislikes = db.relationship('QuestionDislikes', backref='question')
    comments = db.relationship('QuestionComments', backref='question')
Exemple #4
0
class Experience(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    title = db.Column(db.String(60), nullable=True)
    job = db.Column(db.String(60), nullable=True)
    description = db.Column(db.String(160), nullable=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
Exemple #5
0
class Skill(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    skill = db.Column(db.String(60), nullable=True)
    skillExp = db.Column(db.String(60), nullable=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
Exemple #6
0
class Notifications(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    notif_desc = db.Column(db.String(120), nullable=True)
    post_id = db.Column(db.Numeric(10, 0), nullable=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
Exemple #7
0
class QuestionComments(db.Model):
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
    comment = db.Column(db.String(500), nullable=True)
    question_id = db.Column(db.Integer, db.ForeignKey('questions.id'))