oak-general-business/es/oak-app-domain/SessionMessage/_baseSchema.d.ts

75 lines
2.3 KiB
TypeScript

import { ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 { Datetime, Text, String, Boolean } from "oak-domain/lib/types/DataType";
type Type = "text" | "image" | "voice" | "video" | "location" | "link" | "event" | "miniprogrampage";
export type OpSchema = EntityShape & {
applicationId: ForeignKey<"application">;
sessionId: ForeignKey<"session">;
userId?: ForeignKey<"user"> | null;
wechatUserId?: ForeignKey<"wechatUser"> | null;
createTime?: Datetime | null;
type: Type;
text?: Text | null;
link?: String<128> | null;
aaoe?: Boolean | null;
extra?: Object | 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;
sessionId: Q_StringValue;
userId: Q_StringValue;
wechatUserId: Q_StringValue;
createTime: Q_DateValue;
type: Q_EnumValue<Type>;
text: Q_StringValue;
link: Q_StringValue;
aaoe: Q_BooleanValue;
extra: Object;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
applicationId?: number;
sessionId?: number;
userId?: number;
wechatUserId?: number;
createTime?: number;
type?: number;
text?: number;
link?: number;
aaoe?: number;
extra?: number | Object;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
applicationId: number;
sessionId: number;
userId: number;
wechatUserId: number;
createTime: number;
type: number;
text: number;
link: number;
aaoe: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<GenericAction | string>;
export type OpUpdateAction = "update" | string;
export {};