task-d5.5.1

This commit is contained in:
phaichayon
2026-06-25 12:16:41 +07:00
parent f2c7156851
commit c2a74b6764
121 changed files with 3407 additions and 2679 deletions

View File

@@ -1,5 +1,5 @@
{
"id": "5b317a18-e2f9-48c7-a371-c6a972e13344",
"id": "e01a80c3-a4b5-4461-afb0-52b663dfa084",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
@@ -1551,8 +1551,203 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_enquiries": {
"name": "crm_enquiries",
"public.crm_leads": {
"name": "crm_leads",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"branch_id": {
"name": "branch_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"customer_id": {
"name": "customer_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"contact_id": {
"name": "contact_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"project_name": {
"name": "project_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"project_location": {
"name": "project_location",
"type": "text",
"primaryKey": false,
"notNull": false
},
"product_type": {
"name": "product_type",
"type": "text",
"primaryKey": false,
"notNull": false
},
"priority": {
"name": "priority",
"type": "text",
"primaryKey": false,
"notNull": false
},
"estimated_value": {
"name": "estimated_value",
"type": "double precision",
"primaryKey": false,
"notNull": false
},
"awareness_id": {
"name": "awareness_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'new_job'"
},
"followup_status": {
"name": "followup_status",
"type": "text",
"primaryKey": false,
"notNull": false
},
"lost_reason": {
"name": "lost_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"outcome": {
"name": "outcome",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'open'"
},
"owner_marketing_user_id": {
"name": "owner_marketing_user_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assigned_sales_owner_id": {
"name": "assigned_sales_owner_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assigned_at": {
"name": "assigned_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"assigned_by": {
"name": "assigned_by",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assignment_remark": {
"name": "assignment_remark",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"crm_leads_org_code_idx": {
"name": "crm_leads_org_code_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "code",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_opportunities": {
"name": "crm_opportunities",
"schema": "",
"columns": {
"id": {
@@ -1826,8 +2021,8 @@
}
},
"indexes": {
"crm_enquiries_org_code_idx": {
"name": "crm_enquiries_org_code_idx",
"crm_opportunities_org_code_idx": {
"name": "crm_opportunities_org_code_idx",
"columns": [
{
"expression": "organization_id",
@@ -1855,8 +2050,8 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_enquiry_attachments": {
"name": "crm_enquiry_attachments",
"public.crm_opportunity_attachments": {
"name": "crm_opportunity_attachments",
"schema": "",
"columns": {
"id": {
@@ -1871,8 +2066,8 @@
"primaryKey": false,
"notNull": true
},
"enquiry_id": {
"name": "enquiry_id",
"opportunity_id": {
"name": "opportunity_id",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -1967,8 +2162,8 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_enquiry_customers": {
"name": "crm_enquiry_customers",
"public.crm_opportunity_customers": {
"name": "crm_opportunity_customers",
"schema": "",
"columns": {
"id": {
@@ -1983,8 +2178,8 @@
"primaryKey": false,
"notNull": true
},
"enquiry_id": {
"name": "enquiry_id",
"opportunity_id": {
"name": "opportunity_id",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2036,8 +2231,8 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_enquiry_followups": {
"name": "crm_enquiry_followups",
"public.crm_opportunity_followups": {
"name": "crm_opportunity_followups",
"schema": "",
"columns": {
"id": {
@@ -2052,8 +2247,8 @@
"primaryKey": false,
"notNull": true
},
"enquiry_id": {
"name": "enquiry_id",
"opportunity_id": {
"name": "opportunity_id",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2141,201 +2336,6 @@
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_leads": {
"name": "crm_leads",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"organization_id": {
"name": "organization_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"branch_id": {
"name": "branch_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"customer_id": {
"name": "customer_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"contact_id": {
"name": "contact_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"project_name": {
"name": "project_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"project_location": {
"name": "project_location",
"type": "text",
"primaryKey": false,
"notNull": false
},
"product_type": {
"name": "product_type",
"type": "text",
"primaryKey": false,
"notNull": false
},
"priority": {
"name": "priority",
"type": "text",
"primaryKey": false,
"notNull": false
},
"estimated_value": {
"name": "estimated_value",
"type": "double precision",
"primaryKey": false,
"notNull": false
},
"awareness_id": {
"name": "awareness_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'new_job'"
},
"followup_status": {
"name": "followup_status",
"type": "text",
"primaryKey": false,
"notNull": false
},
"lost_reason": {
"name": "lost_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"outcome": {
"name": "outcome",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'open'"
},
"owner_marketing_user_id": {
"name": "owner_marketing_user_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assigned_sales_owner_id": {
"name": "assigned_sales_owner_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assigned_at": {
"name": "assigned_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"assigned_by": {
"name": "assigned_by",
"type": "text",
"primaryKey": false,
"notNull": false
},
"assignment_remark": {
"name": "assignment_remark",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_by": {
"name": "created_by",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"crm_leads_org_code_idx": {
"name": "crm_leads_org_code_idx",
"columns": [
{
"expression": "organization_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "code",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.crm_quotation_attachments": {
"name": "crm_quotation_attachments",
"schema": "",
@@ -2908,8 +2908,8 @@
"primaryKey": false,
"notNull": true
},
"enquiry_id": {
"name": "enquiry_id",
"opportunity_id": {
"name": "opportunity_id",
"type": "text",
"primaryKey": false,
"notNull": false

View File

@@ -5,8 +5,8 @@
{
"idx": 0,
"version": "7",
"when": 1782285058938,
"tag": "0000_swift_prism",
"when": 1782359607850,
"tag": "0000_hard_butterfly",
"breakpoints": true
}
]