import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, FulltextFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity"; import { GenericAction } from "oak-domain/lib/actions/action"; import { String } from "oak-domain/lib/types/DataType"; import * as Ship from "../Ship/Schema"; import * as ShipCompanySystem from "../ShipCompanySystem/Schema"; export type OpSchema = EntityShape & { name: String<64>; abbr: String<32>; wechatMpName?: String<32> | null; }; export type OpAttr = keyof OpSchema; type Ship$shipCompanyAggr = "ship$shipCompany$$aggr" | "ship$shipCompany$$0$$aggr" | "ship$shipCompany$$1$$aggr" | "ship$shipCompany$$2$$aggr" | "ship$shipCompany$$3$$aggr" | "ship$shipCompany$$4$$aggr" | "ship$shipCompany$$5$$aggr" | "ship$shipCompany$$6$$aggr" | "ship$shipCompany$$7$$aggr" | "ship$shipCompany$$8$$aggr" | "ship$shipCompany$$9$$aggr"; type ShipCompanySystem$shipCompanyAggr = "shipCompanySystem$shipCompany$$aggr" | "shipCompanySystem$shipCompany$$0$$aggr" | "shipCompanySystem$shipCompany$$1$$aggr" | "shipCompanySystem$shipCompany$$2$$aggr" | "shipCompanySystem$shipCompany$$3$$aggr" | "shipCompanySystem$shipCompany$$4$$aggr" | "shipCompanySystem$shipCompany$$5$$aggr" | "shipCompanySystem$shipCompany$$6$$aggr" | "shipCompanySystem$shipCompany$$7$$aggr" | "shipCompanySystem$shipCompany$$8$$aggr" | "shipCompanySystem$shipCompany$$9$$aggr"; export type Schema = OpSchema & { ship$shipCompany?: Array; shipCompanySystem$shipCompany?: Array; } & { [A in ExpressionKey]?: any; } & { [A in Ship$shipCompanyAggr]?: AggregationResult; } & { [A in ShipCompanySystem$shipCompanyAggr]?: AggregationResult; }; type AttrFilter = { id: Q_StringValue; $$createAt$$: Q_DateValue; $$seq$$: Q_NumberValue; $$updateAt$$: Q_DateValue; name: Q_StringValue; abbr: Q_StringValue; wechatMpName: Q_StringValue; ship$shipCompany: Ship.Filter & SubQueryPredicateMetadata; shipCompanySystem$shipCompany: ShipCompanySystem.Filter & SubQueryPredicateMetadata; }; export type Filter = MakeFilter & FulltextFilter>; export type Projection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; name?: number; abbr?: number; wechatMpName?: number; ship$shipCompany?: Ship.Selection & { $entity: "ship"; }; shipCompanySystem$shipCompany?: ShipCompanySystem.Selection & { $entity: "shipCompanySystem"; }; } & Partial> & { [A in Ship$shipCompanyAggr]?: Ship.Aggregation & { $entity: "ship"; }; } & { [A in ShipCompanySystem$shipCompanyAggr]?: ShipCompanySystem.Aggregation & { $entity: "shipCompanySystem"; }; }; type ShipCompanyIdProjection = OneOf<{ id: number; }>; export type SortAttr = { id: number; } | { $$createAt$$: number; } | { $$seq$$: number; } | { $$updateAt$$: number; } | { name: number; } | { abbr: number; } | { wechatMpName: number; } | { [k: string]: any; } | OneOf>; export type SortNode = { $attr: SortAttr; $direction?: "asc" | "desc"; }; export type Sorter = SortNode[]; export type SelectOperation

= OakSelection<"select", P, Filter, Sorter>; export type Selection

= SelectOperation

; export type Aggregation = DeduceAggregation; export type CreateOperationData = FormCreateData & { ship$shipCompany?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; shipCompanySystem$shipCompany?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; }; export type CreateSingleOperation = OakOperation<"create", CreateOperationData>; export type CreateMultipleOperation = OakOperation<"create", Array>; export type CreateOperation = CreateSingleOperation | CreateMultipleOperation; export type UpdateOperationData = FormUpdateData & { [k: string]: any; ship$shipCompany?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; shipCompanySystem$shipCompany?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; }; export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>; export type RemoveOperationData = {}; export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>; export type Operation = CreateOperation | UpdateOperation | RemoveOperation; export type ShipCompanyIdSubQuery = Selection; export type EntityDef = { Schema: Schema; OpSchema: OpSchema; Action: OakMakeAction | string; Selection: Selection; Aggregation: Aggregation; Operation: Operation; Create: CreateOperation; Update: UpdateOperation; Remove: RemoveOperation; CreateSingle: CreateSingleOperation; CreateMulti: CreateMultipleOperation; }; export {};