added overall rating
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { sqliteTable, integer, text, blob, real, uniqueIndex } from 'drizzle-orm/sqlite-core';
|
||||
import { sqliteTable, integer, text, blob, real } from 'drizzle-orm/sqlite-core';
|
||||
import { isNull } from 'drizzle-orm';
|
||||
|
||||
export const user = sqliteTable('user', {
|
||||
@@ -77,3 +77,17 @@ export const participantProgress = sqliteTable('participant_progress', {
|
||||
maxReachedTime: real('max_reached_time').default(0),
|
||||
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull()
|
||||
});
|
||||
|
||||
export const overallRating = sqliteTable('overall_rating', {
|
||||
id: text('id').primaryKey(),
|
||||
participantId: text('participant_id')
|
||||
.notNull()
|
||||
.references(() => participant.id),
|
||||
audioFileId: text('audio_file_id')
|
||||
.notNull()
|
||||
.references(() => audioFile.id),
|
||||
value: real('value').notNull(), // 0-100 rating value
|
||||
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),
|
||||
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull(),
|
||||
deletedAt: integer('deleted_at', { mode: 'timestamp' }) // Soft delete for potential redos
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user