feat(recordings): add phase6 recording finalization pipeline and simulator support
This commit is contained in:
@@ -77,6 +77,24 @@ export const streamSessions = pgTable('stream_sessions', {
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
});
|
||||
|
||||
export const recordings = pgTable('recordings', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
ownerUserId: uuid('owner_user_id').notNull().references(() => users.id),
|
||||
streamSessionId: uuid('stream_session_id').notNull().references(() => streamSessions.id),
|
||||
cameraDeviceId: uuid('camera_device_id').notNull().references(() => devices.id),
|
||||
requesterDeviceId: uuid('requester_device_id').notNull().references(() => devices.id),
|
||||
eventId: uuid('event_id').references(() => events.id),
|
||||
objectKey: varchar('object_key', { length: 1024 }),
|
||||
bucket: varchar('bucket', { length: 255 }),
|
||||
durationSeconds: integer('duration_seconds'),
|
||||
sizeBytes: integer('size_bytes'),
|
||||
status: varchar('status', { length: 32 }).default('awaiting_upload').notNull(),
|
||||
availableAt: timestamp('available_at', { withTimezone: true }),
|
||||
error: text('error'),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
});
|
||||
|
||||
export const events = pgTable('events', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
userId: uuid('user_id').notNull().references(() => users.id),
|
||||
@@ -159,6 +177,7 @@ export const schema = {
|
||||
deviceLinks,
|
||||
deviceCommands,
|
||||
streamSessions,
|
||||
recordings,
|
||||
events,
|
||||
videos,
|
||||
notifications,
|
||||
|
||||
Reference in New Issue
Block a user