Feat: New project chat, uload refactor (postgress), hosting plans, uload landingpage

This commit is contained in:
Till-JS 2025-11-25 13:01:41 +01:00
parent 559eb08d8c
commit fcf3a344b1
123 changed files with 7106 additions and 3715 deletions

View file

@ -0,0 +1,24 @@
import { pgTable, uuid, text, timestamp, index } from 'drizzle-orm/pg-core';
import { users } from './users.js';
export const workspaces = pgTable(
'workspaces',
{
id: uuid('id').primaryKey().defaultRandom(),
name: text('name').notNull(),
slug: text('slug').unique().notNull(),
type: text('type', { enum: ['personal', 'team'] }).notNull(),
owner: uuid('owner')
.references(() => users.id)
.notNull(),
createdAt: timestamp('created_at').defaultNow().notNull(),
updatedAt: timestamp('updated_at').defaultNow().notNull(),
},
(table) => [
index('workspaces_slug_idx').on(table.slug),
index('workspaces_owner_idx').on(table.owner),
]
);
export type Workspace = typeof workspaces.$inferSelect;
export type NewWorkspace = typeof workspaces.$inferInsert;