update point tier rule
This commit is contained in:
@@ -2,6 +2,9 @@ import type { Model } from "timi-web";
|
||||
|
||||
export type EventStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
|
||||
export type EventValueType = "NONE" | "NUMBER";
|
||||
export type EventValueUnit = "CENT" | "COUNT";
|
||||
|
||||
export type EventLimitType = "NONE" | "DAILY_HALF_DAY" | "NATURAL_DAY" | "INTERVAL_HOUR" | "NATURAL_MONTH" | "TOTAL_LIMIT" | "CUSTOMER_TOTAL_LIMIT";
|
||||
|
||||
export type EventItem = {
|
||||
@@ -9,6 +12,9 @@ export type EventItem = {
|
||||
name: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
valueType?: EventValueType;
|
||||
valueUnit?: EventValueUnit | null;
|
||||
requireValue?: boolean;
|
||||
status?: EventStatus;
|
||||
requirePhoto?: boolean;
|
||||
limitType?: EventLimitType;
|
||||
|
||||
@@ -7,7 +7,9 @@ export type EventRecord = {
|
||||
customerId?: string;
|
||||
customerIdList?: string[];
|
||||
eventId?: string;
|
||||
pointValue?: number;
|
||||
pointValue?: number | null;
|
||||
numberValue?: number | null;
|
||||
earnedPointValue?: number | null;
|
||||
operatorUserId?: string;
|
||||
remark?: string;
|
||||
registeredAt?: number;
|
||||
|
||||
+22
-2
@@ -2,8 +2,8 @@ import type { BasePage, Model } from "timi-web";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
|
||||
export type PointRuleStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
export type PointRuleTriggerType = "EVERY_TIME" | "FIRST_TIME" | "AFTER_COUNT_EVERY_TIME" | "SOURCE_VALUE";
|
||||
export type PointRuleMode = "FIXED" | "SOURCE_VALUE";
|
||||
export type PointRuleTriggerType = "EVERY_TIME" | "FIRST_TIME" | "AFTER_COUNT_EVERY_TIME" | "SOURCE_VALUE" | "CUSTOMER_EVENT_VALUE_TIER";
|
||||
export type PointRuleMode = "FIXED" | "SOURCE_VALUE" | "TIER";
|
||||
export type PointLedgerChangeType = "EARN" | "REVOKE" | "ADJUST";
|
||||
export type PointLedgerDirection = "INCREASE" | "DECREASE";
|
||||
|
||||
@@ -13,6 +13,26 @@ export type PointRuleCondition = {
|
||||
threshold?: number;
|
||||
includeCurrent?: boolean;
|
||||
scope?: "CUSTOMER_EVENT";
|
||||
sourceEventId?: string;
|
||||
sourceValueField?: "numberValue";
|
||||
window?: {
|
||||
type: "ROLLING";
|
||||
amount: number;
|
||||
unit: "YEAR";
|
||||
};
|
||||
tiers?: PointRuleTier[];
|
||||
};
|
||||
|
||||
export type PointRuleTier = {
|
||||
min: number;
|
||||
max?: number | null;
|
||||
pointValue: number;
|
||||
};
|
||||
|
||||
export type PointRuleTierForm = {
|
||||
key: number;
|
||||
maxText: string;
|
||||
pointValueText: string;
|
||||
};
|
||||
|
||||
export type PointAccount = {
|
||||
|
||||
Reference in New Issue
Block a user