Example #1
0
class UserReferrals(db.Model):
    __tablename__ = "user_referrals"
    id = db.Column(db.GUID(), primary_key=True)
    referred_by = db.Column(db.GUID())
    referred_to = db.Column(db.GUID())
    is_active_on_platform = db.Column(db.Boolean, default=False)
    credits = db.Column(db.Integer, server_default="25")
    created_at = db.Column(db.DateTime)
    modified_on = db.Column(db.DateTime)
Example #2
0
class EmailReferrals(db.Model):
    __tablename__ = "email_referrals"
    id = db.Column(db.GUID(), primary_key=True)
    referred_by = db.Column(db.GUID())
    referred_user_email = db.Column(db.String())
    referred_user_firstname = db.Column(db.String())
    referred_user_lastname = db.Column(db.String())
    email_sent_timestamp = db.Column(db.DateTime)
    created_at = db.Column(db.DateTime)
    modified_on = db.Column(db.DateTime)
Example #3
0
class EmailSettings(db.Model):
        __tablename__ = 'email_settings'
        id = db.Column(db.GUID(), primary_key=True)
        first_name = db.Column(db.String(255))
        last_name = db.Column(db.String(255))
        user_id = db.Column(db.GUID(), db.ForeignKey('users.id'))
        email = db.Column(db.String(120), unique=True)
        unsubscribe = db.Column(db.Boolean, default=False)
        sent_email_templates = db.Column(postgresql.ARRAY(db.String(255)))
        created_at = db.Column(db.DateTime)
        modified_on = db.Column(db.DateTime)
Example #4
0
class Tag(db.Model):
    __tablename__ = 'tag'
    id = db.Column(db.GUID(), primary_key=True)
    name = db.Column(db.String(255), unique=True)
    description = db.Column(db.String(255))
    parent_tag_id = db.Column(db.GUID())
    s3_url = db.Column(db.String(255))
    accepted_question_credits = db.Column(db.Integer, server_default='10')
    category_unlock_credits = db.Column(db.Integer, server_default='-50')
    modified_on = db.Column(db.DateTime)
    created_at = db.Column(db.DateTime)
Example #5
0
class EducationDetails(db.Model):
    __tablename__ = "education_details"
    id = db.Column(db.GUID(), primary_key=True)
    user_id = db.Column(db.GUID(), db.ForeignKey("users.id"))
    percentage_of_10th = db.Column(db.Float())
    year_of_passing_10th = db.Column(db.Date)
    school_name_of_10th = db.Column(db.String())
    percentage_of_12th = db.Column(db.Float())
    year_of_passing_12th = db.Column(db.Date)
    school_name_of_12th = db.Column(db.String())
    percentage_of_graduation = db.Column(db.Float())
    completion_of_graduation = db.Column(db.Date)
    college_name = db.Column(db.String())
Example #6
0
class Domain(db.Model):
    __tablename__ = 'domain'
    id = db.Column(db.GUID(), primary_key=True)
    name = db.Column(db.String(255), unique=True)
    description = db.Column(db.String(255))
    modified_on = db.Column(db.DateTime)
    created_at = db.Column(db.DateTime)
Example #7
0
class Competition(db.Model):
    __tablename__ = 'competition'
    id = db.Column(db.GUID(), primary_key=True)
    name = db.Column(db.String(255))
    description = db.Column(db.String(1200))
    start_date = db.Column(db.DateTime)
    end_date = db.Column(db.DateTime)
    reg_start_date = db.Column(db.DateTime)
    category_list = db.Column(postgresql.ARRAY(db.GUID()))
    reg_end_date = db.Column(db.DateTime)
    image_url = db.Column(db.String(255))
    short_description = db.Column(db.String(300))
    rules = db.Column(db.String())
    rewards = db.Column(db.String())
    additional_notes = db.Column(db.String())
    created_at = db.Column(db.DateTime)
    modified_on = db.Column(db.DateTime)
    competition_starts_email_sent = db.Column(db.Boolean, default=False)
Example #8
0
class Users(db.Model):
    # Create migration with following query - alter table users alter column user_type TYPE  varchar(60);
    __tablename__ = "users"
    id = db.Column(db.GUID(), primary_key=True)
    first_name = db.Column(db.String(255))
    last_name = db.Column(db.String(255))
    gender = db.Column(db.String(255))
    country = db.Column(db.String(255))
    email = db.Column(db.String(120), unique=True)
    username = db.Column(db.String(120), unique=True)
    picture = db.Column(db.String(255))
    password = db.Column(db.String(256))
    dob = db.Column(db.DateTime)
    about = db.Column(db.String(255))
    modified_on = db.Column(db.DateTime)
    user_type = db.Column(db.String(60))
    created_at = db.Column(db.DateTime)
    one_time_hash = db.Column(db.String(256))
    is_active = db.Column(db.Boolean)
    credits = db.Column(db.Integer)
    referral_hash = db.Column(db.String(256))
    level = db.Column(db.Integer())
Example #9
0
class BotMetaDetails(db.Model):
        __tablename__ = 'bot_meta_details'
        id = db.Column(db.GUID(), primary_key=True)
        user_id = db.Column(db.GUID(), db.ForeignKey('users.id'))
        selected_categories = db.Column(postgresql.ARRAY(db.GUID()))
        accuracy = db.Column(db.Float())
Example #10
0
class UserForgotPasswordHash(db.Model):
    __tablename__ = "user_forgot_password_hash"
    id = db.Column(db.GUID(), primary_key=True)
    user = db.Column(db.GUID(), db.ForeignKey("users.id"))
    one_time_hash = db.Column(db.String(256))
    created_at = db.Column(db.DateTime)
Example #11
0
class UserFollowing(db.Model):
    __tablename__ = "user_following"
    id = db.Column(db.GUID(), db.ForeignKey("users.id"), primary_key=True)
    followed_users = db.Column(postgresql.ARRAY(db.String()))
    following_users = db.Column(postgresql.ARRAY(db.String()))
Example #12
0
class CompetitionRegistrations(db.Model):
    __tablename__ = 'competition_registrations'
    id = db.Column(db.GUID(), primary_key=True)
    user_id = db.Column(db.GUID(), db.ForeignKey('users.id'))
    competition_id = db.Column(db.GUID(), db.ForeignKey('competition.id'))
    created_at = db.Column(db.DateTime)
Example #13
0
class TagDomain(db.Model):
    __tablename__ = 'tag_domain'
    id = db.Column(db.GUID(), primary_key=True)
    domain_id = db.Column(db.GUID(), db.ForeignKey('domain.id'))
    tag_id = db.Column(db.GUID(), db.ForeignKey('tag.id'))