feat: file upload customer branch

This commit is contained in:
Methapon Metanipat 2024-09-16 17:20:51 +07:00
parent 3a8bb7a82d
commit 472db99c50
2 changed files with 313 additions and 115 deletions

View file

@ -60,6 +60,20 @@ export const fileLocation = {
customer: {
img: (customerId: string, name?: string) => `customer/img-${customerId}/${name || ""}`,
},
customerBranch: {
attachment: (customerBranchId: string, name?: string) =>
`customer-branch/attachment-${customerBranchId}/${name || ""}`,
citizen: (customerBranchId: string, citizenId?: string) =>
`customer-branch/citizen-${customerBranchId}/${citizenId || ""}`,
houseRegistration: (customerBranchId: string, houseRegistrationId?: string) =>
`customer-branch/house-registration-${customerBranchId}/${houseRegistrationId || ""}`,
commercialRegistration: (customerBranchId: string, commercialRegistrationId?: string) =>
`customer-branch/commercial-registration-${customerBranchId}/${commercialRegistrationId || ""}`,
vatRegistration: (customerBranchId: string, vatRegistrationId?: string) =>
`customer-branch/vat-registration-${customerBranchId}/${vatRegistrationId || ""}`,
powerOfAttorney: (customerBranchId: string, powerOfAttorneyId?: string) =>
`customer-branch/power-of-attorney-${customerBranchId}/${powerOfAttorneyId || ""}`,
},
employee: {
img: (employeeId: string, name?: string) => `employee/img-${employeeId}/${name || ""}`,
attachment: (employeeId: string, name?: string) =>