-
Notifications
You must be signed in to change notification settings - Fork 0
/
StoragePaths.ts
38 lines (35 loc) · 1.82 KB
/
StoragePaths.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export class StoragePaths {
constructor() {}
getCourierSelfiePath = (courierId: string, size?: string) =>
`couriers/${courierId}/selfie${size ? `_${size}` : ''}.jpg`;
getCourierDocumentPath = (courierId: string, size?: string) =>
`couriers/${courierId}/document${size ? `_${size}` : ''}.jpg`;
// orders
getOrderPODPackagePath = (orderId: string, courierId: string) =>
`orders/${orderId}/${courierId}/package.jpg`;
getOrderPODFrontPath = (orderId: string, courierId: string) =>
`orders/${orderId}/${courierId}/front.jpg`;
// business
getBusinessStoragePath = (businessId: string) => `businesses/${businessId}`;
getBusinessLogoUploadStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/logo.jpg`;
getBusinessLogoStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/logo_240x240.jpg`;
getBusinessCoverUploadStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/cover.jpg`;
getBusinessCoverStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/cover_1008x360.jpg`;
getProductsStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/products`;
getProductImageStoragePath = (
businessId: string,
productId: string,
size: string
) => `${this.getProductsStoragePath(businessId)}/${productId}_${size}.jpg`;
getComplementsStoragePath = (businessId: string) =>
`${this.getBusinessStoragePath(businessId)}/complements`;
getComplementUploadStoragePath = (businessId: string, complementId: string) =>
`${this.getComplementsStoragePath(businessId)}/${complementId}_288x288.jpg`;
getComplementImageStoragePath = (businessId: string, complementId: string) =>
`${this.getComplementsStoragePath(businessId)}/${complementId}_288x288.jpg`;
}