コード例 #1
0
class Task(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50), nullable=False)
    description = db.Column(db.String(1000), nullable=False)

    #assignee = db.Column(db.Srting(50))
    assignee = db.Column(db.Integer, db.ForeignKey('user.public_id'))
    progress = db.Column(db.String(50))

    creation_date = db.Column(db.DateTime, nullable=False)
    due_date = db.Column(db.String(10), nullable=False)
    creator = db.Column(db.Integer, db.ForeignKey('user.id'))
コード例 #2
0
class Message(db.Model):
    mid = db.Column(db.Integer, primary_key=True)
    #dt = db.Column(db.String(50),unique=True)
    sender = db.Column(db.Integer, db.ForeignKey('user.id'))
    time_sent = db.Column(db.DateTime, nullable=False)
    message = db.Column(db.String(80))
    reciever = db.Column(db.Integer, db.ForeignKey('user.id'))
コード例 #3
0
class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    public_id = db.Column(db.String(50), unique=True)
    name = db.Column(db.String(50))
    password = db.Column(db.String(80))
    admin = db.Column(db.Boolean)
コード例 #4
0
class Workspace(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50), nullable=False)
    creation_date = db.Column(db.DateTime, nullable=False)
    description = db.Column(db.String(1000), nullable=False)
    creator = db.Column(db.Integer, db.ForeignKey('user.id'))
コード例 #5
0
class Channel(db.Model):  #download sqliteman to view databases you create here
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50), nullable=False)
    creation_date = db.Column(db.DateTime, nullable=False)
    description = db.Column(db.String(1000), nullable=False)
    creator = db.Column(db.Integer, db.ForeignKey('user.id'))