feat: add type for create and edit

This commit is contained in:
Methapon2001 2024-04-05 11:42:03 +07:00
parent 20d9598a4e
commit a90400b348

View file

@ -28,6 +28,67 @@ const MINIO_BUCKET = process.env.MINIO_BUCKET;
function imageLocation(id: string) {
return `employee/profile-img-${id}`;
}
type CustomerBranchCreate = {
customerId: string;
code: string;
status?: Status;
branchNo: string;
legalPersonNo: string;
taxNo: string;
name: string;
nameEN: string;
addressEN: string;
address: string;
zipCode: string;
email: string;
telephoneNo: string;
longitude: string;
latitude: string;
registerName: string;
registerDate: Date;
authorizedCapital: string;
subDistrictId?: string | null;
districtId?: string | null;
provinceId?: string | null;
headOfficeId?: string | null;
};
type CustomerBranchUpdate = {
customerId?: string;
code?: string;
status?: "ACTIVE" | "INACTIVE";
branchNo?: string;
legalPersonNo?: string;
taxNo?: string;
name?: string;
nameEN?: string;
addressEN?: string;
address?: string;
zipCode?: string;
email?: string;
telephoneNo?: string;
longitude?: string;
latitude?: string;
registerName?: string;
registerDate?: Date;
authorizedCapital?: string;
subDistrictId?: string | null;
districtId?: string | null;
provinceId?: string | null;
headOfficeId?: string | null;
};
@Route("api/customer-branch")
@Tags("Customer Branch")
@Security("keycloak")