Add soft-delete (archive) for companies, admin-only
- Added deletedAt column to companies table for soft delete - System admins see a trash icon on each company card with confirmation modal - Archived companies are filtered from sidebar, dashboard, company list, and direct access - Audit log entry created on archive Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,7 @@ export const companies = pgTable('companies', {
|
||||
description: text('description'),
|
||||
totalBudget: numeric('total_budget', { precision: 15, scale: 2 }).notNull().default('0'),
|
||||
currency: text('currency').notNull().default('THB'),
|
||||
deletedAt: timestamp('deleted_at', { withTimezone: true }),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user