Skip to content

Commit

Permalink
moves some user data into registration data
Browse files Browse the repository at this point in the history
  • Loading branch information
xwilson03 committed Aug 3, 2024
1 parent 12691fa commit bdc6d33
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ export const userData = pgTable("user_data", {
hasSearchableProfile: boolean("has_searchable_profile")
.notNull()
.default(true),
group: integer("group").notNull(),
role: roles("role").notNull().default("hacker"),
checkinTimestamp: timestamp("checkin_timestamp"),
teamID: varchar("team_id", { length: 50 }),
points: integer("points").notNull().default(0),
checkedIn: boolean("checked_in").notNull().default(false),
rsvp: boolean("rsvp").notNull().default(false),
approved: boolean("approved").notNull().default(false),
Expand All @@ -104,10 +101,6 @@ export const userRelations = relations(userData, ({ one, many }) => ({
}),
files: many(files),
scans: many(scans),
team: one(teams, {
fields: [userData.teamID],
references: [teams.id],
}),
invites: many(invites),
tickets: many(ticketsToUsers),
chats: many(chatsToUsers),
Expand Down Expand Up @@ -137,8 +130,18 @@ export const registrationData = pgTable("registration_data", {
resume: varchar("resume", { length: 255 })
.notNull()
.default("https://static.acmutsa.org/No%20Resume%20Provided.pdf"),
group: integer("group").notNull(),
teamID: varchar("team_id", { length: 50 }),
points: integer("points").notNull().default(0),
});

export const registrationRelations = relations(registrationData, ({one}) => ({
team: one(teams, {
fields: [registrationData.teamID],
references: [teams.id],
}),
}));

export const events = pgTable("events", {
id: bigserial("id", { mode: "number" }).notNull().primaryKey().unique(),
title: varchar("name", { length: 255 }).notNull(),
Expand Down

0 comments on commit bdc6d33

Please sign in to comment.