Ejemplo n.º 1
0
class Messages(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    pooper_name = db.Column(db.String(600), nullable=False)
    poop_date = db.Column(db.String(600), nullable=False)
    poop_message = db.Column(db.String(600), nullable=False)
    poop_rating = db.Column(db.String(100))
    poop_likes = db.Column(db.Integer)
Ejemplo n.º 2
0
class Event(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    event_name = db.Column(db.String(500), nullable=False)
    details = db.Column(db.String(2000))
    start_time = db.Column(db.DateTime)
    end_time = db.Column(db.DateTime)
    owner_id = db.Column(db.Integer, db.ForeignKey("user.id"))
Ejemplo n.º 3
0
class Notifications_v2(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(600), nullable=False)
    email = db.Column(db.String(600), nullable=False)
    subscribed_to = db.Column(db.Integer,
                              db.ForeignKey('users_v2.id'),
                              nullable=False)
Ejemplo n.º 4
0
class Folders(db.Model):
    __tablename__ = 'folders'
    id = db.Column(db.Integer, primary_key=True)
    share_enabled = db.Column('share_enabled', db.Boolean(), nullable=False, server_default='1')

    folder_path = db.Column(db.String(100, collation='NOCASE'), nullable=False, unique=True)

    time_period = db.Column(db.String(100, collation='NOCASE'), nullable=False, server_default='NONE')
Ejemplo n.º 5
0
class Comments(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    comment = db.Column(db.String(600), nullable=False)
    commenter_name = db.Column(db.String(600), nullable=False)
    comment_time = db.Column(db.String(600), nullable=False)
    comment_likes = db.Column(db.Integer)
    comment_message = db.Column(db.Integer,
                                db.ForeignKey('messages.id'),
                                nullable=False)
Ejemplo n.º 6
0
class Users_v2(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(500))
    pw_hash = db.Column(db.String(500))
    profile_image = db.Column(db.String(120))
    profile_bio = db.Column(db.String(1000))
    phone_number = db.Column(db.String(120))

    def __init__(self, username, password):
        self.username = username
        self.pw_hash = make_pw_hash(password)
Ejemplo n.º 7
0
class User(db.Model):
    __tablename__ = 'users'
    id = db.Column(db.Integer, primary_key=True)
    verified = db.Column(db.Boolean(), nullable=False, server_default='0')
    banned = db.Column('is_banned', db.Boolean(), nullable=False, server_default='0')

    # User authentication information. The collation='NOCASE' is required
    # to search case insensitively when USER_IFIND_MODE is 'nocase_collation'.

    email = db.Column(db.String(100, collation='NOCASE'), nullable=False, unique=True)
    password = db.Column(db.String(255), nullable=False, server_default='')

    user_name = db.Column(db.String(100, collation='NOCASE'), nullable=False, server_default='')
Ejemplo n.º 8
0
class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(500), unique=True)
    password = db.Column(db.String(500))
Ejemplo n.º 9
0
class Groups(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    group_name = db.Column(db.String(500))
    group_emails = db.Column(db.String(500))
    owner_id = db.Column(db.Integer, db.ForeignKey("user.id"))
Ejemplo n.º 10
0
class Invites(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    invitee_email = db.Column(db.String(500))
    accepted = db.Column(db.Boolean, default=False)
    event_id = db.Column(db.Integer, db.ForeignKey("event.id"))