task-d.6.2

This commit is contained in:
phaichayon
2026-07-01 13:57:16 +07:00
parent 0a144f0f9e
commit ed28ff6b50
71 changed files with 4137 additions and 51727 deletions

View File

@@ -497,10 +497,16 @@ export const crmOpportunities = pgTable(
estimatedValue: doublePrecision('estimated_value'),
chancePercent: integer('chance_percent'),
expectedCloseDate: timestamp('expected_close_date', { withTimezone: true }),
projectCloseDate: timestamp('project_close_date', { withTimezone: true }),
deliveryDate: timestamp('delivery_date', { withTimezone: true }),
competitor: text('competitor'),
source: text('source'),
notes: text('notes'),
isHotProject: boolean('is_hot_project').default(false).notNull(),
hotProjectAutoSuggested: boolean('hot_project_auto_suggested').default(false).notNull(),
hotProjectManuallyOverridden: boolean('hot_project_manually_overridden')
.default(false)
.notNull(),
isActive: boolean('is_active').default(true).notNull(),
pipelineStage: text('pipeline_stage').default('lead').notNull(),
closedAt: timestamp('closed_at', { withTimezone: true }),
@@ -637,7 +643,13 @@ export const crmQuotations = pgTable(
taxAmount: doublePrecision('tax_amount').default(0).notNull(),
totalAmount: doublePrecision('total_amount').default(0).notNull(),
chancePercent: integer('chance_percent'),
projectCloseDate: timestamp('project_close_date', { withTimezone: true }),
deliveryDate: timestamp('delivery_date', { withTimezone: true }),
isHotProject: boolean('is_hot_project').default(false).notNull(),
hotProjectAutoSuggested: boolean('hot_project_auto_suggested').default(false).notNull(),
hotProjectManuallyOverridden: boolean('hot_project_manually_overridden')
.default(false)
.notNull(),
competitor: text('competitor'),
salesmanId: text('salesman_id'),
isSent: boolean('is_sent').default(false).notNull(),