81 lines
2.5 KiB
TypeScript
81 lines
2.5 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 { GenericAction } from "oak-domain/lib/actions/action";
|
|
import { String, Text, Datetime } from "oak-domain/lib/types/DataType";
|
|
type KeywordEnumValueList = Array<{
|
|
keywordCode: string;
|
|
enumValueList: Array<string>;
|
|
}>;
|
|
export type OpSchema = EntityShape & {
|
|
applicationId: ForeignKey<"application">;
|
|
wechatId: String<64>;
|
|
title: Text;
|
|
primaryIndustry?: Text | null;
|
|
deputyIndustry?: Text | null;
|
|
content?: Text | null;
|
|
example?: Text | null;
|
|
param?: Object | null;
|
|
syncAt: Datetime;
|
|
keywordEnumValueList?: KeywordEnumValueList | null;
|
|
type?: ("2" | "3") | 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;
|
|
applicationId: Q_StringValue;
|
|
wechatId: Q_StringValue;
|
|
title: Q_StringValue;
|
|
primaryIndustry: Q_StringValue;
|
|
deputyIndustry: Q_StringValue;
|
|
content: Q_StringValue;
|
|
example: Q_StringValue;
|
|
param: Object;
|
|
syncAt: Q_DateValue;
|
|
keywordEnumValueList: JsonFilter<KeywordEnumValueList>;
|
|
type: Q_EnumValue<"2" | "3">;
|
|
} & ExprOp<OpAttr | string>;
|
|
export type OpProjection = {
|
|
"#id"?: NodeId;
|
|
[k: string]: any;
|
|
id?: number;
|
|
$$createAt$$?: number;
|
|
$$updateAt$$?: number;
|
|
$$seq$$?: number;
|
|
applicationId?: number;
|
|
wechatId?: number;
|
|
title?: number;
|
|
primaryIndustry?: number;
|
|
deputyIndustry?: number;
|
|
content?: number;
|
|
example?: number;
|
|
param?: number | Object;
|
|
syncAt?: number;
|
|
keywordEnumValueList?: number | JsonProjection<KeywordEnumValueList>;
|
|
type?: number;
|
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
export type OpSortAttr = Partial<{
|
|
id: number;
|
|
$$createAt$$: number;
|
|
$$seq$$: number;
|
|
$$updateAt$$: number;
|
|
wechatId: number;
|
|
title: number;
|
|
primaryIndustry: number;
|
|
deputyIndustry: number;
|
|
content: number;
|
|
example: number;
|
|
syncAt: number;
|
|
keywordEnumValueList: number;
|
|
type: number;
|
|
[k: string]: any;
|
|
} | ExprOp<OpAttr | string>>;
|
|
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
export type OpUpdateAction = "update" | string;
|
|
export {};
|