storing the assigned on date and time when am is assigned to host

This commit is contained in:
2025-11-21 15:56:40 +05:30
parent 29cc335a07
commit 1fea4f18f6
2 changed files with 3 additions and 1 deletions

View File

@@ -680,6 +680,7 @@ model HostHeader {
agreementAccepted Boolean @default(false) @map("agreement_accepted")
accountManagerXid Int? @map("account_manager_xid")
accountManager User? @relation("AccountManager", fields: [accountManagerXid], references: [id], onDelete: Restrict)
assignedOn DateTime? @map("assigned_on")
isApproved Boolean @default(false) @map("is_approved")
agreementStartDate DateTime? @map("agreement_start_date")
durationNumber Int? @map("duration_number")

View File

@@ -492,7 +492,7 @@ export class MinglarService {
id: true,
hostStatusDisplay: true,
createdAt: true,
companyName:true,
companyName: true,
user: {
select: {
id: true,
@@ -598,6 +598,7 @@ export class MinglarService {
where: { id: hostXid },
data: {
accountManagerXid: accountManagerXid,
assignedOn: new Date(),
hostStatusInternal: HOST_STATUS_INTERNAL.HOST_SUBMITTED,
hostStatusDisplay: HOST_STATUS_DISPLAY.UNDER_REVIEW,
adminStatusInternal: MINGLAR_STATUS_INTERNAL.AM_TO_REVIEW,