| 1 | import { createId } from '@paralleldrive/cuid2' |
| 2 | import { integer, pgTable |
| 3 | import { users } |
| 4 | |
| 5 | export const media = |
| 6 | id: text('id |
| 7 | .primaryKey() |
| 8 | .$defaultFn(() => |
| 9 | userId: text('user_id |
| 10 | .references(() => |
| 11 | .notNull(), |
| 12 | name: text('name |
| 13 | key: text('key |
| 14 | contentType: text('content_type |
| 15 | size: integer('size |
| 16 | createdAt: timestamp('created_at |
| 17 | }) |