Add isActive column to companies table and update service
This commit is contained in:
@@ -111,6 +111,7 @@ export const companies = pgTable('companies', {
|
||||
phone: text('phone'),
|
||||
email: text('email'),
|
||||
website: text('website'),
|
||||
isActive: boolean('is_active').default(true).notNull(), // či je firma aktívna
|
||||
createdBy: uuid('created_by').references(() => users.id, { onDelete: 'set null' }),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
@@ -130,6 +131,16 @@ export const projects = pgTable('projects', {
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
});
|
||||
|
||||
// Company reminders table - jednoduché pripomienky naviazané na firmu
|
||||
export const companyReminders = pgTable('company_remind', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
companyId: uuid('company_id').references(() => companies.id, { onDelete: 'cascade' }).notNull(),
|
||||
description: text('description').notNull(),
|
||||
isChecked: boolean('is_checked').default(false).notNull(),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
});
|
||||
|
||||
// Project Users - many-to-many medzi projects a users (tím projektu)
|
||||
export const projectUsers = pgTable('project_users', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
|
||||
Reference in New Issue
Block a user