refactor event
This commit is contained in:
@@ -57,7 +57,7 @@ export type CustomerInviteUpdateReq = {
|
||||
|
||||
export type QuickRegisterReq = {
|
||||
customerCode: string;
|
||||
registrationEventId: string;
|
||||
eventId: string;
|
||||
remark?: string;
|
||||
attachmentIdList?: string[];
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { Model } from "timi-web";
|
||||
|
||||
export type EventStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
|
||||
export type EventLimitType = "NONE" | "DAILY_HALF_DAY" | "NATURAL_DAY" | "INTERVAL_HOUR" | "NATURAL_MONTH" | "TOTAL_LIMIT" | "CUSTOMER_TOTAL_LIMIT";
|
||||
|
||||
export type EventItem = {
|
||||
name: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
status?: EventStatus;
|
||||
requirePhoto?: boolean;
|
||||
limitType?: EventLimitType;
|
||||
limitValue?: number;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
sort?: number;
|
||||
roleCodeList?: string[];
|
||||
} & Model;
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
import type { Attachment, Model, User } from "timi-web";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { EventItem } from "@/types/EventItem";
|
||||
|
||||
export type EventRecord = {
|
||||
customerId?: string;
|
||||
eventId?: string;
|
||||
operatorUserId?: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
customer?: Customer;
|
||||
event?: EventItem;
|
||||
operator?: Partial<User>;
|
||||
attachmentList?: Array<Partial<Attachment>>;
|
||||
attachmentIdList?: string[];
|
||||
} & Model;
|
||||
|
||||
export type EventRecordListItemView = {
|
||||
id?: string;
|
||||
customerId?: string;
|
||||
customerName?: string;
|
||||
customerPhotoAttachmentId?: string;
|
||||
eventId?: string;
|
||||
eventName?: string;
|
||||
registeredAt?: number;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
export type EventRecordStatReq = {
|
||||
customerId?: 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;
|
||||
};
|
||||
|
||||
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;
|
||||
totalEventDays?: number;
|
||||
totalEventCount?: number;
|
||||
recentContinuousEventDays?: number;
|
||||
latestRegisteredAt?: number;
|
||||
};
|
||||
|
||||
export type EventRecordDailyStatView = {
|
||||
dateValue?: number;
|
||||
dailyCount?: number;
|
||||
totalCount?: number;
|
||||
};
|
||||
|
||||
export type EventRecordCalendarView = {
|
||||
id?: string;
|
||||
customerId?: string;
|
||||
customerCode?: string;
|
||||
customerName?: string;
|
||||
eventId?: string;
|
||||
registeredAt?: number;
|
||||
};
|
||||
|
||||
export type EventRecordCreateReq = {
|
||||
customerIdList: string[];
|
||||
eventId: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
attachmentIdList?: string[];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Model, Role, User } from "timi-web";
|
||||
|
||||
export type GaoUser = {
|
||||
export type ManagedUser = {
|
||||
userId?: string;
|
||||
enabled?: boolean;
|
||||
remark?: string;
|
||||
@@ -8,3 +8,4 @@ export type GaoUser = {
|
||||
roleList?: Array<Role | string>;
|
||||
roleIdList?: string[];
|
||||
} & Model;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { Model } from "timi-web";
|
||||
|
||||
export type RegistrationEventStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
|
||||
export type RegistrationLimitType = "NONE" | "DAILY_HALF_DAY" | "NATURAL_DAY" | "INTERVAL_HOUR" | "NATURAL_MONTH" | "TOTAL_LIMIT" | "CUSTOMER_TOTAL_LIMIT";
|
||||
|
||||
export type RegistrationEvent = {
|
||||
name: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
status?: RegistrationEventStatus;
|
||||
requirePhoto?: boolean;
|
||||
limitType?: RegistrationLimitType;
|
||||
limitValue?: number;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
sort?: number;
|
||||
roleCodeList?: string[];
|
||||
} & Model;
|
||||
@@ -1,92 +0,0 @@
|
||||
import type { Attachment, Model, User } from "timi-web";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { RegistrationEvent } from "@/types/RegistrationEvent";
|
||||
|
||||
export type RegistrationEventRecord = {
|
||||
customerId?: string;
|
||||
registrationEventId?: string;
|
||||
operatorUserId?: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
customer?: Customer;
|
||||
registrationEvent?: RegistrationEvent;
|
||||
operator?: Partial<User>;
|
||||
attachmentList?: Array<Partial<Attachment>>;
|
||||
attachmentIdList?: string[];
|
||||
} & Model;
|
||||
|
||||
export type RegistrationEventRecordListItemView = {
|
||||
id?: string;
|
||||
customerId?: string;
|
||||
customerName?: string;
|
||||
customerPhotoAttachmentId?: string;
|
||||
registrationEventId?: string;
|
||||
registrationEventName?: string;
|
||||
registeredAt?: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordRangeReq = {
|
||||
customerId?: string;
|
||||
registrationEventId?: string;
|
||||
registrationEventIdList?: string[];
|
||||
keyword?: string;
|
||||
beginRegisteredAt: number;
|
||||
endRegisteredAt: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordStatReq = {
|
||||
customerId?: string;
|
||||
beginRegisteredAt?: number;
|
||||
endRegisteredAt?: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordTrendStatReq = {
|
||||
customerId?: string;
|
||||
registrationEventId: string;
|
||||
beginRegisteredAt: number;
|
||||
endRegisteredAt: number;
|
||||
};
|
||||
|
||||
export type CustomerRegisterStatView = {
|
||||
customerId?: string;
|
||||
customerName?: string;
|
||||
registrationEventId?: string;
|
||||
registrationEventName?: string;
|
||||
count?: number;
|
||||
latestRegisteredAt?: number;
|
||||
};
|
||||
|
||||
export type CustomerRegistrationRankView = {
|
||||
rank?: number;
|
||||
customerId?: string;
|
||||
customerCode?: string;
|
||||
customerName?: string;
|
||||
customerPhotoAttachmentId?: string;
|
||||
totalRegistrationDays?: number;
|
||||
totalRegistrationCount?: number;
|
||||
recentContinuousRegistrationDays?: number;
|
||||
latestRegisteredAt?: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordDailyStatView = {
|
||||
dateValue?: number;
|
||||
dailyCount?: number;
|
||||
totalCount?: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordCalendarView = {
|
||||
id?: string;
|
||||
customerId?: string;
|
||||
customerCode?: string;
|
||||
customerName?: string;
|
||||
registrationEventId?: string;
|
||||
registeredAt?: number;
|
||||
};
|
||||
|
||||
export type RegistrationEventRecordCreateReq = {
|
||||
customerIdList: string[];
|
||||
registrationEventId: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
attachmentIdList?: string[];
|
||||
};
|
||||
Reference in New Issue
Block a user