mirror of
https://github.com/soconnor0919/hristudio.git
synced 2025-12-12 07:04:44 -05:00
feat: Introduce dedicated participant, experiment, and trial detail/edit pages, enable MinIO, and refactor dashboard navigation.
This commit is contained in:
@@ -438,6 +438,29 @@ export const participants = createTable(
|
||||
}),
|
||||
);
|
||||
|
||||
export const participantDocuments = createTable(
|
||||
"participant_document",
|
||||
{
|
||||
id: uuid("id").notNull().primaryKey().defaultRandom(),
|
||||
participantId: uuid("participant_id")
|
||||
.notNull()
|
||||
.references(() => participants.id, { onDelete: "cascade" }),
|
||||
name: varchar("name", { length: 255 }).notNull(),
|
||||
type: varchar("type", { length: 100 }), // MIME type or custom category
|
||||
storagePath: text("storage_path").notNull(),
|
||||
fileSize: integer("file_size"),
|
||||
uploadedBy: uuid("uploaded_by").references(() => users.id),
|
||||
createdAt: timestamp("created_at", { withTimezone: true })
|
||||
.default(sql`CURRENT_TIMESTAMP`)
|
||||
.notNull(),
|
||||
},
|
||||
(table) => ({
|
||||
participantDocIdx: index("participant_document_participant_idx").on(
|
||||
table.participantId,
|
||||
),
|
||||
}),
|
||||
);
|
||||
|
||||
export const trials = createTable("trial", {
|
||||
id: uuid("id").notNull().primaryKey().defaultRandom(),
|
||||
experimentId: uuid("experiment_id")
|
||||
|
||||
Reference in New Issue
Block a user