fix: missing fields

This commit is contained in:
Methapon Metanipat 2024-09-19 14:06:36 +07:00
parent ed0daff006
commit 065163dac8
3 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,9 @@
/*
Warnings:
- Added the required column `citizenId` to the `CustomerBranchCitizen` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "CustomerBranchCitizen" ADD COLUMN "birthDate" DATE,
ADD COLUMN "citizenId" TEXT NOT NULL;

View file

@ -536,7 +536,9 @@ model CustomerBranch {
}
model CustomerBranchCitizen {
id String @id @default(cuid())
id String @id @default(cuid())
citizenId String
birthDate DateTime? @db.Date
namePrefix String?
firstName String
firstNameEN String?
@ -544,8 +546,8 @@ model CustomerBranchCitizen {
middleNameEN String?
lastName String
lastNameEN String?
issueDate DateTime @db.Date
expireDate DateTime @db.Date
issueDate DateTime @db.Date
expireDate DateTime @db.Date
nationality String
religion String
gender String

View file

@ -35,6 +35,8 @@ function globalAllow(user: RequestWithUser["user"]) {
}
type CustomerBranchCitizenPayload = {
citizenId: string;
birthDate?: Date;
namePrefix?: string;
firstName: string;
firstNameEN?: string;