task h.1 adn fix permission
This commit is contained in:
@@ -49,7 +49,7 @@ export const memberships = pgTable('memberships', {
|
||||
userId: text('user_id').notNull(),
|
||||
organizationId: text('organization_id').notNull(),
|
||||
role: text('role').default('user').notNull(),
|
||||
businessRole: text('business_role').default('viewer').notNull(),
|
||||
businessRole: text('business_role').default('sales_support').notNull(),
|
||||
permissions: text('permissions').array().default([]).notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull()
|
||||
@@ -215,6 +215,10 @@ export const crmEnquiries = pgTable(
|
||||
notes: text('notes'),
|
||||
isHotProject: boolean('is_hot_project').default(false).notNull(),
|
||||
isActive: boolean('is_active').default(true).notNull(),
|
||||
assignedToUserId: text('assigned_to_user_id'),
|
||||
assignedAt: timestamp('assigned_at', { withTimezone: true }),
|
||||
assignedBy: text('assigned_by'),
|
||||
assignmentRemark: text('assignment_remark'),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
deletedAt: timestamp('deleted_at', { withTimezone: true }),
|
||||
@@ -541,10 +545,9 @@ export const crmDocumentTemplateMappings = pgTable(
|
||||
deletedAt: timestamp('deleted_at', { withTimezone: true })
|
||||
},
|
||||
(table) => ({
|
||||
templatePlaceholderIdx: uniqueIndex('crm_document_template_mappings_version_placeholder_idx').on(
|
||||
table.templateVersionId,
|
||||
table.placeholderKey
|
||||
)
|
||||
templatePlaceholderIdx: uniqueIndex(
|
||||
'crm_document_template_mappings_version_placeholder_idx'
|
||||
).on(table.templateVersionId, table.placeholderKey)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user