task-k.1
This commit is contained in:
@@ -394,6 +394,28 @@ export const crmEnquiryAttachments = pgTable('crm_enquiry_attachments', {
|
||||
deletedAt: timestamp('deleted_at', { withTimezone: true })
|
||||
});
|
||||
|
||||
export const crmReportDefinitions = pgTable(
|
||||
'crm_report_definitions',
|
||||
{
|
||||
id: text('id').primaryKey(),
|
||||
organizationId: text('organization_id').notNull(),
|
||||
code: text('code').notNull(),
|
||||
name: text('name').notNull(),
|
||||
description: text('description'),
|
||||
category: text('category').notNull(),
|
||||
isSystem: boolean('is_system').default(true).notNull(),
|
||||
isActive: boolean('is_active').default(true).notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull()
|
||||
},
|
||||
(table) => ({
|
||||
organizationCodeIdx: uniqueIndex('crm_report_definitions_org_code_idx').on(
|
||||
table.organizationId,
|
||||
table.code
|
||||
)
|
||||
})
|
||||
);
|
||||
|
||||
export const crmQuotations = pgTable(
|
||||
'crm_quotations',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user