Exemple #1
0
    class CompetitionCategory(Base):
        __tablename__ = "competition_category"

        category_id = Column(VARCHAR(36),
                             primary_key=True,
                             nullable=False,
                             default=func.uuid())
        name = Column(Text, nullable=False)

        def __repr__(self):
            return f"<Category ID: {self.category_id}>"
Exemple #2
0
    class CategoryParticipant(Base):
        __tablename__ = "category_participant"

        category_participant_id = Column(VARCHAR(36),
                                         primary_key=True,
                                         nullable=False,
                                         default=func.uuid())
        category_id = Column(VARCHAR(36), nullable=False)
        participant_id = Column(VARCHAR(36), nullable=False)

        def __repr__(self):
            return f"<Category Participant ID: {self.category_participant_id}>"
Exemple #3
0
    class CategoryJudge(Base):
        __tablename__ = "category_judge"

        category_judge_id = Column(VARCHAR(36),
                                   primary_key=True,
                                   nullable=False,
                                   default=func.uuid())
        category_id = Column(VARCHAR(36), nullable=False)
        judge_id = Column(VARCHAR(36), nullable=False)

        def __repr__(self):
            return f"<Category Judge ID: {self.category_judge_id}>"
Exemple #4
0
    class Loan(Base):
        __tablename__ = "loan"

        loan_id = Column(VARCHAR(36),
                         primary_key=True,
                         nullable=False,
                         default=func.uuid())
        tool_id = Column(VARCHAR(36), nullable=False)
        loan_to_group_id = Column(VARCHAR(36), nullable=False)
        loan_datetime = Column(DateTime, nullable=False)

        def __repr__(self):
            return f"<Loan ID: {self.loan_id}>"
Exemple #5
0
    class ConsumableGroup(Base):
        __tablename__ = "consumable_group"

        consumable_group_id = Column(VARCHAR(36),
                                     primary_key=True,
                                     nullable=False,
                                     default=func.uuid())
        group_id = Column(VARCHAR(36), nullable=False)
        consumable_id = Column(VARCHAR(36), nullable=False)
        qty = Column(INTEGER(11), nullable=False)

        def __repr__(self):
            return f"<Consumable Group ID: {self.consumable_group_id}>"
Exemple #6
0
    class Tool(Base):
        __tablename__ = "tool"

        tool_id = Column(VARCHAR(36),
                         primary_key=True,
                         nullable=False,
                         default=func.uuid())
        loaned = Column(TINYINT(4), nullable=False)
        name = Column(Text, nullable=False)
        description = Column(Text)
        latest_loan = Column(VARCHAR(36))

        def __repr__(self):
            return f"<Tool ID: {self.tool_id}>"
Exemple #7
0
    class Consumable(Base):
        __tablename__ = "consumable"

        consumable_id = Column(VARCHAR(36),
                               primary_key=True,
                               nullable=False,
                               default=func.uuid())
        name = Column(Text, nullable=False)
        description = Column(Text)
        stock_qty = Column(INTEGER(11), nullable=False)
        total_qty = Column(INTEGER(11), nullable=False)
        quota_per_group = Column(INTEGER(11), nullable=False)

        def __repr__(self):
            return f"<Consumable ID: {self.consumable_id}>"
Exemple #8
0
    class Group(Base):
        __tablename__ = "group"

        group_id = Column(VARCHAR(36),
                          primary_key=True,
                          nullable=False,
                          default=func.uuid())
        name = Column(Text, nullable=False)
        group_leader_id = Column(VARCHAR(36), nullable=False)
        space = Column(Text)
        submission_url = Column(VARCHAR(2083))
        hack_submitted = Column(TINYINT(4), nullable=False, default=0)
        utensils_returned = Column(TINYINT(4), nullable=False, default=0)

        def __repr__(self):
            return f"<Group ID: {self.group_id}>"
Exemple #9
0
    class Score(Base):
        __tablename__ = "score"

        score_id = Column(VARCHAR(36),
                          primary_key=True,
                          nullable=False,
                          default=func.uuid())
        category_id = Column(VARCHAR(36), nullable=False)
        judge_id = Column(VARCHAR(36), nullable=False)
        group_id = Column(VARCHAR(36), nullable=False)
        criteria_1_score = Column(INTEGER(11), nullable=False)
        criteria_2_score = Column(INTEGER(11), nullable=False)
        criteria_3_score = Column(INTEGER(11), nullable=False)
        criteria_4_score = Column(INTEGER(11), nullable=False)
        remarks_text = Column(Text)
        notes_filepath = Column(Text)

        def __repr__(self):
            return f"<Score ID: {self.score_id}>"
Exemple #10
0
    class ParticipantOrganisation(Base):
        __tablename__ = "participant_organisation"

        organisation_id = Column(VARCHAR(36),
                                 primary_key=True,
                                 nullable=False,
                                 default=func.uuid())
        organisation_name = Column(Text, nullable=False)
        participant_id = Column(VARCHAR(36), nullable=False)
        created_at = Column(DateTime(timezone=True),
                            nullable=False,
                            default=func.now())
        last_modified = Column(
            DateTime(timezone=True),
            nullable=False,
            default=func.now(),
            onupdate=func.now(),
        )

        def __repr__(self):
            return f"<Organisation ID: {self.organisation_id}>"
Exemple #11
0
    class ParticipantNextOfKin(Base):
        __tablename__ = "participant_next_of_kin"

        NoK_id = Column(VARCHAR(36),
                        primary_key=True,
                        nullable=False,
                        default=func.uuid())
        NoK_name = Column(Text, nullable=False)
        NoK_contact_number = Column(Text, nullable=False)
        NoK_relationship = Column(Text, nullable=False)
        participant_id = Column(VARCHAR(36), nullable=False)
        created_at = Column(DateTime(timezone=True),
                            nullable=False,
                            default=func.now())
        last_modified = Column(
            DateTime(timezone=True),
            nullable=False,
            default=func.now(),
            onupdate=func.now(),
        )

        def __repr__(self):
            return f"<Participant Next Of Kin ID: {self.NoK_id}>"
Exemple #12
0
    class Participant(Base):
        __tablename__ = "participant"

        participant_id = Column(VARCHAR(36),
                                primary_key=True,
                                nullable=False,
                                default=func.uuid())
        name = Column(Text, nullable=False)
        contact_number = Column(Text, nullable=False)
        email = Column(Text, nullable=False)
        group_id = Column(VARCHAR(36))
        registered = Column(TINYINT(4), nullable=False)
        DoB = Column(DateTime, nullable=False)
        gender = Column(Text, nullable=False)
        nationality = Column(Text, nullable=False)
        organisation_id = Column(VARCHAR(36), nullable=False)
        designation = Column(Text, nullable=False)
        dietary_pref = Column(Text, nullable=False)
        NoK_id = Column(VARCHAR(36), nullable=False)
        shirt_size = Column(Text, nullable=False)
        previous_hackathons_attended = Column(Text, nullable=False)
        bringing_utensils = Column(Text, nullable=False)
        team_allocation_preference = Column(Text, nullable=False)
        utensil_color = Column(Text)
        created_at = Column(DateTime(timezone=True),
                            nullable=False,
                            default=func.now())
        last_modified = Column(
            DateTime(timezone=True),
            nullable=False,
            default=func.now(),
            onupdate=func.now(),
        )

        def __repr__(self):
            return f"<Participant ID: {self.participant_id}>"