refactor event
This commit is contained in:
+8
-18
@@ -1,4 +1,5 @@
|
||||
import type { Attachment, Model, User } from "timi-web";
|
||||
import type { EventRecord } from "@/types/EventRecord.ts";
|
||||
|
||||
export type CustomerGender = "MALE" | "FEMALE";
|
||||
export type CustomerBirthdateCalendar = "SOLAR" | "LUNAR";
|
||||
@@ -8,25 +9,26 @@ export type BodyAreaValue = {
|
||||
};
|
||||
|
||||
export type Customer = {
|
||||
code?: string | null;
|
||||
code?: string;
|
||||
name?: string;
|
||||
gender?: CustomerGender;
|
||||
age?: number;
|
||||
birthdate?: string | null;
|
||||
birthdate?: string;
|
||||
birthdateCalendar?: CustomerBirthdateCalendar;
|
||||
telephone?: string;
|
||||
address?: string;
|
||||
remark?: string;
|
||||
disease?: string;
|
||||
invitedCount?: number;
|
||||
conditioningPart?: BodyAreaValue;
|
||||
introducerCustomerId?: string | null;
|
||||
introducerCustomerId?: string;
|
||||
creatorUserId?: string;
|
||||
lastSignInAt?: number;
|
||||
|
||||
introducerCustomer?: Customer;
|
||||
creatorUser?: Partial<User>;
|
||||
invitedCount?: number;
|
||||
eventRecord?: EventRecord;
|
||||
eventRecordList?: EventRecord[];
|
||||
attachmentList?: Attachment[];
|
||||
attachmentIdList?: string[];
|
||||
} & Model;
|
||||
|
||||
export type CustomerSearchReq = {
|
||||
@@ -49,15 +51,3 @@ export type CustomerGenderStatView = {
|
||||
genderCode?: CustomerGender | "UNKNOWN";
|
||||
count?: number;
|
||||
};
|
||||
|
||||
export type CustomerInviteUpdateReq = {
|
||||
customerId: string;
|
||||
introducerCustomerId?: string;
|
||||
};
|
||||
|
||||
export type QuickRegisterReq = {
|
||||
customerCode: string;
|
||||
eventId: string;
|
||||
remark?: string;
|
||||
attachmentIdList?: string[];
|
||||
};
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import type { Attachment, Model, User } from "timi-web";
|
||||
import type { Attachment, BasePage, Model, User } from "timi-web";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { EventItem } from "@/types/EventItem";
|
||||
|
||||
export type EventRecord = {
|
||||
customerId?: string;
|
||||
customerIdList?: string[];
|
||||
eventId?: string;
|
||||
operatorUserId?: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
|
||||
customer?: Customer;
|
||||
event?: EventItem;
|
||||
operator?: Partial<User>;
|
||||
attachmentList?: Array<Partial<Attachment>>;
|
||||
attachmentIdList?: string[];
|
||||
attachmentList?: Attachment[];
|
||||
} & Model;
|
||||
|
||||
export type EventRecordListItemView = {
|
||||
@@ -26,59 +27,21 @@ export type EventRecordListItemView = {
|
||||
};
|
||||
|
||||
export type EventRecordPage = {
|
||||
customerId?: string;
|
||||
eventId?: string;
|
||||
eventIdList?: string[];
|
||||
keyword?: string;
|
||||
beginAt: number;
|
||||
endAt: number;
|
||||
};
|
||||
|
||||
export type EventRecordPageReq = {
|
||||
index: number;
|
||||
size: number;
|
||||
customerId?: string;
|
||||
eventIdList?: string[];
|
||||
keyword?: string;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
};
|
||||
} & BasePage;
|
||||
|
||||
export type EventRecordStatReq = {
|
||||
export type EventRecordRankPage = {
|
||||
customerId?: string;
|
||||
eventIdList?: string[];
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
};
|
||||
|
||||
export type EventRecordTrendStatReq = {
|
||||
customerId?: string;
|
||||
eventId: string;
|
||||
beginAt: number;
|
||||
endAt: number;
|
||||
};
|
||||
|
||||
export type CustomerEventStatView = {
|
||||
customerId?: string;
|
||||
customerName?: string;
|
||||
eventId?: string;
|
||||
eventName?: string;
|
||||
count?: number;
|
||||
latestRegisteredAt?: number;
|
||||
};
|
||||
} & BasePage;
|
||||
|
||||
export type CustomerEventRankView = {
|
||||
rank?: number;
|
||||
customerId?: string;
|
||||
customerCode?: string;
|
||||
customerName?: string;
|
||||
customerPhotoAttachmentId?: string;
|
||||
totalEventDays?: number;
|
||||
totalEventCount?: number;
|
||||
recentContinuousEventDays?: number;
|
||||
latestRegisteredAt?: number;
|
||||
};
|
||||
|
||||
export type CustomerEventRankResponse = {
|
||||
rank?: number;
|
||||
customerId?: string;
|
||||
customer?: Customer;
|
||||
@@ -102,12 +65,3 @@ export type EventRecordCalendarView = {
|
||||
eventId?: string;
|
||||
registeredAt?: number;
|
||||
};
|
||||
|
||||
export type EventRecordCreateReq = {
|
||||
customerIdList: string[];
|
||||
eventId: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
attachmentIdList?: string[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user