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?
streetEN String?
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
provinceId String?
addressForeign Boolean @default(false)
district District? @relation(fields: [districtId], references: [id], onDelete: SetNull)
districtId String?
provinceText String?
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
provinceId String?
subDistrict SubDistrict? @relation(fields: [subDistrictId], references: [id], onDelete: SetNull)
subDistrictId String?
districtText 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
telephoneNo String

View file

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