add package
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { Model } from "timi-web-api";
|
||||
import type { GaoPackageConfig } from "@/types/Package";
|
||||
|
||||
export type EventStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
export type EventBizType = "GENERAL" | "PACKAGE_PURCHASE";
|
||||
|
||||
export type EventValueType = "NONE" | "NUMBER";
|
||||
export type EventValueUnit = "CENT" | "COUNT";
|
||||
@@ -31,6 +33,9 @@ export type EventOptionSelectionMap = Record<string, Record<string, string[]>>;
|
||||
|
||||
export type EventItem = {
|
||||
storeId?: string;
|
||||
bizType?: EventBizType;
|
||||
packageConfigId?: string;
|
||||
packageConfig?: GaoPackageConfig;
|
||||
name: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
import type { Attachment, Model, PageResult, User } from "timi-web-api";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { EventRecord } from "@/types/EventRecord";
|
||||
|
||||
export type PackageConfigStatus = "DRAFT" | "ACTIVE" | "INACTIVE";
|
||||
export type CustomerPackageStatus = "ACTIVE" | "FULFILLED" | "CANCELLED";
|
||||
export type PaymentStatus = "UNPAID" | "PARTIALLY_PAID" | "PAID";
|
||||
export type RefundStatus = "NOT_REQUIRED" | "PENDING" | "REFUNDED";
|
||||
export type DeliveryStatus = "PENDING" | "VERIFIED" | "REJECTED" | "CANCELLED" | "REVOKED";
|
||||
export type DeliveryOperationType = "DELIVER" | "REVOKE";
|
||||
export type FundOperationType = "RECEIVE" | "REFUND" | "CONFIRM_NO_REFUND" | "REVOKE";
|
||||
export type FundRecordStatus = "PENDING" | "VERIFIED" | "REJECTED" | "CANCELLED";
|
||||
|
||||
export type PackageConfigItem = {
|
||||
productName: string;
|
||||
unit: string;
|
||||
defaultQuantity: number | string;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
} & Model;
|
||||
|
||||
export type GaoPackageConfig = {
|
||||
storeId?: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
standardAmount: number;
|
||||
status?: PackageConfigStatus;
|
||||
beginAt?: number | null;
|
||||
endAt?: number | null;
|
||||
sort?: number;
|
||||
itemList?: PackageConfigItem[];
|
||||
updater?: Partial<User>;
|
||||
} & Model;
|
||||
|
||||
export type PackageConfigPage = {
|
||||
storeId?: string;
|
||||
keyword?: string;
|
||||
status?: PackageConfigStatus;
|
||||
index: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
export type CustomerPackageItem = {
|
||||
productNameSnapshot: string;
|
||||
unitSnapshot: string;
|
||||
totalQuantity: number | string;
|
||||
reservedQuantity: number | string;
|
||||
deliveredQuantity: number | string;
|
||||
pendingQuantity: number | string;
|
||||
availableQuantity: number | string;
|
||||
remainingQuantity: number | string;
|
||||
} & Model;
|
||||
|
||||
export type GaoCustomerPackage = {
|
||||
storeId?: string;
|
||||
customerId?: string;
|
||||
packageConfigId?: string;
|
||||
packageNameSnapshot?: string;
|
||||
standardAmountSnapshot?: number;
|
||||
saleAmount?: number;
|
||||
pendingPaidAmount?: number;
|
||||
paidAmount?: number;
|
||||
refundedAmount?: number;
|
||||
status?: CustomerPackageStatus;
|
||||
paymentStatus?: PaymentStatus;
|
||||
refundStatus?: RefundStatus;
|
||||
purchasedAt?: number;
|
||||
cancelledAt?: number | null;
|
||||
customer?: Customer;
|
||||
purchaseEventRecord?: EventRecord;
|
||||
itemList?: CustomerPackageItem[];
|
||||
deliveryList?: GaoPackageDelivery[];
|
||||
fundRecordList?: GaoFundRecord[];
|
||||
} & Model;
|
||||
|
||||
export type CustomerPackagePage = {
|
||||
storeId?: string;
|
||||
customerId?: string;
|
||||
keyword?: string;
|
||||
status?: CustomerPackageStatus;
|
||||
paymentStatus?: PaymentStatus;
|
||||
refundStatus?: RefundStatus;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
index: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
export type PackagePurchaseItem = {
|
||||
productName: string;
|
||||
unit: string;
|
||||
totalQuantity: string;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
export type PackageAttachment = Partial<Attachment> & {
|
||||
tempFileId?: string;
|
||||
attachType?: string;
|
||||
name?: string;
|
||||
};
|
||||
|
||||
export type PackagePurchaseRequest = {
|
||||
requestNo: string;
|
||||
eventId: string;
|
||||
customerId: string;
|
||||
saleAmount?: number;
|
||||
purchasedAt?: number;
|
||||
itemList?: PackagePurchaseItem[];
|
||||
attachmentList?: PackageAttachment[];
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
export type PackagePaymentReceiveRequest = {
|
||||
requestNo: string;
|
||||
customerPackageId: string;
|
||||
amount: number;
|
||||
occurredAt?: number;
|
||||
attachmentList: PackageAttachment[];
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
export type PackageDeliveryItem = {
|
||||
customerPackageItemId: string;
|
||||
quantity: string;
|
||||
};
|
||||
|
||||
export type PackageDeliveryCreateRequest = {
|
||||
requestNo: string;
|
||||
customerPackageId: string;
|
||||
deliveredAt?: number;
|
||||
itemList: PackageDeliveryItem[];
|
||||
attachmentList: PackageAttachment[];
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
export type GaoPackageDeliveryItem = {
|
||||
customerPackageItemId?: string;
|
||||
productNameSnapshot?: string;
|
||||
unitSnapshot?: string;
|
||||
quantity?: number | string;
|
||||
reservedBefore?: number | string;
|
||||
reservedAfter?: number | string;
|
||||
deliveredBefore?: number | string;
|
||||
deliveredAfter?: number | string;
|
||||
};
|
||||
|
||||
export type GaoPackageDelivery = {
|
||||
customerPackageId?: string;
|
||||
customerId?: string;
|
||||
operationType?: DeliveryOperationType;
|
||||
status?: DeliveryStatus;
|
||||
requestNo?: string;
|
||||
operatorUserId?: string;
|
||||
operator?: Partial<User>;
|
||||
verifierUserId?: string;
|
||||
verifier?: Partial<User>;
|
||||
deliveredAt?: number;
|
||||
sourceDeliveryId?: string;
|
||||
reason?: string | null;
|
||||
itemList?: GaoPackageDeliveryItem[];
|
||||
attachmentList?: PackageAttachment[];
|
||||
} & Model;
|
||||
|
||||
export type DeliveryPage = {
|
||||
storeId?: string;
|
||||
customerPackageId?: string;
|
||||
customerId?: string;
|
||||
status?: DeliveryStatus;
|
||||
operationType?: DeliveryOperationType;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
index: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
export type GaoFundRecord = {
|
||||
bizId?: string;
|
||||
customerPackageId?: string;
|
||||
customerId?: string;
|
||||
customer?: Customer;
|
||||
customerPackage?: GaoCustomerPackage;
|
||||
operationType?: FundOperationType;
|
||||
status?: FundRecordStatus;
|
||||
amount?: number;
|
||||
sourceRecordId?: string;
|
||||
requestNo?: string;
|
||||
occurredAt?: number;
|
||||
reason?: string | null;
|
||||
remark?: string | null;
|
||||
operatorUserId?: string;
|
||||
operator?: Partial<User>;
|
||||
verifierUserId?: string;
|
||||
verifier?: Partial<User>;
|
||||
attachmentList?: PackageAttachment[];
|
||||
} & Model;
|
||||
|
||||
export type FundRecordPage = {
|
||||
storeId?: string;
|
||||
customerPackageId?: string;
|
||||
customerId?: string;
|
||||
operationType?: FundOperationType;
|
||||
status?: FundRecordStatus;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
index: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
export type PackagePageResult<T> = PageResult<T> & {
|
||||
pages?: number;
|
||||
};
|
||||
Reference in New Issue
Block a user