oak-pay-business/es/oak-app-domain/Message/_baseSchema.d.ts

102 lines
3.0 KiB
TypeScript

import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState, VisitState } from "./Action";
import { String, Text } from "oak-domain/lib/types/DataType";
import { Weight, Channel } from "oak-general-business/lib/types/Message";
export type Router = {
pathname: string;
props?: Record<string, any>;
state?: Record<string, any>;
isTabBar?: boolean;
};
type MessageRestriction = {
systemIds?: string[];
channels?: Array<Channel>;
};
type Channels = Channel[];
export type OpSchema = EntityShape & {
entity: String<32>;
entityId: String<64>;
userId: ForeignKey<"user">;
type: String<64>;
weight: Weight;
restriction?: MessageRestriction | null;
title: String<256>;
content: Text;
data?: Object | null;
router?: Router | null;
platformId?: ForeignKey<"platform"> | null;
channels?: Channels | null;
iState?: IState | null;
visitState?: VisitState | null;
} & {
[A in ExpressionKey]?: any;
};
export type OpAttr = keyof OpSchema;
export type OpFilter = {
id: Q_StringValue;
$$createAt$$: Q_DateValue;
$$seq$$: Q_NumberValue;
$$updateAt$$: Q_DateValue;
entity: Q_StringValue;
entityId: Q_StringValue;
userId: Q_StringValue;
type: Q_StringValue;
weight: Q_EnumValue<Weight>;
restriction: JsonFilter<MessageRestriction>;
title: Q_StringValue;
content: Q_StringValue;
data: Object;
router: JsonFilter<Router>;
platformId: Q_StringValue;
channels: JsonFilter<Channels>;
iState: Q_EnumValue<IState>;
visitState: Q_EnumValue<VisitState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
entity?: number;
entityId?: number;
userId?: number;
type?: number;
weight?: number;
restriction?: number | JsonProjection<MessageRestriction>;
title?: number;
content?: number;
data?: number | Object;
router?: number | JsonProjection<Router>;
platformId?: number;
channels?: number | JsonProjection<Channels>;
iState?: number;
visitState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
entity: number;
entityId: number;
userId: number;
type: number;
weight: number;
restriction: number;
title: number;
content: number;
router: number;
platformId: number;
channels: number;
iState: number;
visitState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | string>;
export type OpUpdateAction = "update" | ParticularAction | string;
export {};