feat: foreign address

This commit is contained in:
Methapon2001 2025-07-16 09:38:30 +07:00
parent 6c350b12ce
commit 236ee48eab
2 changed files with 21 additions and 6 deletions

View file

@ -398,14 +398,21 @@ model User {
street String? street String?
streetEN String? streetEN String?
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull) addressForeign Boolean @default(false)
provinceId String?
district District? @relation(fields: [districtId], references: [id], onDelete: SetNull) provinceText String?
districtId String? province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
provinceId String?
subDistrict SubDistrict? @relation(fields: [subDistrictId], references: [id], onDelete: SetNull) districtText String?
subDistrictId String? district District? @relation(fields: [districtId], references: [id], onDelete: SetNull)
districtId String?
subDistrictText String?
subDistrict SubDistrict? @relation(fields: [subDistrictId], references: [id], onDelete: SetNull)
subDistrictId String?
zipCodeText String?
email String email String
telephoneNo String telephoneNo String

View file

@ -111,6 +111,7 @@ type UserCreate = {
responsibleArea?: string[] | null; responsibleArea?: string[] | null;
birthDate?: Date | null; birthDate?: Date | null;
addressForeign?: boolean;
address: string; address: string;
addressEN: string; addressEN: string;
soi?: string | null; soi?: string | null;
@ -122,8 +123,11 @@ type UserCreate = {
email: string; email: string;
telephoneNo: string; telephoneNo: string;
subDistrictText?: string | null;
subDistrictId?: string | null; subDistrictId?: string | null;
districtText?: string | null;
districtId?: string | null; districtId?: string | null;
provinceText?: string | null;
provinceId?: string | null; provinceId?: string | null;
selectedImage?: string; selectedImage?: string;
@ -173,6 +177,7 @@ type UserUpdate = {
responsibleArea?: string[] | null; responsibleArea?: string[] | null;
birthDate?: Date | null; birthDate?: Date | null;
addressForeign?: boolean;
address?: string; address?: string;
addressEN?: string; addressEN?: string;
soi?: string | null; soi?: string | null;
@ -186,8 +191,11 @@ type UserUpdate = {
selectedImage?: string; selectedImage?: string;
subDistrictText?: string | null;
subDistrictId?: string | null; subDistrictId?: string | null;
districtText?: string | null;
districtId?: string | null; districtId?: string | null;
provinceText?: string | null;
provinceId?: string | null; provinceId?: string | null;
branchId?: string | string[]; branchId?: string | string[];