application feature/aspect原有的一些小bug
This commit is contained in:
parent
5223fe6d9a
commit
8afaf0c80e
|
|
@ -63,7 +63,7 @@ export async function getApplication(params, context) {
|
|||
// 先找指定domain的应用,如果不存在再找系统下面的domain, 但无论怎么样都必须一项
|
||||
//
|
||||
let applications = await context.select('application', {
|
||||
data: cloneDeep(applicationProjection),
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
@ -79,7 +79,7 @@ export async function getApplication(params, context) {
|
|||
assert(applications.length <= 1, `指定域名的应用 只能存在一项或未指定`);
|
||||
if (applications.length === 0) {
|
||||
applications = await context.select('application', {
|
||||
data: cloneDeep(applicationProjection),
|
||||
data: data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
@ -124,7 +124,7 @@ export async function getApplication(params, context) {
|
|||
assert(applications2.length <= 1, `指定域名的应用 只能存在一项或未指定`);
|
||||
if (applications2.length === 0) {
|
||||
applications2 = await context.select('application', {
|
||||
data: cloneDeep(applicationProjection),
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -129,7 +129,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -151,7 +151,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
|
|||
|
|
@ -1366,8 +1366,8 @@ export async function refreshToken(params, context) {
|
|||
// 只有server模式去刷新token
|
||||
// 'development' | 'production' | 'staging'
|
||||
const intervals = {
|
||||
development: 7200 * 1000, // 2小时
|
||||
staging: 600 * 1000, // 十分钟
|
||||
development: 7200 * 1000,
|
||||
staging: 600 * 1000,
|
||||
production: 600 * 1000, // 十分钟
|
||||
};
|
||||
const application = context.getApplication();
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ export async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { ReactComponentProps } from 'oak-frontend-base';
|
|||
import { ECode } from '../../../types/ErrorPage';
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
code: ECode;
|
||||
title?: string;
|
||||
desc?: string;
|
||||
title?: string | undefined;
|
||||
desc?: string | undefined;
|
||||
children?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default OakComponent({
|
|||
code: '',
|
||||
title: '',
|
||||
desc: '',
|
||||
icon: '', //web独有
|
||||
icon: '',
|
||||
imagePath: '', //小程序独有
|
||||
},
|
||||
lifetimes: {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default OakComponent({
|
|||
color: '#666',
|
||||
selectedColor: '',
|
||||
border: false,
|
||||
selectedIconPath: '', //一般在list设置
|
||||
selectedIconPath: '',
|
||||
iconPath: '',
|
||||
},
|
||||
lifetimes: {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Style } from '../../../../types/Style';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
|
||||
style: Style;
|
||||
entity: "application" | "system" | "platform";
|
||||
entity: "application" | "platform" | "system";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Config } from '../../../types/Config';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
config: Config;
|
||||
entity: "system" | "platform";
|
||||
entity: "platform" | "system";
|
||||
name: string;
|
||||
entityId: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
|
||||
|
|
@ -6,12 +7,29 @@ import { ButtonProps as AmButtonProps } from 'antd-mobile';
|
|||
type AfterCommit = (() => void) | undefined;
|
||||
type BeforeCommit = (() => boolean | undefined | Promise<boolean | undefined>) | undefined;
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
action?: string;
|
||||
action?: string | undefined;
|
||||
size?: ButtonProps['size'] | AmButtonProps['size'];
|
||||
block?: boolean;
|
||||
block?: boolean | undefined;
|
||||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string;
|
||||
buttonProps?: ButtonProps & AmButtonProps;
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "default" | "success" | "primary" | "warning" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "large" | "middle" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "reset" | "submit" | "button" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
} & import("react").AriaAttributes) | undefined;
|
||||
afterCommit?: AfterCommit;
|
||||
beforeCommit?: BeforeCommit;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ export default OakComponent({
|
|||
data: {
|
||||
isModalOpen: false,
|
||||
isModalOpen1: false,
|
||||
renderImgs: [], // 读取的原文图片,在modal使用
|
||||
renderImgs: [],
|
||||
methodsType: '',
|
||||
bridgeUrl: '', // 通过桥接方式获得的url
|
||||
bridgeUrl: '',
|
||||
selectedId: -1,
|
||||
},
|
||||
properties: {
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ export default OakComponent({
|
|||
},
|
||||
],
|
||||
properties: {
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
disablePreview: false,
|
||||
disableDownload: false,
|
||||
tag1: '',
|
||||
tag2: '',
|
||||
entity: '',
|
||||
|
|
|
|||
|
|
@ -48,19 +48,19 @@ export default OakComponent({
|
|||
bucket: '',
|
||||
autoUpload: false,
|
||||
maxNumber: 20,
|
||||
extension: [], //小程序独有 chooseMessageFile
|
||||
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
|
||||
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
|
||||
mediaType: ['image'], // 小程序独有 chooseMedia
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
showUploadList: true, //web独有
|
||||
showUploadProgress: false, // web独有
|
||||
accept: 'image/*', // web独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDelete: false, // 图片是否可删除
|
||||
disableAdd: false, // 上传按钮隐藏
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
extension: [],
|
||||
selectCount: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
showUploadList: true,
|
||||
showUploadProgress: false,
|
||||
accept: 'image/*',
|
||||
disablePreview: false,
|
||||
disableDelete: false,
|
||||
disableAdd: false,
|
||||
disableDownload: false,
|
||||
type: 'image',
|
||||
origin: 'qiniu',
|
||||
tag1: '',
|
||||
|
|
@ -144,7 +144,7 @@ export default OakComponent({
|
|||
type,
|
||||
tag1,
|
||||
tag2,
|
||||
objectId: generateNewId(), // 这个域用来标识唯一性
|
||||
objectId: generateNewId(),
|
||||
entity,
|
||||
filename,
|
||||
size,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default OakComponent({
|
|||
properties: {
|
||||
sessionId: '',
|
||||
isEntity: false,
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityDisplay: (data) => [],
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -136,12 +136,12 @@ export default OakComponent({
|
|||
selectedSessionId: '',
|
||||
},
|
||||
properties: {
|
||||
entity: '', // entity端,指示相应的entity
|
||||
entityFilter: null, // entity端,指示相应的entity查询条件
|
||||
entity: '',
|
||||
entityFilter: null,
|
||||
entityFilterSubStr: '',
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
sessionId: '', // 指示需要打开的默认session
|
||||
entityDisplay: (data) => [],
|
||||
entityProjection: null,
|
||||
sessionId: '',
|
||||
dialog: false,
|
||||
onItemClick: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export default OakComponent({
|
|||
dialog: false,
|
||||
entity: '',
|
||||
entityId: '',
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityDisplay: (data) => [],
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
},
|
||||
filters: [
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default OakComponent({
|
|||
});
|
||||
},
|
||||
data: {
|
||||
birthEnd: '', // for小程序的picker
|
||||
birthEnd: '',
|
||||
GenderOptions,
|
||||
IDCardTypeOptions,
|
||||
birthVisible: false,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "userEntityGrant", false, {
|
||||
picker: ((props: {
|
||||
disabled?: boolean;
|
||||
disabled?: boolean | undefined;
|
||||
entity: keyof EntityDict;
|
||||
entityFilter: object;
|
||||
relationIds: string[];
|
||||
|
|
@ -9,8 +9,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
ruleOnRow: EntityDict['userEntityGrant']['OpSchema']['ruleOnRow'];
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds?: string[];
|
||||
pickedRelationIds?: string[];
|
||||
pickedRowIds?: string[] | undefined;
|
||||
pickedRelationIds?: string[] | undefined;
|
||||
oakPath: string;
|
||||
}) => React.ReactElement) | undefined;
|
||||
hideInfo: boolean;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default OakComponent({
|
|||
id: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
type: 1, //类型
|
||||
type: 1,
|
||||
ticket: 1,
|
||||
url: 1,
|
||||
buffer: 1,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ReactComponentProps } from 'oak-frontend-base';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
redirectToAfterConfirm: ED2['userEntityGrant']['Schema']['redirectTo'];
|
||||
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
qrCodeType: string;
|
||||
showTitle: true;
|
||||
showBack: false;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
passwordRequire?: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
passwordRequire?: boolean | undefined;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ReactComponentProps } from 'oak-frontend-base';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
redirectToAfterConfirm: ED2['userEntityGrant']['Schema']['redirectTo'];
|
||||
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
qrCodeType: QrCodeType;
|
||||
type: EntityDict['userEntityGrant']['Schema']['type'];
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
redirectToAfterConfirm: ED2['userEntityGrant']['Schema']['redirectTo'];
|
||||
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
claimUrl: string;
|
||||
qrCodeType: string;
|
||||
passwordRequire?: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
passwordRequire?: boolean | undefined;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
type: "login" | "bind";
|
||||
type: "bind" | "login";
|
||||
url: string;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default OakComponent({
|
|||
id: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
type: 1, //类型
|
||||
type: 1,
|
||||
ticket: 1,
|
||||
url: 1,
|
||||
buffer: 1,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export default OakComponent({
|
|||
id: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
type: 1, //类型
|
||||
type: 1,
|
||||
ticket: 1,
|
||||
url: 1,
|
||||
expired: 1,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export default OakComponent({
|
|||
id: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
type: 1, //类型
|
||||
type: 1,
|
||||
ticket: 1,
|
||||
url: 1,
|
||||
buffer: 1,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ export declare abstract class FrontendRuntimeContext<ED extends EntityDict & Bas
|
|||
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
||||
protected getSerializedData(): Promise<SerializedData>;
|
||||
getApplicationId(): string | undefined;
|
||||
getSystemId(): string | undefined;
|
||||
getApplication(): Partial<import("../oak-app-domain/Application/Schema").Schema> | undefined;
|
||||
getSystemId(): ED["application"]["Schema"]["systemId"] | undefined;
|
||||
getApplication(): Partial<ED["application"]["Schema"]> | undefined;
|
||||
getTokenValue(allowUnloggedIn?: boolean): string | undefined;
|
||||
getToken(allowUnloggedIn?: boolean): Partial<ED["token"]["Schema"]> | undefined;
|
||||
getCurrentUserId(allowUnloggedIn?: boolean): string | undefined;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
import { String, Price } from 'oak-domain/lib/types/DataType';
|
||||
import { AbleAction, AbleState } from 'oak-domain/lib/actions/action';
|
||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
||||
import { ActionDef } from 'oak-domain/lib/types/Action';
|
||||
export interface Schema extends EntityShape {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: String<32>;
|
||||
entityId?: String<64>;
|
||||
}
|
||||
export type PayAction = 'charge' | 'withdraw' | 'cost' | 'refund' | 'loan' | 'repay';
|
||||
export type Action = AbleAction | PayAction;
|
||||
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
||||
export type Relation = 'owner' | 'audit';
|
||||
export declare const entityDesc: EntityDesc<Schema, Action, Relation, {
|
||||
ableState: AbleState;
|
||||
}>;
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
import { makeAbleActionDef } from 'oak-domain/lib/actions/action';
|
||||
;
|
||||
export const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const entityDesc = {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
name: '地址',
|
||||
attr: {
|
||||
ableState: '状态',
|
||||
total: '余额',
|
||||
avail: '可用余额',
|
||||
entity: '对象实体',
|
||||
entityId: '对象实体Id'
|
||||
},
|
||||
action: {
|
||||
charge: '充值',
|
||||
withdraw: '提现',
|
||||
cost: '支付',
|
||||
refund: '退款',
|
||||
loan: '抵押',
|
||||
repay: '归还',
|
||||
enable: '启用',
|
||||
disable: '禁用',
|
||||
},
|
||||
r: {
|
||||
owner: '所有者',
|
||||
audit: '审核者',
|
||||
},
|
||||
v: {
|
||||
ableState: {
|
||||
enabled: '正常',
|
||||
disabled: '冻结',
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
style: {
|
||||
icon: {
|
||||
charge: '',
|
||||
withdraw: '',
|
||||
cost: '',
|
||||
refund: '',
|
||||
loan: '',
|
||||
repay: '',
|
||||
enable: '',
|
||||
disable: '',
|
||||
},
|
||||
color: {
|
||||
ableState: {
|
||||
enabled: '#008000',
|
||||
disabled: '#A9A9A9'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -3,10 +3,10 @@ export const entityDesc = {
|
|||
zh_CN: {
|
||||
name: '直播流',
|
||||
attr: {
|
||||
title: '名称', // 用户定义直播间名称,
|
||||
title: '名称',
|
||||
streamTitle: '直播流名称',
|
||||
liveonly: '活跃状态',
|
||||
hub: '直播空间名称', // 所属直播空间名称
|
||||
hub: '直播空间名称',
|
||||
entity: '所属实体',
|
||||
entityId: '所属实体id',
|
||||
rtmpPushUrl: '推流地址',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { Schema as ExtraFile } from './ExtraFile';
|
|||
import { Schema as WechatQrCode } from './WechatQrCode';
|
||||
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
||||
import { Schema as Address } from './Address';
|
||||
import { Schema as Account } from './Account';
|
||||
import { Schema as User } from 'oak-domain/lib/entities/User';
|
||||
export interface Schema extends User {
|
||||
passwordSha1?: Text;
|
||||
|
|
@ -16,7 +15,6 @@ export interface Schema extends User {
|
|||
codes: Array<WechatQrCode>;
|
||||
isRoot?: Boolean;
|
||||
addresses?: Address[];
|
||||
accounts?: Account[];
|
||||
}
|
||||
export type IdAction = 'verify' | 'accept' | 'reject';
|
||||
export type IdState = 'unverified' | 'verified' | 'verifying';
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ export const entityDesc = {
|
|||
codes: '微信分享二维码',
|
||||
isRoot: '是否超级用户',
|
||||
addresses: '收货地址',
|
||||
accounts: '账户',
|
||||
},
|
||||
action: {
|
||||
activate: '激活',
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export declare class Application<ED extends EntityDict> extends Feature {
|
|||
private getApplicationFromCache;
|
||||
private loadApplicationInfo;
|
||||
initialize(domain: string, appId?: string | null, projection?: EntityDict['application']['Selection']['data']): Promise<void>;
|
||||
getApplication(): Partial<import("../oak-app-domain/Application/Schema").Schema> | undefined;
|
||||
getApplication(): Partial<ED["application"]["Schema"]> | undefined;
|
||||
getApplicationId(allowUnInitialized?: boolean): string | undefined;
|
||||
uploadWechatMedia(params: {
|
||||
applicationId: string;
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { AbleState, AbleAction } from "oak-domain/lib/actions/action";
|
||||
import { ActionDef } from "oak-domain/lib/types/Action";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
export type PayAction = 'charge' | 'withdraw' | 'cost' | 'refund' | 'loan' | 'repay' | string;
|
||||
export type ParticularAction = AbleAction | PayAction;
|
||||
export declare const actions: string[];
|
||||
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
||||
export type Action = GenericAction | ParticularAction | string;
|
||||
export declare const actionDefDict: {
|
||||
ableState: ActionDef<AbleAction, AbleState>;
|
||||
};
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
import { makeAbleActionDef } from "oak-domain/lib/actions/action";
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable", "charge", "withdraw", "cost", "refund", "loan", "repay"];
|
||||
export const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const actionDefDict = {
|
||||
ableState: AbleActionDef
|
||||
};
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, 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 { Action, ParticularAction } from "./Action";
|
||||
import { RelationAction } from "oak-domain/lib/actions/action";
|
||||
import { AbleState } from "oak-domain/lib/actions/action";
|
||||
import { Price, String } from "oak-domain/lib/types/DataType";
|
||||
import * as User from "../User/Schema";
|
||||
import * as Relation from "../Relation/Schema";
|
||||
import * as UserRelation from "../UserRelation/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: ("user" | string) | null;
|
||||
entityId?: String<64> | null;
|
||||
ableState?: AbleState | null;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: ("user" | string) | null;
|
||||
entityId?: String<64> | null;
|
||||
ableState?: AbleState | null;
|
||||
user?: User.Schema;
|
||||
relation$entity?: Array<Relation.Schema>;
|
||||
relation$entity$$aggr?: AggregationResult<Relation.Schema>;
|
||||
userRelation$entity?: Array<UserRelation.Schema>;
|
||||
userRelation$entity$$aggr?: AggregationResult<UserRelation.Schema>;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
type AttrFilter = {
|
||||
id: Q_StringValue;
|
||||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
total: Q_NumberValue;
|
||||
avail: Q_NumberValue;
|
||||
entity: Q_EnumValue<"user" | string>;
|
||||
entityId: Q_StringValue;
|
||||
ableState: Q_EnumValue<AbleState>;
|
||||
user: User.Filter;
|
||||
relation$entity: Relation.Filter & SubQueryPredicateMetadata;
|
||||
userRelation$entity: UserRelation.Filter & SubQueryPredicateMetadata;
|
||||
};
|
||||
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
||||
export type Projection = {
|
||||
"#id"?: NodeId;
|
||||
[k: string]: any;
|
||||
id?: number;
|
||||
$$createAt$$?: number;
|
||||
$$updateAt$$?: number;
|
||||
$$seq$$?: number;
|
||||
total?: number;
|
||||
avail?: number;
|
||||
entity?: number;
|
||||
entityId?: number;
|
||||
ableState?: number;
|
||||
user?: User.Projection;
|
||||
relation$entity?: Relation.Selection & {
|
||||
$entity: "relation";
|
||||
};
|
||||
relation$entity$$aggr?: Relation.Aggregation & {
|
||||
$entity: "relation";
|
||||
};
|
||||
userRelation$entity?: UserRelation.Selection & {
|
||||
$entity: "userRelation";
|
||||
};
|
||||
userRelation$entity$$aggr?: UserRelation.Aggregation & {
|
||||
$entity: "userRelation";
|
||||
};
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
id: number;
|
||||
}>;
|
||||
type UserIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
export type SortAttr = {
|
||||
id: number;
|
||||
} | {
|
||||
$$createAt$$: number;
|
||||
} | {
|
||||
$$seq$$: number;
|
||||
} | {
|
||||
$$updateAt$$: number;
|
||||
} | {
|
||||
total: number;
|
||||
} | {
|
||||
avail: number;
|
||||
} | {
|
||||
entity: number;
|
||||
} | {
|
||||
entityId: number;
|
||||
} | {
|
||||
ableState: number;
|
||||
} | {
|
||||
user: User.SortAttr;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
} | OneOf<ExprOp<OpAttr | string>>;
|
||||
export type SortNode = {
|
||||
$attr: SortAttr;
|
||||
$direction?: "asc" | "desc";
|
||||
};
|
||||
export type Sorter = SortNode[];
|
||||
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
||||
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
||||
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
||||
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
user?: User.CreateSingleOperation;
|
||||
} | {
|
||||
entity?: "user";
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: User.UpdateOperation;
|
||||
} | {
|
||||
entity?: "user";
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: never;
|
||||
} | {
|
||||
entity?: string;
|
||||
entityId?: string;
|
||||
[K: string]: any;
|
||||
}) & {
|
||||
relation$entity?: OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">> | OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">>>;
|
||||
userRelation$entity?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
||||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
||||
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: "user" | string;
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: never;
|
||||
}) & {
|
||||
[k: string]: any;
|
||||
relation$entity?: OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<Relation.RemoveOperation["action"], Omit<Relation.RemoveOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">> | OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<Relation.RemoveOperation["action"], Omit<Relation.RemoveOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">>>;
|
||||
userRelation$entity?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & ({
|
||||
user?: User.UpdateOperation | User.RemoveOperation;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
});
|
||||
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
||||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type UserIdSubQuery = Selection<UserIdProjection>;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type EntityDef = {
|
||||
Schema: Schema;
|
||||
OpSchema: OpSchema;
|
||||
Action: OakMakeAction<Action | RelationAction> | string;
|
||||
Selection: Selection;
|
||||
Aggregation: Aggregation;
|
||||
Operation: Operation;
|
||||
Create: CreateOperation;
|
||||
Update: UpdateOperation;
|
||||
Remove: RemoveOperation;
|
||||
CreateSingle: CreateSingleOperation;
|
||||
CreateMulti: CreateMultipleOperation;
|
||||
ParticularAction: ParticularAction;
|
||||
};
|
||||
export {};
|
||||
|
|
@ -1 +0,0 @@
|
|||
export {};
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import { StorageDesc } from "oak-domain/lib/types/Storage";
|
||||
import { OpSchema } from "./Schema";
|
||||
export declare const desc: StorageDesc<OpSchema>;
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import { actions } from "./Action";
|
||||
export const desc = {
|
||||
attributes: {
|
||||
total: {
|
||||
notNull: true,
|
||||
type: "money"
|
||||
},
|
||||
avail: {
|
||||
notNull: true,
|
||||
type: "money"
|
||||
},
|
||||
entity: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["user"]
|
||||
},
|
||||
entityId: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
}
|
||||
},
|
||||
ableState: {
|
||||
type: "enum",
|
||||
enumeration: ["enabled", "disabled"]
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
actions,
|
||||
relation: ["owner", "audit"]
|
||||
};
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import { EntityDef } from "./Schema";
|
||||
import { StyleDef } from "oak-domain/lib/types/Style";
|
||||
export declare const style: StyleDef<EntityDef["OpSchema"], EntityDef["Action"]>;
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
export const style = {
|
||||
icon: {
|
||||
charge: '',
|
||||
withdraw: '',
|
||||
cost: '',
|
||||
refund: '',
|
||||
loan: '',
|
||||
repay: '',
|
||||
enable: '',
|
||||
disable: '',
|
||||
},
|
||||
color: {
|
||||
ableState: {
|
||||
enabled: '#008000',
|
||||
disabled: '#A9A9A9'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{ "name": "地址", "attr": { "ableState": "状态", "total": "余额", "avail": "可用余额", "entity": "对象实体", "entityId": "对象实体Id" }, "action": { "charge": "充值", "withdraw": "提现", "cost": "支付", "refund": "退款", "loan": "抵押", "repay": "归还", "enable": "启用", "disable": "禁用" }, "r": { "owner": "所有者", "audit": "审核者" }, "v": { "ableState": { "enabled": "正常", "disabled": "冻结" } } }
|
||||
|
|
@ -2,9 +2,6 @@ export declare const actionDefDict: {
|
|||
modi: {
|
||||
iState: import("oak-domain/lib/types").ActionDef<string, string>;
|
||||
};
|
||||
account: {
|
||||
ableState: import("oak-domain/lib/types").ActionDef<import("oak-domain/lib/actions/action").AbleAction, import("oak-domain/lib/actions/action").AbleState>;
|
||||
};
|
||||
captcha: {
|
||||
iState: import("oak-domain/lib/types").ActionDef<string, string>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { actionDefDict as modi } from "./Modi/Action";
|
||||
import { actionDefDict as account } from "./Account/Action";
|
||||
import { actionDefDict as captcha } from "./Captcha/Action";
|
||||
import { actionDefDict as email } from "./Email/Action";
|
||||
import { actionDefDict as message } from "./Message/Action";
|
||||
|
|
@ -16,7 +15,6 @@ import { actionDefDict as wechatMenu } from "./WechatMenu/Action";
|
|||
import { actionDefDict as wechatPublicTag } from "./WechatPublicTag/Action";
|
||||
export const actionDefDict = {
|
||||
modi,
|
||||
account,
|
||||
captcha,
|
||||
email,
|
||||
message,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { EntityDef as User } from "./User/Schema";
|
|||
import { EntityDef as UserEntityClaim } from "./UserEntityClaim/Schema";
|
||||
import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
|
||||
import { EntityDef as UserRelation } from "./UserRelation/Schema";
|
||||
import { EntityDef as Account } from "./Account/Schema";
|
||||
import { EntityDef as Address } from "./Address/Schema";
|
||||
import { EntityDef as Application } from "./Application/Schema";
|
||||
import { EntityDef as Area } from "./Area/Schema";
|
||||
|
|
@ -67,7 +66,6 @@ export type EntityDict = {
|
|||
userEntityClaim: UserEntityClaim;
|
||||
userEntityGrant: UserEntityGrant;
|
||||
userRelation: UserRelation;
|
||||
account: Account;
|
||||
address: Address;
|
||||
application: Application;
|
||||
area: Area;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
export const relations = [
|
||||
{
|
||||
id: "account-owner",
|
||||
entity: "account",
|
||||
name: "owner"
|
||||
},
|
||||
{
|
||||
id: "account-audit",
|
||||
entity: "account",
|
||||
name: "audit"
|
||||
},
|
||||
{
|
||||
id: "session-partner",
|
||||
entity: "session",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ 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 Account from "../Account/Schema";
|
||||
import * as Session from "../Session/Schema";
|
||||
import * as ToDo from "../ToDo/Schema";
|
||||
import * as ActionAuth from "../ActionAuth/Schema";
|
||||
|
|
@ -12,18 +11,17 @@ import * as RelationAuth from "../RelationAuth/Schema";
|
|||
import * as UserEntityClaim from "../UserEntityClaim/Schema";
|
||||
import * as UserRelation from "../UserRelation/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
name?: String<32> | null;
|
||||
display?: String<32> | null;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
name?: String<32> | null;
|
||||
display?: String<32> | null;
|
||||
account?: Account.Schema;
|
||||
session?: Session.Schema;
|
||||
toDo?: ToDo.Schema;
|
||||
actionAuth$relation?: Array<ActionAuth.Schema>;
|
||||
|
|
@ -44,11 +42,10 @@ type AttrFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
entity: Q_EnumValue<"account" | "session" | "toDo" | string>;
|
||||
entity: Q_EnumValue<"session" | "toDo" | string>;
|
||||
entityId: Q_StringValue;
|
||||
name: Q_StringValue;
|
||||
display: Q_StringValue;
|
||||
account: Account.Filter;
|
||||
session: Session.Filter;
|
||||
toDo: ToDo.Filter;
|
||||
actionAuth$relation: ActionAuth.Filter & SubQueryPredicateMetadata;
|
||||
|
|
@ -69,7 +66,6 @@ export type Projection = {
|
|||
entityId?: number;
|
||||
name?: number;
|
||||
display?: number;
|
||||
account?: Account.Projection;
|
||||
session?: Session.Projection;
|
||||
toDo?: ToDo.Projection;
|
||||
actionAuth$relation?: ActionAuth.Selection & {
|
||||
|
|
@ -106,9 +102,6 @@ export type Projection = {
|
|||
type RelationIdProjection = OneOf<{
|
||||
id: number;
|
||||
}>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
type SessionIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
|
|
@ -131,8 +124,6 @@ export type SortAttr = {
|
|||
name: number;
|
||||
} | {
|
||||
display: number;
|
||||
} | {
|
||||
account: Account.SortAttr;
|
||||
} | {
|
||||
session: Session.SortAttr;
|
||||
} | {
|
||||
|
|
@ -149,18 +140,6 @@ export type SelectOperation<P extends Object = Projection> = OakSelection<"selec
|
|||
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
||||
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
||||
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
account?: Account.CreateSingleOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId?: ForeignKey<"Account">;
|
||||
account?: Account.UpdateOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId?: ForeignKey<"Account">;
|
||||
account?: never;
|
||||
} | {
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
session?: Session.CreateSingleOperation;
|
||||
|
|
@ -199,10 +178,6 @@ export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
||||
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
account?: Account.CreateSingleOperation | Account.UpdateOperation | Account.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
session?: Session.CreateSingleOperation | Session.UpdateOperation | Session.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
|
|
@ -211,9 +186,8 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: ("account" | "session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Account" | "Session" | "ToDo">;
|
||||
account?: never;
|
||||
entity?: ("session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Session" | "ToDo">;
|
||||
session?: never;
|
||||
toDo?: never;
|
||||
}) & {
|
||||
|
|
@ -226,8 +200,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
};
|
||||
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & ({
|
||||
account?: Account.UpdateOperation | Account.RemoveOperation;
|
||||
} | {
|
||||
session?: Session.UpdateOperation | Session.RemoveOperation;
|
||||
} | {
|
||||
toDo?: ToDo.UpdateOperation | ToDo.RemoveOperation;
|
||||
|
|
@ -236,7 +208,6 @@ export type RemoveOperationData = {} & ({
|
|||
});
|
||||
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
||||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type SessionIdSubQuery = Selection<SessionIdProjection>;
|
||||
export type ToDoIdSubQuery = Selection<ToDoIdProjection>;
|
||||
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export const desc = {
|
|||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["account", "session", "toDo"]
|
||||
ref: ["session", "toDo"]
|
||||
},
|
||||
entityId: {
|
||||
type: "varchar",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { desc as userDesc } from "./User/Storage";
|
|||
import { desc as userEntityClaimDesc } from "./UserEntityClaim/Storage";
|
||||
import { desc as userEntityGrantDesc } from "./UserEntityGrant/Storage";
|
||||
import { desc as userRelationDesc } from "./UserRelation/Storage";
|
||||
import { desc as accountDesc } from "./Account/Storage";
|
||||
import { desc as addressDesc } from "./Address/Storage";
|
||||
import { desc as applicationDesc } from "./Application/Storage";
|
||||
import { desc as areaDesc } from "./Area/Storage";
|
||||
|
|
@ -67,7 +66,6 @@ export const storageSchema = {
|
|||
userEntityClaim: userEntityClaimDesc,
|
||||
userEntityGrant: userEntityGrantDesc,
|
||||
userRelation: userRelationDesc,
|
||||
account: accountDesc,
|
||||
address: addressDesc,
|
||||
application: applicationDesc,
|
||||
area: areaDesc,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { style as modi } from "./Modi/Style";
|
||||
import { style as account } from "./Account/Style";
|
||||
import { style as application } from "./Application/Style";
|
||||
import { style as area } from "./Area/Style";
|
||||
import { style as captcha } from "./Captcha/Style";
|
||||
|
|
@ -24,7 +23,6 @@ import { style as wechatQrCode } from "./WechatQrCode/Style";
|
|||
import { style as wechatUser } from "./WechatUser/Style";
|
||||
export const styleDict = {
|
||||
modi,
|
||||
account,
|
||||
application,
|
||||
area,
|
||||
captcha,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import * as OperEntity from "../OperEntity/Schema";
|
|||
import * as ExtraFile from "../ExtraFile/Schema";
|
||||
import * as WechatQrCode from "../WechatQrCode/Schema";
|
||||
import * as Address from "../Address/Schema";
|
||||
import * as Account from "../Account/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
name?: String<16> | null;
|
||||
nickname?: String<64> | null;
|
||||
|
|
@ -102,8 +101,6 @@ export type Schema = EntityShape & {
|
|||
wechatQrCode$entity$$aggr?: AggregationResult<WechatQrCode.Schema>;
|
||||
address$entity?: Array<Address.Schema>;
|
||||
address$entity$$aggr?: AggregationResult<Address.Schema>;
|
||||
account$entity?: Array<Account.Schema>;
|
||||
account$entity$$aggr?: AggregationResult<Account.Schema>;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -148,7 +145,6 @@ type AttrFilter = {
|
|||
extraFile$entity: ExtraFile.Filter & SubQueryPredicateMetadata;
|
||||
wechatQrCode$entity: WechatQrCode.Filter & SubQueryPredicateMetadata;
|
||||
address$entity: Address.Filter & SubQueryPredicateMetadata;
|
||||
account$entity: Account.Filter & SubQueryPredicateMetadata;
|
||||
};
|
||||
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string> & FulltextFilter>;
|
||||
export type Projection = {
|
||||
|
|
@ -309,12 +305,6 @@ export type Projection = {
|
|||
address$entity$$aggr?: Address.Aggregation & {
|
||||
$entity: "address";
|
||||
};
|
||||
account$entity?: Account.Selection & {
|
||||
$entity: "account";
|
||||
};
|
||||
account$entity$$aggr?: Account.Aggregation & {
|
||||
$entity: "account";
|
||||
};
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
type UserIdProjection = OneOf<{
|
||||
id: number;
|
||||
|
|
@ -398,7 +388,6 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
|
|||
extraFile$entity?: OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">> | OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">>>;
|
||||
wechatQrCode$entity?: OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">> | OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">>>;
|
||||
address$entity?: OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">> | OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">>>;
|
||||
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
||||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
|
|
@ -440,7 +429,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
|
|||
extraFile$entity?: OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<ExtraFile.RemoveOperation["action"], Omit<ExtraFile.RemoveOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">> | OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<ExtraFile.RemoveOperation["action"], Omit<ExtraFile.RemoveOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">>>;
|
||||
wechatQrCode$entity?: OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<WechatQrCode.RemoveOperation["action"], Omit<WechatQrCode.RemoveOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">> | OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<WechatQrCode.RemoveOperation["action"], Omit<WechatQrCode.RemoveOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">>>;
|
||||
address$entity?: OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<Address.RemoveOperation["action"], Omit<Address.RemoveOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">> | OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<Address.RemoveOperation["action"], Omit<Address.RemoveOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">>>;
|
||||
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & (({
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "用户", "attr": { "name": "姓名", "nickname": "昵称", "birth": "生日", "password": "密码", "passwordSha1": "sha1加密密码", "gender": "性别", "idCardType": "证件类型", "idNumber": "证件号码", "ref": "指向用户", "files": "相关文件", "userState": "用户状态", "idState": "身份验证状态", "codes": "微信分享二维码", "isRoot": "是否超级用户", "addresses": "收货地址", "accounts": "账户" }, "action": { "activate": "激活", "accept": "同意", "verify": "验证", "reject": "拒绝", "enable": "启用", "disable": "禁用", "mergeTo": "合并", "mergeFrom": "使合并" }, "v": { "userState": { "shadow": "未激活", "normal": "正常", "disabled": "禁用", "merged": "已被合并" }, "idState": { "unverified": "未验证", "verifying": "验证中", "verified": "已验证" }, "gender": { "male": "男", "female": "女" }, "idCardType": { "ID-Card": "身份证", "passport": "护照", "Mainland-passport": "港澳台通行证" } } }
|
||||
{ "name": "用户", "attr": { "name": "姓名", "nickname": "昵称", "birth": "生日", "password": "密码", "passwordSha1": "sha1加密密码", "gender": "性别", "idCardType": "证件类型", "idNumber": "证件号码", "ref": "指向用户", "files": "相关文件", "userState": "用户状态", "idState": "身份验证状态", "codes": "微信分享二维码", "isRoot": "是否超级用户", "addresses": "收货地址" }, "action": { "activate": "激活", "accept": "同意", "verify": "验证", "reject": "拒绝", "enable": "启用", "disable": "禁用", "mergeTo": "合并", "mergeFrom": "使合并" }, "v": { "userState": { "shadow": "未激活", "normal": "正常", "disabled": "禁用", "merged": "已被合并" }, "idState": { "unverified": "未验证", "verifying": "验证中", "verified": "已验证" }, "gender": { "male": "男", "female": "女" }, "idCardType": { "ID-Card": "身份证", "passport": "护照", "Mainland-passport": "港澳台通行证" } } }
|
||||
|
|
|
|||
|
|
@ -6,25 +6,23 @@ import { GenericAction } from "oak-domain/lib/actions/action";
|
|||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import * as User from "../User/Schema";
|
||||
import * as Relation from "../Relation/Schema";
|
||||
import * as Account from "../Account/Schema";
|
||||
import * as Session from "../Session/Schema";
|
||||
import * as ToDo from "../ToDo/Schema";
|
||||
import * as UserEntityClaim from "../UserEntityClaim/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId: String<64>;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId: String<64>;
|
||||
user: User.Schema;
|
||||
relation: Relation.Schema;
|
||||
account?: Account.Schema;
|
||||
session?: Session.Schema;
|
||||
toDo?: ToDo.Schema;
|
||||
userEntityClaim$userRelation?: Array<UserEntityClaim.Schema>;
|
||||
|
|
@ -41,9 +39,8 @@ type AttrFilter = {
|
|||
user: User.Filter;
|
||||
relationId: Q_StringValue;
|
||||
relation: Relation.Filter;
|
||||
entity: Q_EnumValue<"account" | "session" | "toDo" | string>;
|
||||
entity: Q_EnumValue<"session" | "toDo" | string>;
|
||||
entityId: Q_StringValue;
|
||||
account: Account.Filter;
|
||||
session: Session.Filter;
|
||||
toDo: ToDo.Filter;
|
||||
userEntityClaim$userRelation: UserEntityClaim.Filter & SubQueryPredicateMetadata;
|
||||
|
|
@ -62,7 +59,6 @@ export type Projection = {
|
|||
relation?: Relation.Projection;
|
||||
entity?: number;
|
||||
entityId?: number;
|
||||
account?: Account.Projection;
|
||||
session?: Session.Projection;
|
||||
toDo?: ToDo.Projection;
|
||||
userEntityClaim$userRelation?: UserEntityClaim.Selection & {
|
||||
|
|
@ -81,9 +77,6 @@ type UserIdProjection = OneOf<{
|
|||
type RelationIdProjection = OneOf<{
|
||||
relationId: number;
|
||||
}>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
type SessionIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
|
|
@ -110,8 +103,6 @@ export type SortAttr = {
|
|||
entity: number;
|
||||
} | {
|
||||
entityId: number;
|
||||
} | {
|
||||
account: Account.SortAttr;
|
||||
} | {
|
||||
session: Session.SortAttr;
|
||||
} | {
|
||||
|
|
@ -146,18 +137,6 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|||
relation?: never;
|
||||
relationId: ForeignKey<"relation">;
|
||||
})) & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
account: Account.CreateSingleOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId: ForeignKey<"Account">;
|
||||
account?: Account.UpdateOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId: ForeignKey<"Account">;
|
||||
account?: never;
|
||||
} | {
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
session: Session.CreateSingleOperation;
|
||||
|
|
@ -216,10 +195,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
relation?: never;
|
||||
relationId?: ForeignKey<"relation">;
|
||||
})) & ({
|
||||
account?: Account.CreateSingleOperation | Account.UpdateOperation | Account.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
session?: Session.CreateSingleOperation | Session.UpdateOperation | Session.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
|
|
@ -228,9 +203,8 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: ("account" | "session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Account" | "Session" | "ToDo"> | null;
|
||||
account?: never;
|
||||
entity?: ("session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Session" | "ToDo"> | null;
|
||||
session?: never;
|
||||
toDo?: never;
|
||||
}) & {
|
||||
|
|
@ -243,8 +217,6 @@ export type RemoveOperationData = {} & (({
|
|||
}) & ({
|
||||
relation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
||||
})) & ({
|
||||
account?: Account.UpdateOperation | Account.RemoveOperation;
|
||||
} | {
|
||||
session?: Session.UpdateOperation | Session.RemoveOperation;
|
||||
} | {
|
||||
toDo?: ToDo.UpdateOperation | ToDo.RemoveOperation;
|
||||
|
|
@ -255,7 +227,6 @@ export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter
|
|||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type UserIdSubQuery = Selection<UserIdProjection>;
|
||||
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type SessionIdSubQuery = Selection<SessionIdProjection>;
|
||||
export type ToDoIdSubQuery = Selection<ToDoIdProjection>;
|
||||
export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export const desc = {
|
|||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["account", "session", "toDo"]
|
||||
ref: ["session", "toDo"]
|
||||
},
|
||||
entityId: {
|
||||
notNull: true,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import * as User from "./User/Schema";
|
|||
import * as UserEntityClaim from "./UserEntityClaim/Schema";
|
||||
import * as UserEntityGrant from "./UserEntityGrant/Schema";
|
||||
import * as UserRelation from "./UserRelation/Schema";
|
||||
import * as Account from "./Account/Schema";
|
||||
import * as Address from "./Address/Schema";
|
||||
import * as Application from "./Application/Schema";
|
||||
import * as Area from "./Area/Schema";
|
||||
|
|
@ -159,8 +158,6 @@ export type UserIdSubQuery = {
|
|||
entity: "wechatQrCode";
|
||||
}) | (Address.UserIdSubQuery & {
|
||||
entity: "address";
|
||||
}) | (Account.UserIdSubQuery & {
|
||||
entity: "account";
|
||||
}) | (User.UserIdSubQuery & {
|
||||
entity: "user";
|
||||
}) | any;
|
||||
|
|
@ -190,15 +187,6 @@ export type UserRelationIdSubQuery = {
|
|||
entity: "userRelation";
|
||||
}) | any;
|
||||
};
|
||||
export type AccountIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Relation.AccountIdSubQuery & {
|
||||
entity: "relation";
|
||||
}) | (UserRelation.AccountIdSubQuery & {
|
||||
entity: "userRelation";
|
||||
}) | (Account.AccountIdSubQuery & {
|
||||
entity: "account";
|
||||
}) | any;
|
||||
};
|
||||
export type AddressIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Address.AddressIdSubQuery & {
|
||||
entity: "address";
|
||||
|
|
|
|||
|
|
@ -1,5 +1 @@
|
|||
import { EntityDict } from '../oak-app-domain/EntityDict';
|
||||
import { Trigger } from 'oak-domain/lib/types';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
declare const triggers: Trigger<EntityDict, 'account', BRC<EntityDict>>[];
|
||||
export default triggers;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,16 +1,21 @@
|
|||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
const triggers = [
|
||||
export {};
|
||||
/* const triggers: Trigger<
|
||||
EntityDict,
|
||||
'account',
|
||||
BRC<EntityDict>
|
||||
>[] = [
|
||||
// 目前先这样授予关系
|
||||
{
|
||||
name: '充值的时候,将用户赋予owner关系',
|
||||
entity: 'account',
|
||||
action: 'create',
|
||||
when: 'before',
|
||||
fn: async (event, context) => {
|
||||
const { operation: { data, filter }, } = event;
|
||||
fn: async (event: any, context: any) => {
|
||||
const {
|
||||
operation: { data, filter },
|
||||
} = event;
|
||||
assert(!(data instanceof Array));
|
||||
const accountId = data.id;
|
||||
const accountId = data.id!;
|
||||
const [relation] = await context.select('relation', {
|
||||
data: {
|
||||
id: 1,
|
||||
|
|
@ -23,9 +28,12 @@ const triggers = [
|
|||
}
|
||||
}
|
||||
}, { dontCollect: true });
|
||||
|
||||
assert(relation);
|
||||
const closeRootMode = context.openRootMode();
|
||||
await context.operate('userRelation', {
|
||||
await context.operate(
|
||||
'userRelation',
|
||||
{
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'create',
|
||||
data: {
|
||||
|
|
@ -33,12 +41,14 @@ const triggers = [
|
|||
relationId: relation.id,
|
||||
userId: context.getCurrentUserId(),
|
||||
entity: 'account',
|
||||
entityId: accountId,
|
||||
entityId: accountId!,
|
||||
} as EntityDict['userRelation']['CreateSingle']['data'],
|
||||
},
|
||||
}, {});
|
||||
{}
|
||||
);
|
||||
closeRootMode();
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
];
|
||||
export default triggers;
|
||||
];
|
||||
export default triggers; */
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ import sessionMessageTriggers from './sessionMessage';
|
|||
import wechatMenuTriggers from './wechatMenu';
|
||||
import wechatPublicTag from './wechatPublicTag';
|
||||
import wechatMpJump from './wechatMpJump';
|
||||
import accountTriggers from './account';
|
||||
// import accountTriggers from './account';
|
||||
export default [
|
||||
...accountTriggers,
|
||||
// ...accountTriggers,
|
||||
...applicationTriggers,
|
||||
...addressTriggers,
|
||||
...userTriggers,
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ async function sendNotification(notification, context) {
|
|||
await instance.sendSubscribedMessage({
|
||||
templateId: templateId,
|
||||
data: data,
|
||||
openId: data1.openId, // 在notification创建时就赋值了
|
||||
openId: data1.openId,
|
||||
page,
|
||||
state: StateDict[process.env.NODE_ENV],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ async function getApplication(params, context) {
|
|||
// 先找指定domain的应用,如果不存在再找系统下面的domain, 但无论怎么样都必须一项
|
||||
//
|
||||
let applications = await context.select('application', {
|
||||
data: (0, lodash_1.cloneDeep)(Projection_1.applicationProjection),
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
@ -83,7 +83,7 @@ async function getApplication(params, context) {
|
|||
(0, assert_1.assert)(applications.length <= 1, `指定域名的应用 只能存在一项或未指定`);
|
||||
if (applications.length === 0) {
|
||||
applications = await context.select('application', {
|
||||
data: (0, lodash_1.cloneDeep)(Projection_1.applicationProjection),
|
||||
data: data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
@ -128,7 +128,7 @@ async function getApplication(params, context) {
|
|||
(0, assert_1.assert)(applications2.length <= 1, `指定域名的应用 只能存在一项或未指定`);
|
||||
if (applications2.length === 0) {
|
||||
applications2 = await context.select('application', {
|
||||
data: (0, lodash_1.cloneDeep)(Projection_1.applicationProjection),
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
system: {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -132,7 +132,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -154,7 +154,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
|
|||
|
|
@ -1381,8 +1381,8 @@ async function refreshToken(params, context) {
|
|||
// 只有server模式去刷新token
|
||||
// 'development' | 'production' | 'staging'
|
||||
const intervals = {
|
||||
development: 7200 * 1000, // 2小时
|
||||
staging: 600 * 1000, // 十分钟
|
||||
development: 7200 * 1000,
|
||||
staging: 600 * 1000,
|
||||
production: 600 * 1000, // 十分钟
|
||||
};
|
||||
const application = context.getApplication();
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ export declare abstract class FrontendRuntimeContext<ED extends EntityDict & Bas
|
|||
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
||||
protected getSerializedData(): Promise<SerializedData>;
|
||||
getApplicationId(): string | undefined;
|
||||
getSystemId(): string | undefined;
|
||||
getApplication(): Partial<import("../oak-app-domain/Application/Schema").Schema> | undefined;
|
||||
getSystemId(): ED["application"]["Schema"]["systemId"] | undefined;
|
||||
getApplication(): Partial<ED["application"]["Schema"]> | undefined;
|
||||
getTokenValue(allowUnloggedIn?: boolean): string | undefined;
|
||||
getToken(allowUnloggedIn?: boolean): Partial<ED["token"]["Schema"]> | undefined;
|
||||
getCurrentUserId(allowUnloggedIn?: boolean): string | undefined;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
import { String, Price } from 'oak-domain/lib/types/DataType';
|
||||
import { AbleAction, AbleState } from 'oak-domain/lib/actions/action';
|
||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
||||
import { ActionDef } from 'oak-domain/lib/types/Action';
|
||||
export interface Schema extends EntityShape {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: String<32>;
|
||||
entityId?: String<64>;
|
||||
}
|
||||
export type PayAction = 'charge' | 'withdraw' | 'cost' | 'refund' | 'loan' | 'repay';
|
||||
export type Action = AbleAction | PayAction;
|
||||
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
||||
export type Relation = 'owner' | 'audit';
|
||||
export declare const entityDesc: EntityDesc<Schema, Action, Relation, {
|
||||
ableState: AbleState;
|
||||
}>;
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.entityDesc = exports.AbleActionDef = void 0;
|
||||
const action_1 = require("oak-domain/lib/actions/action");
|
||||
;
|
||||
exports.AbleActionDef = (0, action_1.makeAbleActionDef)('enabled');
|
||||
exports.entityDesc = {
|
||||
locales: {
|
||||
zh_CN: {
|
||||
name: '地址',
|
||||
attr: {
|
||||
ableState: '状态',
|
||||
total: '余额',
|
||||
avail: '可用余额',
|
||||
entity: '对象实体',
|
||||
entityId: '对象实体Id'
|
||||
},
|
||||
action: {
|
||||
charge: '充值',
|
||||
withdraw: '提现',
|
||||
cost: '支付',
|
||||
refund: '退款',
|
||||
loan: '抵押',
|
||||
repay: '归还',
|
||||
enable: '启用',
|
||||
disable: '禁用',
|
||||
},
|
||||
r: {
|
||||
owner: '所有者',
|
||||
audit: '审核者',
|
||||
},
|
||||
v: {
|
||||
ableState: {
|
||||
enabled: '正常',
|
||||
disabled: '冻结',
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
style: {
|
||||
icon: {
|
||||
charge: '',
|
||||
withdraw: '',
|
||||
cost: '',
|
||||
refund: '',
|
||||
loan: '',
|
||||
repay: '',
|
||||
enable: '',
|
||||
disable: '',
|
||||
},
|
||||
color: {
|
||||
ableState: {
|
||||
enabled: '#008000',
|
||||
disabled: '#A9A9A9'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -6,10 +6,10 @@ exports.entityDesc = {
|
|||
zh_CN: {
|
||||
name: '直播流',
|
||||
attr: {
|
||||
title: '名称', // 用户定义直播间名称,
|
||||
title: '名称',
|
||||
streamTitle: '直播流名称',
|
||||
liveonly: '活跃状态',
|
||||
hub: '直播空间名称', // 所属直播空间名称
|
||||
hub: '直播空间名称',
|
||||
entity: '所属实体',
|
||||
entityId: '所属实体id',
|
||||
rtmpPushUrl: '推流地址',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { Schema as ExtraFile } from './ExtraFile';
|
|||
import { Schema as WechatQrCode } from './WechatQrCode';
|
||||
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
||||
import { Schema as Address } from './Address';
|
||||
import { Schema as Account } from './Account';
|
||||
import { Schema as User } from 'oak-domain/lib/entities/User';
|
||||
export interface Schema extends User {
|
||||
passwordSha1?: Text;
|
||||
|
|
@ -16,7 +15,6 @@ export interface Schema extends User {
|
|||
codes: Array<WechatQrCode>;
|
||||
isRoot?: Boolean;
|
||||
addresses?: Address[];
|
||||
accounts?: Account[];
|
||||
}
|
||||
export type IdAction = 'verify' | 'accept' | 'reject';
|
||||
export type IdState = 'unverified' | 'verified' | 'verifying';
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ exports.entityDesc = {
|
|||
codes: '微信分享二维码',
|
||||
isRoot: '是否超级用户',
|
||||
addresses: '收货地址',
|
||||
accounts: '账户',
|
||||
},
|
||||
action: {
|
||||
activate: '激活',
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export declare class Application<ED extends EntityDict> extends Feature {
|
|||
private getApplicationFromCache;
|
||||
private loadApplicationInfo;
|
||||
initialize(domain: string, appId?: string | null, projection?: EntityDict['application']['Selection']['data']): Promise<void>;
|
||||
getApplication(): Partial<import("../oak-app-domain/Application/Schema").Schema> | undefined;
|
||||
getApplication(): Partial<ED["application"]["Schema"]> | undefined;
|
||||
getApplicationId(allowUnInitialized?: boolean): string | undefined;
|
||||
uploadWechatMedia(params: {
|
||||
applicationId: string;
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { AbleState, AbleAction } from "oak-domain/lib/actions/action";
|
||||
import { ActionDef } from "oak-domain/lib/types/Action";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
export type PayAction = 'charge' | 'withdraw' | 'cost' | 'refund' | 'loan' | 'repay' | string;
|
||||
export type ParticularAction = AbleAction | PayAction;
|
||||
export declare const actions: string[];
|
||||
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
||||
export type Action = GenericAction | ParticularAction | string;
|
||||
export declare const actionDefDict: {
|
||||
ableState: ActionDef<AbleAction, AbleState>;
|
||||
};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.actionDefDict = exports.AbleActionDef = exports.actions = void 0;
|
||||
const action_1 = require("oak-domain/lib/actions/action");
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable", "charge", "withdraw", "cost", "refund", "loan", "repay"];
|
||||
exports.AbleActionDef = (0, action_1.makeAbleActionDef)('enabled');
|
||||
exports.actionDefDict = {
|
||||
ableState: exports.AbleActionDef
|
||||
};
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, 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 { Action, ParticularAction } from "./Action";
|
||||
import { RelationAction } from "oak-domain/lib/actions/action";
|
||||
import { AbleState } from "oak-domain/lib/actions/action";
|
||||
import { Price, String } from "oak-domain/lib/types/DataType";
|
||||
import * as User from "../User/Schema";
|
||||
import * as Relation from "../Relation/Schema";
|
||||
import * as UserRelation from "../UserRelation/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: ("user" | string) | null;
|
||||
entityId?: String<64> | null;
|
||||
ableState?: AbleState | null;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
total: Price;
|
||||
avail: Price;
|
||||
entity?: ("user" | string) | null;
|
||||
entityId?: String<64> | null;
|
||||
ableState?: AbleState | null;
|
||||
user?: User.Schema;
|
||||
relation$entity?: Array<Relation.Schema>;
|
||||
relation$entity$$aggr?: AggregationResult<Relation.Schema>;
|
||||
userRelation$entity?: Array<UserRelation.Schema>;
|
||||
userRelation$entity$$aggr?: AggregationResult<UserRelation.Schema>;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
type AttrFilter = {
|
||||
id: Q_StringValue;
|
||||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
total: Q_NumberValue;
|
||||
avail: Q_NumberValue;
|
||||
entity: Q_EnumValue<"user" | string>;
|
||||
entityId: Q_StringValue;
|
||||
ableState: Q_EnumValue<AbleState>;
|
||||
user: User.Filter;
|
||||
relation$entity: Relation.Filter & SubQueryPredicateMetadata;
|
||||
userRelation$entity: UserRelation.Filter & SubQueryPredicateMetadata;
|
||||
};
|
||||
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
||||
export type Projection = {
|
||||
"#id"?: NodeId;
|
||||
[k: string]: any;
|
||||
id?: number;
|
||||
$$createAt$$?: number;
|
||||
$$updateAt$$?: number;
|
||||
$$seq$$?: number;
|
||||
total?: number;
|
||||
avail?: number;
|
||||
entity?: number;
|
||||
entityId?: number;
|
||||
ableState?: number;
|
||||
user?: User.Projection;
|
||||
relation$entity?: Relation.Selection & {
|
||||
$entity: "relation";
|
||||
};
|
||||
relation$entity$$aggr?: Relation.Aggregation & {
|
||||
$entity: "relation";
|
||||
};
|
||||
userRelation$entity?: UserRelation.Selection & {
|
||||
$entity: "userRelation";
|
||||
};
|
||||
userRelation$entity$$aggr?: UserRelation.Aggregation & {
|
||||
$entity: "userRelation";
|
||||
};
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
id: number;
|
||||
}>;
|
||||
type UserIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
export type SortAttr = {
|
||||
id: number;
|
||||
} | {
|
||||
$$createAt$$: number;
|
||||
} | {
|
||||
$$seq$$: number;
|
||||
} | {
|
||||
$$updateAt$$: number;
|
||||
} | {
|
||||
total: number;
|
||||
} | {
|
||||
avail: number;
|
||||
} | {
|
||||
entity: number;
|
||||
} | {
|
||||
entityId: number;
|
||||
} | {
|
||||
ableState: number;
|
||||
} | {
|
||||
user: User.SortAttr;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
} | OneOf<ExprOp<OpAttr | string>>;
|
||||
export type SortNode = {
|
||||
$attr: SortAttr;
|
||||
$direction?: "asc" | "desc";
|
||||
};
|
||||
export type Sorter = SortNode[];
|
||||
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
||||
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
||||
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
||||
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
user?: User.CreateSingleOperation;
|
||||
} | {
|
||||
entity?: "user";
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: User.UpdateOperation;
|
||||
} | {
|
||||
entity?: "user";
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: never;
|
||||
} | {
|
||||
entity?: string;
|
||||
entityId?: string;
|
||||
[K: string]: any;
|
||||
}) & {
|
||||
relation$entity?: OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">> | OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">>>;
|
||||
userRelation$entity?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
||||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
||||
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: "user" | string;
|
||||
entityId?: ForeignKey<"User">;
|
||||
user?: never;
|
||||
}) & {
|
||||
[k: string]: any;
|
||||
relation$entity?: OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<Relation.RemoveOperation["action"], Omit<Relation.RemoveOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Relation.CreateOperationData, "entity" | "entityId">> | OakOperation<Relation.UpdateOperation["action"], Omit<Relation.UpdateOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">> | OakOperation<Relation.RemoveOperation["action"], Omit<Relation.RemoveOperationData, "entity" | "entityId">, Omit<Relation.Filter, "entity" | "entityId">>>;
|
||||
userRelation$entity?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "entity" | "entityId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "entity" | "entityId">, Omit<UserRelation.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & ({
|
||||
user?: User.UpdateOperation | User.RemoveOperation;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
});
|
||||
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
||||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type UserIdSubQuery = Selection<UserIdProjection>;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type EntityDef = {
|
||||
Schema: Schema;
|
||||
OpSchema: OpSchema;
|
||||
Action: OakMakeAction<Action | RelationAction> | string;
|
||||
Selection: Selection;
|
||||
Aggregation: Aggregation;
|
||||
Operation: Operation;
|
||||
Create: CreateOperation;
|
||||
Update: UpdateOperation;
|
||||
Remove: RemoveOperation;
|
||||
CreateSingle: CreateSingleOperation;
|
||||
CreateMulti: CreateMultipleOperation;
|
||||
ParticularAction: ParticularAction;
|
||||
};
|
||||
export {};
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import { StorageDesc } from "oak-domain/lib/types/Storage";
|
||||
import { OpSchema } from "./Schema";
|
||||
export declare const desc: StorageDesc<OpSchema>;
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.desc = void 0;
|
||||
const Action_1 = require("./Action");
|
||||
exports.desc = {
|
||||
attributes: {
|
||||
total: {
|
||||
notNull: true,
|
||||
type: "money"
|
||||
},
|
||||
avail: {
|
||||
notNull: true,
|
||||
type: "money"
|
||||
},
|
||||
entity: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["user"]
|
||||
},
|
||||
entityId: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
}
|
||||
},
|
||||
ableState: {
|
||||
type: "enum",
|
||||
enumeration: ["enabled", "disabled"]
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
actions: Action_1.actions,
|
||||
relation: ["owner", "audit"]
|
||||
};
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import { EntityDef } from "./Schema";
|
||||
import { StyleDef } from "oak-domain/lib/types/Style";
|
||||
export declare const style: StyleDef<EntityDef["OpSchema"], EntityDef["Action"]>;
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.style = void 0;
|
||||
exports.style = {
|
||||
icon: {
|
||||
charge: '',
|
||||
withdraw: '',
|
||||
cost: '',
|
||||
refund: '',
|
||||
loan: '',
|
||||
repay: '',
|
||||
enable: '',
|
||||
disable: '',
|
||||
},
|
||||
color: {
|
||||
ableState: {
|
||||
enabled: '#008000',
|
||||
disabled: '#A9A9A9'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{ "name": "地址", "attr": { "ableState": "状态", "total": "余额", "avail": "可用余额", "entity": "对象实体", "entityId": "对象实体Id" }, "action": { "charge": "充值", "withdraw": "提现", "cost": "支付", "refund": "退款", "loan": "抵押", "repay": "归还", "enable": "启用", "disable": "禁用" }, "r": { "owner": "所有者", "audit": "审核者" }, "v": { "ableState": { "enabled": "正常", "disabled": "冻结" } } }
|
||||
|
|
@ -2,9 +2,6 @@ export declare const actionDefDict: {
|
|||
modi: {
|
||||
iState: import("oak-domain/lib/types").ActionDef<string, string>;
|
||||
};
|
||||
account: {
|
||||
ableState: import("oak-domain/lib/types").ActionDef<import("oak-domain/lib/actions/action").AbleAction, import("oak-domain/lib/actions/action").AbleState>;
|
||||
};
|
||||
captcha: {
|
||||
iState: import("oak-domain/lib/types").ActionDef<string, string>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,36 +2,34 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.actionDefDict = void 0;
|
||||
const Action_1 = require("./Modi/Action");
|
||||
const Action_2 = require("./Account/Action");
|
||||
const Action_3 = require("./Captcha/Action");
|
||||
const Action_4 = require("./Email/Action");
|
||||
const Action_5 = require("./Message/Action");
|
||||
const Action_6 = require("./Mobile/Action");
|
||||
const Action_7 = require("./Notification/Action");
|
||||
const Action_8 = require("./Parasite/Action");
|
||||
const Action_9 = require("./ToDo/Action");
|
||||
const Action_10 = require("./Token/Action");
|
||||
const Action_11 = require("./User/Action");
|
||||
const Action_12 = require("./UserEntityGrant/Action");
|
||||
const Action_13 = require("./UserWechatPublicTag/Action");
|
||||
const Action_14 = require("./WechatLogin/Action");
|
||||
const Action_15 = require("./WechatMenu/Action");
|
||||
const Action_16 = require("./WechatPublicTag/Action");
|
||||
const Action_2 = require("./Captcha/Action");
|
||||
const Action_3 = require("./Email/Action");
|
||||
const Action_4 = require("./Message/Action");
|
||||
const Action_5 = require("./Mobile/Action");
|
||||
const Action_6 = require("./Notification/Action");
|
||||
const Action_7 = require("./Parasite/Action");
|
||||
const Action_8 = require("./ToDo/Action");
|
||||
const Action_9 = require("./Token/Action");
|
||||
const Action_10 = require("./User/Action");
|
||||
const Action_11 = require("./UserEntityGrant/Action");
|
||||
const Action_12 = require("./UserWechatPublicTag/Action");
|
||||
const Action_13 = require("./WechatLogin/Action");
|
||||
const Action_14 = require("./WechatMenu/Action");
|
||||
const Action_15 = require("./WechatPublicTag/Action");
|
||||
exports.actionDefDict = {
|
||||
modi: Action_1.actionDefDict,
|
||||
account: Action_2.actionDefDict,
|
||||
captcha: Action_3.actionDefDict,
|
||||
email: Action_4.actionDefDict,
|
||||
message: Action_5.actionDefDict,
|
||||
mobile: Action_6.actionDefDict,
|
||||
notification: Action_7.actionDefDict,
|
||||
parasite: Action_8.actionDefDict,
|
||||
toDo: Action_9.actionDefDict,
|
||||
token: Action_10.actionDefDict,
|
||||
user: Action_11.actionDefDict,
|
||||
userEntityGrant: Action_12.actionDefDict,
|
||||
userWechatPublicTag: Action_13.actionDefDict,
|
||||
wechatLogin: Action_14.actionDefDict,
|
||||
wechatMenu: Action_15.actionDefDict,
|
||||
wechatPublicTag: Action_16.actionDefDict
|
||||
captcha: Action_2.actionDefDict,
|
||||
email: Action_3.actionDefDict,
|
||||
message: Action_4.actionDefDict,
|
||||
mobile: Action_5.actionDefDict,
|
||||
notification: Action_6.actionDefDict,
|
||||
parasite: Action_7.actionDefDict,
|
||||
toDo: Action_8.actionDefDict,
|
||||
token: Action_9.actionDefDict,
|
||||
user: Action_10.actionDefDict,
|
||||
userEntityGrant: Action_11.actionDefDict,
|
||||
userWechatPublicTag: Action_12.actionDefDict,
|
||||
wechatLogin: Action_13.actionDefDict,
|
||||
wechatMenu: Action_14.actionDefDict,
|
||||
wechatPublicTag: Action_15.actionDefDict
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { EntityDef as User } from "./User/Schema";
|
|||
import { EntityDef as UserEntityClaim } from "./UserEntityClaim/Schema";
|
||||
import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
|
||||
import { EntityDef as UserRelation } from "./UserRelation/Schema";
|
||||
import { EntityDef as Account } from "./Account/Schema";
|
||||
import { EntityDef as Address } from "./Address/Schema";
|
||||
import { EntityDef as Application } from "./Application/Schema";
|
||||
import { EntityDef as Area } from "./Area/Schema";
|
||||
|
|
@ -67,7 +66,6 @@ export type EntityDict = {
|
|||
userEntityClaim: UserEntityClaim;
|
||||
userEntityGrant: UserEntityGrant;
|
||||
userRelation: UserRelation;
|
||||
account: Account;
|
||||
address: Address;
|
||||
application: Application;
|
||||
area: Area;
|
||||
|
|
|
|||
|
|
@ -2,16 +2,6 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.relations = void 0;
|
||||
exports.relations = [
|
||||
{
|
||||
id: "account-owner",
|
||||
entity: "account",
|
||||
name: "owner"
|
||||
},
|
||||
{
|
||||
id: "account-audit",
|
||||
entity: "account",
|
||||
name: "audit"
|
||||
},
|
||||
{
|
||||
id: "session-partner",
|
||||
entity: "session",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ 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 Account from "../Account/Schema";
|
||||
import * as Session from "../Session/Schema";
|
||||
import * as ToDo from "../ToDo/Schema";
|
||||
import * as ActionAuth from "../ActionAuth/Schema";
|
||||
|
|
@ -12,18 +11,17 @@ import * as RelationAuth from "../RelationAuth/Schema";
|
|||
import * as UserEntityClaim from "../UserEntityClaim/Schema";
|
||||
import * as UserRelation from "../UserRelation/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
name?: String<32> | null;
|
||||
display?: String<32> | null;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId?: String<64> | null;
|
||||
name?: String<32> | null;
|
||||
display?: String<32> | null;
|
||||
account?: Account.Schema;
|
||||
session?: Session.Schema;
|
||||
toDo?: ToDo.Schema;
|
||||
actionAuth$relation?: Array<ActionAuth.Schema>;
|
||||
|
|
@ -44,11 +42,10 @@ type AttrFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
entity: Q_EnumValue<"account" | "session" | "toDo" | string>;
|
||||
entity: Q_EnumValue<"session" | "toDo" | string>;
|
||||
entityId: Q_StringValue;
|
||||
name: Q_StringValue;
|
||||
display: Q_StringValue;
|
||||
account: Account.Filter;
|
||||
session: Session.Filter;
|
||||
toDo: ToDo.Filter;
|
||||
actionAuth$relation: ActionAuth.Filter & SubQueryPredicateMetadata;
|
||||
|
|
@ -69,7 +66,6 @@ export type Projection = {
|
|||
entityId?: number;
|
||||
name?: number;
|
||||
display?: number;
|
||||
account?: Account.Projection;
|
||||
session?: Session.Projection;
|
||||
toDo?: ToDo.Projection;
|
||||
actionAuth$relation?: ActionAuth.Selection & {
|
||||
|
|
@ -106,9 +102,6 @@ export type Projection = {
|
|||
type RelationIdProjection = OneOf<{
|
||||
id: number;
|
||||
}>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
type SessionIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
|
|
@ -131,8 +124,6 @@ export type SortAttr = {
|
|||
name: number;
|
||||
} | {
|
||||
display: number;
|
||||
} | {
|
||||
account: Account.SortAttr;
|
||||
} | {
|
||||
session: Session.SortAttr;
|
||||
} | {
|
||||
|
|
@ -149,18 +140,6 @@ export type SelectOperation<P extends Object = Projection> = OakSelection<"selec
|
|||
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
||||
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
||||
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
account?: Account.CreateSingleOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId?: ForeignKey<"Account">;
|
||||
account?: Account.UpdateOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId?: ForeignKey<"Account">;
|
||||
account?: never;
|
||||
} | {
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
session?: Session.CreateSingleOperation;
|
||||
|
|
@ -199,10 +178,6 @@ export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
||||
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
account?: Account.CreateSingleOperation | Account.UpdateOperation | Account.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
session?: Session.CreateSingleOperation | Session.UpdateOperation | Session.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
|
|
@ -211,9 +186,8 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: ("account" | "session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Account" | "Session" | "ToDo">;
|
||||
account?: never;
|
||||
entity?: ("session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Session" | "ToDo">;
|
||||
session?: never;
|
||||
toDo?: never;
|
||||
}) & {
|
||||
|
|
@ -226,8 +200,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
};
|
||||
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & ({
|
||||
account?: Account.UpdateOperation | Account.RemoveOperation;
|
||||
} | {
|
||||
session?: Session.UpdateOperation | Session.RemoveOperation;
|
||||
} | {
|
||||
toDo?: ToDo.UpdateOperation | ToDo.RemoveOperation;
|
||||
|
|
@ -236,7 +208,6 @@ export type RemoveOperationData = {} & ({
|
|||
});
|
||||
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
||||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type SessionIdSubQuery = Selection<SessionIdProjection>;
|
||||
export type ToDoIdSubQuery = Selection<ToDoIdProjection>;
|
||||
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ exports.desc = {
|
|||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["account", "session", "toDo"]
|
||||
ref: ["session", "toDo"]
|
||||
},
|
||||
entityId: {
|
||||
type: "varchar",
|
||||
|
|
|
|||
|
|
@ -14,48 +14,47 @@ const Storage_10 = require("./User/Storage");
|
|||
const Storage_11 = require("./UserEntityClaim/Storage");
|
||||
const Storage_12 = require("./UserEntityGrant/Storage");
|
||||
const Storage_13 = require("./UserRelation/Storage");
|
||||
const Storage_14 = require("./Account/Storage");
|
||||
const Storage_15 = require("./Address/Storage");
|
||||
const Storage_16 = require("./Application/Storage");
|
||||
const Storage_17 = require("./Area/Storage");
|
||||
const Storage_18 = require("./Article/Storage");
|
||||
const Storage_19 = require("./ArticleMenu/Storage");
|
||||
const Storage_20 = require("./Captcha/Storage");
|
||||
const Storage_21 = require("./ChangePasswordTemp/Storage");
|
||||
const Storage_22 = require("./Domain/Storage");
|
||||
const Storage_23 = require("./Email/Storage");
|
||||
const Storage_24 = require("./ExtraFile/Storage");
|
||||
const Storage_25 = require("./Livestream/Storage");
|
||||
const Storage_26 = require("./Message/Storage");
|
||||
const Storage_27 = require("./MessageSystem/Storage");
|
||||
const Storage_28 = require("./MessageType/Storage");
|
||||
const Storage_29 = require("./MessageTypeSmsTemplate/Storage");
|
||||
const Storage_30 = require("./MessageTypeTemplate/Storage");
|
||||
const Storage_31 = require("./Mobile/Storage");
|
||||
const Storage_32 = require("./Notification/Storage");
|
||||
const Storage_33 = require("./Parasite/Storage");
|
||||
const Storage_34 = require("./Platform/Storage");
|
||||
const Storage_35 = require("./ReadRemark/Storage");
|
||||
const Storage_36 = require("./Session/Storage");
|
||||
const Storage_37 = require("./SessionMessage/Storage");
|
||||
const Storage_38 = require("./SmsTemplate/Storage");
|
||||
const Storage_39 = require("./Station/Storage");
|
||||
const Storage_40 = require("./Subscription/Storage");
|
||||
const Storage_41 = require("./Subway/Storage");
|
||||
const Storage_42 = require("./SubwayStation/Storage");
|
||||
const Storage_43 = require("./System/Storage");
|
||||
const Storage_44 = require("./ToDo/Storage");
|
||||
const Storage_45 = require("./Token/Storage");
|
||||
const Storage_46 = require("./UserSystem/Storage");
|
||||
const Storage_47 = require("./UserWechatPublicTag/Storage");
|
||||
const Storage_48 = require("./WechatLogin/Storage");
|
||||
const Storage_49 = require("./WechatMenu/Storage");
|
||||
const Storage_50 = require("./WechatMpJump/Storage");
|
||||
const Storage_51 = require("./WechatPublicAutoReply/Storage");
|
||||
const Storage_52 = require("./WechatPublicTag/Storage");
|
||||
const Storage_53 = require("./WechatQrCode/Storage");
|
||||
const Storage_54 = require("./WechatTemplate/Storage");
|
||||
const Storage_55 = require("./WechatUser/Storage");
|
||||
const Storage_14 = require("./Address/Storage");
|
||||
const Storage_15 = require("./Application/Storage");
|
||||
const Storage_16 = require("./Area/Storage");
|
||||
const Storage_17 = require("./Article/Storage");
|
||||
const Storage_18 = require("./ArticleMenu/Storage");
|
||||
const Storage_19 = require("./Captcha/Storage");
|
||||
const Storage_20 = require("./ChangePasswordTemp/Storage");
|
||||
const Storage_21 = require("./Domain/Storage");
|
||||
const Storage_22 = require("./Email/Storage");
|
||||
const Storage_23 = require("./ExtraFile/Storage");
|
||||
const Storage_24 = require("./Livestream/Storage");
|
||||
const Storage_25 = require("./Message/Storage");
|
||||
const Storage_26 = require("./MessageSystem/Storage");
|
||||
const Storage_27 = require("./MessageType/Storage");
|
||||
const Storage_28 = require("./MessageTypeSmsTemplate/Storage");
|
||||
const Storage_29 = require("./MessageTypeTemplate/Storage");
|
||||
const Storage_30 = require("./Mobile/Storage");
|
||||
const Storage_31 = require("./Notification/Storage");
|
||||
const Storage_32 = require("./Parasite/Storage");
|
||||
const Storage_33 = require("./Platform/Storage");
|
||||
const Storage_34 = require("./ReadRemark/Storage");
|
||||
const Storage_35 = require("./Session/Storage");
|
||||
const Storage_36 = require("./SessionMessage/Storage");
|
||||
const Storage_37 = require("./SmsTemplate/Storage");
|
||||
const Storage_38 = require("./Station/Storage");
|
||||
const Storage_39 = require("./Subscription/Storage");
|
||||
const Storage_40 = require("./Subway/Storage");
|
||||
const Storage_41 = require("./SubwayStation/Storage");
|
||||
const Storage_42 = require("./System/Storage");
|
||||
const Storage_43 = require("./ToDo/Storage");
|
||||
const Storage_44 = require("./Token/Storage");
|
||||
const Storage_45 = require("./UserSystem/Storage");
|
||||
const Storage_46 = require("./UserWechatPublicTag/Storage");
|
||||
const Storage_47 = require("./WechatLogin/Storage");
|
||||
const Storage_48 = require("./WechatMenu/Storage");
|
||||
const Storage_49 = require("./WechatMpJump/Storage");
|
||||
const Storage_50 = require("./WechatPublicAutoReply/Storage");
|
||||
const Storage_51 = require("./WechatPublicTag/Storage");
|
||||
const Storage_52 = require("./WechatQrCode/Storage");
|
||||
const Storage_53 = require("./WechatTemplate/Storage");
|
||||
const Storage_54 = require("./WechatUser/Storage");
|
||||
exports.storageSchema = {
|
||||
actionAuth: Storage_1.desc,
|
||||
i18n: Storage_2.desc,
|
||||
|
|
@ -70,46 +69,45 @@ exports.storageSchema = {
|
|||
userEntityClaim: Storage_11.desc,
|
||||
userEntityGrant: Storage_12.desc,
|
||||
userRelation: Storage_13.desc,
|
||||
account: Storage_14.desc,
|
||||
address: Storage_15.desc,
|
||||
application: Storage_16.desc,
|
||||
area: Storage_17.desc,
|
||||
article: Storage_18.desc,
|
||||
articleMenu: Storage_19.desc,
|
||||
captcha: Storage_20.desc,
|
||||
changePasswordTemp: Storage_21.desc,
|
||||
domain: Storage_22.desc,
|
||||
email: Storage_23.desc,
|
||||
extraFile: Storage_24.desc,
|
||||
livestream: Storage_25.desc,
|
||||
message: Storage_26.desc,
|
||||
messageSystem: Storage_27.desc,
|
||||
messageType: Storage_28.desc,
|
||||
messageTypeSmsTemplate: Storage_29.desc,
|
||||
messageTypeTemplate: Storage_30.desc,
|
||||
mobile: Storage_31.desc,
|
||||
notification: Storage_32.desc,
|
||||
parasite: Storage_33.desc,
|
||||
platform: Storage_34.desc,
|
||||
readRemark: Storage_35.desc,
|
||||
session: Storage_36.desc,
|
||||
sessionMessage: Storage_37.desc,
|
||||
smsTemplate: Storage_38.desc,
|
||||
station: Storage_39.desc,
|
||||
subscription: Storage_40.desc,
|
||||
subway: Storage_41.desc,
|
||||
subwayStation: Storage_42.desc,
|
||||
system: Storage_43.desc,
|
||||
toDo: Storage_44.desc,
|
||||
token: Storage_45.desc,
|
||||
userSystem: Storage_46.desc,
|
||||
userWechatPublicTag: Storage_47.desc,
|
||||
wechatLogin: Storage_48.desc,
|
||||
wechatMenu: Storage_49.desc,
|
||||
wechatMpJump: Storage_50.desc,
|
||||
wechatPublicAutoReply: Storage_51.desc,
|
||||
wechatPublicTag: Storage_52.desc,
|
||||
wechatQrCode: Storage_53.desc,
|
||||
wechatTemplate: Storage_54.desc,
|
||||
wechatUser: Storage_55.desc
|
||||
address: Storage_14.desc,
|
||||
application: Storage_15.desc,
|
||||
area: Storage_16.desc,
|
||||
article: Storage_17.desc,
|
||||
articleMenu: Storage_18.desc,
|
||||
captcha: Storage_19.desc,
|
||||
changePasswordTemp: Storage_20.desc,
|
||||
domain: Storage_21.desc,
|
||||
email: Storage_22.desc,
|
||||
extraFile: Storage_23.desc,
|
||||
livestream: Storage_24.desc,
|
||||
message: Storage_25.desc,
|
||||
messageSystem: Storage_26.desc,
|
||||
messageType: Storage_27.desc,
|
||||
messageTypeSmsTemplate: Storage_28.desc,
|
||||
messageTypeTemplate: Storage_29.desc,
|
||||
mobile: Storage_30.desc,
|
||||
notification: Storage_31.desc,
|
||||
parasite: Storage_32.desc,
|
||||
platform: Storage_33.desc,
|
||||
readRemark: Storage_34.desc,
|
||||
session: Storage_35.desc,
|
||||
sessionMessage: Storage_36.desc,
|
||||
smsTemplate: Storage_37.desc,
|
||||
station: Storage_38.desc,
|
||||
subscription: Storage_39.desc,
|
||||
subway: Storage_40.desc,
|
||||
subwayStation: Storage_41.desc,
|
||||
system: Storage_42.desc,
|
||||
toDo: Storage_43.desc,
|
||||
token: Storage_44.desc,
|
||||
userSystem: Storage_45.desc,
|
||||
userWechatPublicTag: Storage_46.desc,
|
||||
wechatLogin: Storage_47.desc,
|
||||
wechatMenu: Storage_48.desc,
|
||||
wechatMpJump: Storage_49.desc,
|
||||
wechatPublicAutoReply: Storage_50.desc,
|
||||
wechatPublicTag: Storage_51.desc,
|
||||
wechatQrCode: Storage_52.desc,
|
||||
wechatTemplate: Storage_53.desc,
|
||||
wechatUser: Storage_54.desc
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,52 +2,50 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.styleDict = void 0;
|
||||
const Style_1 = require("./Modi/Style");
|
||||
const Style_2 = require("./Account/Style");
|
||||
const Style_3 = require("./Application/Style");
|
||||
const Style_4 = require("./Area/Style");
|
||||
const Style_5 = require("./Captcha/Style");
|
||||
const Style_6 = require("./ChangePasswordTemp/Style");
|
||||
const Style_7 = require("./Domain/Style");
|
||||
const Style_8 = require("./Email/Style");
|
||||
const Style_9 = require("./ExtraFile/Style");
|
||||
const Style_10 = require("./Livestream/Style");
|
||||
const Style_11 = require("./Message/Style");
|
||||
const Style_12 = require("./Mobile/Style");
|
||||
const Style_13 = require("./Notification/Style");
|
||||
const Style_14 = require("./Parasite/Style");
|
||||
const Style_15 = require("./ToDo/Style");
|
||||
const Style_16 = require("./Token/Style");
|
||||
const Style_17 = require("./User/Style");
|
||||
const Style_18 = require("./UserEntityGrant/Style");
|
||||
const Style_19 = require("./UserWechatPublicTag/Style");
|
||||
const Style_20 = require("./WechatLogin/Style");
|
||||
const Style_21 = require("./WechatMenu/Style");
|
||||
const Style_22 = require("./WechatPublicTag/Style");
|
||||
const Style_23 = require("./WechatQrCode/Style");
|
||||
const Style_24 = require("./WechatUser/Style");
|
||||
const Style_2 = require("./Application/Style");
|
||||
const Style_3 = require("./Area/Style");
|
||||
const Style_4 = require("./Captcha/Style");
|
||||
const Style_5 = require("./ChangePasswordTemp/Style");
|
||||
const Style_6 = require("./Domain/Style");
|
||||
const Style_7 = require("./Email/Style");
|
||||
const Style_8 = require("./ExtraFile/Style");
|
||||
const Style_9 = require("./Livestream/Style");
|
||||
const Style_10 = require("./Message/Style");
|
||||
const Style_11 = require("./Mobile/Style");
|
||||
const Style_12 = require("./Notification/Style");
|
||||
const Style_13 = require("./Parasite/Style");
|
||||
const Style_14 = require("./ToDo/Style");
|
||||
const Style_15 = require("./Token/Style");
|
||||
const Style_16 = require("./User/Style");
|
||||
const Style_17 = require("./UserEntityGrant/Style");
|
||||
const Style_18 = require("./UserWechatPublicTag/Style");
|
||||
const Style_19 = require("./WechatLogin/Style");
|
||||
const Style_20 = require("./WechatMenu/Style");
|
||||
const Style_21 = require("./WechatPublicTag/Style");
|
||||
const Style_22 = require("./WechatQrCode/Style");
|
||||
const Style_23 = require("./WechatUser/Style");
|
||||
exports.styleDict = {
|
||||
modi: Style_1.style,
|
||||
account: Style_2.style,
|
||||
application: Style_3.style,
|
||||
area: Style_4.style,
|
||||
captcha: Style_5.style,
|
||||
changePasswordTemp: Style_6.style,
|
||||
domain: Style_7.style,
|
||||
email: Style_8.style,
|
||||
extraFile: Style_9.style,
|
||||
livestream: Style_10.style,
|
||||
message: Style_11.style,
|
||||
mobile: Style_12.style,
|
||||
notification: Style_13.style,
|
||||
parasite: Style_14.style,
|
||||
toDo: Style_15.style,
|
||||
token: Style_16.style,
|
||||
user: Style_17.style,
|
||||
userEntityGrant: Style_18.style,
|
||||
userWechatPublicTag: Style_19.style,
|
||||
wechatLogin: Style_20.style,
|
||||
wechatMenu: Style_21.style,
|
||||
wechatPublicTag: Style_22.style,
|
||||
wechatQrCode: Style_23.style,
|
||||
wechatUser: Style_24.style
|
||||
application: Style_2.style,
|
||||
area: Style_3.style,
|
||||
captcha: Style_4.style,
|
||||
changePasswordTemp: Style_5.style,
|
||||
domain: Style_6.style,
|
||||
email: Style_7.style,
|
||||
extraFile: Style_8.style,
|
||||
livestream: Style_9.style,
|
||||
message: Style_10.style,
|
||||
mobile: Style_11.style,
|
||||
notification: Style_12.style,
|
||||
parasite: Style_13.style,
|
||||
toDo: Style_14.style,
|
||||
token: Style_15.style,
|
||||
user: Style_16.style,
|
||||
userEntityGrant: Style_17.style,
|
||||
userWechatPublicTag: Style_18.style,
|
||||
wechatLogin: Style_19.style,
|
||||
wechatMenu: Style_20.style,
|
||||
wechatPublicTag: Style_21.style,
|
||||
wechatQrCode: Style_22.style,
|
||||
wechatUser: Style_23.style
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import * as OperEntity from "../OperEntity/Schema";
|
|||
import * as ExtraFile from "../ExtraFile/Schema";
|
||||
import * as WechatQrCode from "../WechatQrCode/Schema";
|
||||
import * as Address from "../Address/Schema";
|
||||
import * as Account from "../Account/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
name?: String<16> | null;
|
||||
nickname?: String<64> | null;
|
||||
|
|
@ -102,8 +101,6 @@ export type Schema = EntityShape & {
|
|||
wechatQrCode$entity$$aggr?: AggregationResult<WechatQrCode.Schema>;
|
||||
address$entity?: Array<Address.Schema>;
|
||||
address$entity$$aggr?: AggregationResult<Address.Schema>;
|
||||
account$entity?: Array<Account.Schema>;
|
||||
account$entity$$aggr?: AggregationResult<Account.Schema>;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -148,7 +145,6 @@ type AttrFilter = {
|
|||
extraFile$entity: ExtraFile.Filter & SubQueryPredicateMetadata;
|
||||
wechatQrCode$entity: WechatQrCode.Filter & SubQueryPredicateMetadata;
|
||||
address$entity: Address.Filter & SubQueryPredicateMetadata;
|
||||
account$entity: Account.Filter & SubQueryPredicateMetadata;
|
||||
};
|
||||
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string> & FulltextFilter>;
|
||||
export type Projection = {
|
||||
|
|
@ -309,12 +305,6 @@ export type Projection = {
|
|||
address$entity$$aggr?: Address.Aggregation & {
|
||||
$entity: "address";
|
||||
};
|
||||
account$entity?: Account.Selection & {
|
||||
$entity: "account";
|
||||
};
|
||||
account$entity$$aggr?: Account.Aggregation & {
|
||||
$entity: "account";
|
||||
};
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
type UserIdProjection = OneOf<{
|
||||
id: number;
|
||||
|
|
@ -398,7 +388,6 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
|
|||
extraFile$entity?: OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">> | OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">>>;
|
||||
wechatQrCode$entity?: OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">> | OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">>>;
|
||||
address$entity?: OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">> | OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">>>;
|
||||
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
||||
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
|
|
@ -440,7 +429,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
|
|||
extraFile$entity?: OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<ExtraFile.RemoveOperation["action"], Omit<ExtraFile.RemoveOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ExtraFile.CreateOperationData, "entity" | "entityId">> | OakOperation<ExtraFile.UpdateOperation["action"], Omit<ExtraFile.UpdateOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">> | OakOperation<ExtraFile.RemoveOperation["action"], Omit<ExtraFile.RemoveOperationData, "entity" | "entityId">, Omit<ExtraFile.Filter, "entity" | "entityId">>>;
|
||||
wechatQrCode$entity?: OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<WechatQrCode.RemoveOperation["action"], Omit<WechatQrCode.RemoveOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WechatQrCode.CreateOperationData, "entity" | "entityId">> | OakOperation<WechatQrCode.UpdateOperation["action"], Omit<WechatQrCode.UpdateOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">> | OakOperation<WechatQrCode.RemoveOperation["action"], Omit<WechatQrCode.RemoveOperationData, "entity" | "entityId">, Omit<WechatQrCode.Filter, "entity" | "entityId">>>;
|
||||
address$entity?: OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<Address.RemoveOperation["action"], Omit<Address.RemoveOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Address.CreateOperationData, "entity" | "entityId">> | OakOperation<Address.UpdateOperation["action"], Omit<Address.UpdateOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">> | OakOperation<Address.RemoveOperation["action"], Omit<Address.RemoveOperationData, "entity" | "entityId">, Omit<Address.Filter, "entity" | "entityId">>>;
|
||||
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
||||
};
|
||||
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
||||
export type RemoveOperationData = {} & (({
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "用户", "attr": { "name": "姓名", "nickname": "昵称", "birth": "生日", "password": "密码", "passwordSha1": "sha1加密密码", "gender": "性别", "idCardType": "证件类型", "idNumber": "证件号码", "ref": "指向用户", "files": "相关文件", "userState": "用户状态", "idState": "身份验证状态", "codes": "微信分享二维码", "isRoot": "是否超级用户", "addresses": "收货地址", "accounts": "账户" }, "action": { "activate": "激活", "accept": "同意", "verify": "验证", "reject": "拒绝", "enable": "启用", "disable": "禁用", "mergeTo": "合并", "mergeFrom": "使合并" }, "v": { "userState": { "shadow": "未激活", "normal": "正常", "disabled": "禁用", "merged": "已被合并" }, "idState": { "unverified": "未验证", "verifying": "验证中", "verified": "已验证" }, "gender": { "male": "男", "female": "女" }, "idCardType": { "ID-Card": "身份证", "passport": "护照", "Mainland-passport": "港澳台通行证" } } }
|
||||
{ "name": "用户", "attr": { "name": "姓名", "nickname": "昵称", "birth": "生日", "password": "密码", "passwordSha1": "sha1加密密码", "gender": "性别", "idCardType": "证件类型", "idNumber": "证件号码", "ref": "指向用户", "files": "相关文件", "userState": "用户状态", "idState": "身份验证状态", "codes": "微信分享二维码", "isRoot": "是否超级用户", "addresses": "收货地址" }, "action": { "activate": "激活", "accept": "同意", "verify": "验证", "reject": "拒绝", "enable": "启用", "disable": "禁用", "mergeTo": "合并", "mergeFrom": "使合并" }, "v": { "userState": { "shadow": "未激活", "normal": "正常", "disabled": "禁用", "merged": "已被合并" }, "idState": { "unverified": "未验证", "verifying": "验证中", "verified": "已验证" }, "gender": { "male": "男", "female": "女" }, "idCardType": { "ID-Card": "身份证", "passport": "护照", "Mainland-passport": "港澳台通行证" } } }
|
||||
|
|
|
|||
|
|
@ -6,25 +6,23 @@ import { GenericAction } from "oak-domain/lib/actions/action";
|
|||
import { String } from "oak-domain/lib/types/DataType";
|
||||
import * as User from "../User/Schema";
|
||||
import * as Relation from "../Relation/Schema";
|
||||
import * as Account from "../Account/Schema";
|
||||
import * as Session from "../Session/Schema";
|
||||
import * as ToDo from "../ToDo/Schema";
|
||||
import * as UserEntityClaim from "../UserEntityClaim/Schema";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId: String<64>;
|
||||
};
|
||||
export type OpAttr = keyof OpSchema;
|
||||
export type Schema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
relationId: ForeignKey<"relation">;
|
||||
entity: "account" | "session" | "toDo" | string;
|
||||
entity: "session" | "toDo" | string;
|
||||
entityId: String<64>;
|
||||
user: User.Schema;
|
||||
relation: Relation.Schema;
|
||||
account?: Account.Schema;
|
||||
session?: Session.Schema;
|
||||
toDo?: ToDo.Schema;
|
||||
userEntityClaim$userRelation?: Array<UserEntityClaim.Schema>;
|
||||
|
|
@ -41,9 +39,8 @@ type AttrFilter = {
|
|||
user: User.Filter;
|
||||
relationId: Q_StringValue;
|
||||
relation: Relation.Filter;
|
||||
entity: Q_EnumValue<"account" | "session" | "toDo" | string>;
|
||||
entity: Q_EnumValue<"session" | "toDo" | string>;
|
||||
entityId: Q_StringValue;
|
||||
account: Account.Filter;
|
||||
session: Session.Filter;
|
||||
toDo: ToDo.Filter;
|
||||
userEntityClaim$userRelation: UserEntityClaim.Filter & SubQueryPredicateMetadata;
|
||||
|
|
@ -62,7 +59,6 @@ export type Projection = {
|
|||
relation?: Relation.Projection;
|
||||
entity?: number;
|
||||
entityId?: number;
|
||||
account?: Account.Projection;
|
||||
session?: Session.Projection;
|
||||
toDo?: ToDo.Projection;
|
||||
userEntityClaim$userRelation?: UserEntityClaim.Selection & {
|
||||
|
|
@ -81,9 +77,6 @@ type UserIdProjection = OneOf<{
|
|||
type RelationIdProjection = OneOf<{
|
||||
relationId: number;
|
||||
}>;
|
||||
type AccountIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
type SessionIdProjection = OneOf<{
|
||||
entityId: number;
|
||||
}>;
|
||||
|
|
@ -110,8 +103,6 @@ export type SortAttr = {
|
|||
entity: number;
|
||||
} | {
|
||||
entityId: number;
|
||||
} | {
|
||||
account: Account.SortAttr;
|
||||
} | {
|
||||
session: Session.SortAttr;
|
||||
} | {
|
||||
|
|
@ -146,18 +137,6 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|||
relation?: never;
|
||||
relationId: ForeignKey<"relation">;
|
||||
})) & ({
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
account: Account.CreateSingleOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId: ForeignKey<"Account">;
|
||||
account?: Account.UpdateOperation;
|
||||
} | {
|
||||
entity: "account";
|
||||
entityId: ForeignKey<"Account">;
|
||||
account?: never;
|
||||
} | {
|
||||
entity?: never;
|
||||
entityId?: never;
|
||||
session: Session.CreateSingleOperation;
|
||||
|
|
@ -216,10 +195,6 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
relation?: never;
|
||||
relationId?: ForeignKey<"relation">;
|
||||
})) & ({
|
||||
account?: Account.CreateSingleOperation | Account.UpdateOperation | Account.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
session?: Session.CreateSingleOperation | Session.UpdateOperation | Session.RemoveOperation;
|
||||
entityId?: never;
|
||||
entity?: never;
|
||||
|
|
@ -228,9 +203,8 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|||
entityId?: never;
|
||||
entity?: never;
|
||||
} | {
|
||||
entity?: ("account" | "session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Account" | "Session" | "ToDo"> | null;
|
||||
account?: never;
|
||||
entity?: ("session" | "toDo" | string) | null;
|
||||
entityId?: ForeignKey<"Session" | "ToDo"> | null;
|
||||
session?: never;
|
||||
toDo?: never;
|
||||
}) & {
|
||||
|
|
@ -243,8 +217,6 @@ export type RemoveOperationData = {} & (({
|
|||
}) & ({
|
||||
relation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
||||
})) & ({
|
||||
account?: Account.UpdateOperation | Account.RemoveOperation;
|
||||
} | {
|
||||
session?: Session.UpdateOperation | Session.RemoveOperation;
|
||||
} | {
|
||||
toDo?: ToDo.UpdateOperation | ToDo.RemoveOperation;
|
||||
|
|
@ -255,7 +227,6 @@ export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter
|
|||
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
||||
export type UserIdSubQuery = Selection<UserIdProjection>;
|
||||
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
||||
export type AccountIdSubQuery = Selection<AccountIdProjection>;
|
||||
export type SessionIdSubQuery = Selection<SessionIdProjection>;
|
||||
export type ToDoIdSubQuery = Selection<ToDoIdProjection>;
|
||||
export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ exports.desc = {
|
|||
params: {
|
||||
length: 32
|
||||
},
|
||||
ref: ["account", "session", "toDo"]
|
||||
ref: ["session", "toDo"]
|
||||
},
|
||||
entityId: {
|
||||
notNull: true,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import * as User from "./User/Schema";
|
|||
import * as UserEntityClaim from "./UserEntityClaim/Schema";
|
||||
import * as UserEntityGrant from "./UserEntityGrant/Schema";
|
||||
import * as UserRelation from "./UserRelation/Schema";
|
||||
import * as Account from "./Account/Schema";
|
||||
import * as Address from "./Address/Schema";
|
||||
import * as Application from "./Application/Schema";
|
||||
import * as Area from "./Area/Schema";
|
||||
|
|
@ -159,8 +158,6 @@ export type UserIdSubQuery = {
|
|||
entity: "wechatQrCode";
|
||||
}) | (Address.UserIdSubQuery & {
|
||||
entity: "address";
|
||||
}) | (Account.UserIdSubQuery & {
|
||||
entity: "account";
|
||||
}) | (User.UserIdSubQuery & {
|
||||
entity: "user";
|
||||
}) | any;
|
||||
|
|
@ -190,15 +187,6 @@ export type UserRelationIdSubQuery = {
|
|||
entity: "userRelation";
|
||||
}) | any;
|
||||
};
|
||||
export type AccountIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Relation.AccountIdSubQuery & {
|
||||
entity: "relation";
|
||||
}) | (UserRelation.AccountIdSubQuery & {
|
||||
entity: "userRelation";
|
||||
}) | (Account.AccountIdSubQuery & {
|
||||
entity: "account";
|
||||
}) | any;
|
||||
};
|
||||
export type AddressIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Address.AddressIdSubQuery & {
|
||||
entity: "address";
|
||||
|
|
|
|||
|
|
@ -1,5 +1 @@
|
|||
import { EntityDict } from '../oak-app-domain/EntityDict';
|
||||
import { Trigger } from 'oak-domain/lib/types';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
declare const triggers: Trigger<EntityDict, 'account', BRC<EntityDict>>[];
|
||||
export default triggers;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,18 +1,22 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const triggers = [
|
||||
/* const triggers: Trigger<
|
||||
EntityDict,
|
||||
'account',
|
||||
BRC<EntityDict>
|
||||
>[] = [
|
||||
// 目前先这样授予关系
|
||||
{
|
||||
name: '充值的时候,将用户赋予owner关系',
|
||||
entity: 'account',
|
||||
action: 'create',
|
||||
when: 'before',
|
||||
fn: async (event, context) => {
|
||||
const { operation: { data, filter }, } = event;
|
||||
(0, assert_1.assert)(!(data instanceof Array));
|
||||
const accountId = data.id;
|
||||
fn: async (event: any, context: any) => {
|
||||
const {
|
||||
operation: { data, filter },
|
||||
} = event;
|
||||
assert(!(data instanceof Array));
|
||||
const accountId = data.id!;
|
||||
const [relation] = await context.select('relation', {
|
||||
data: {
|
||||
id: 1,
|
||||
|
|
@ -25,22 +29,27 @@ const triggers = [
|
|||
}
|
||||
}
|
||||
}, { dontCollect: true });
|
||||
(0, assert_1.assert)(relation);
|
||||
|
||||
assert(relation);
|
||||
const closeRootMode = context.openRootMode();
|
||||
await context.operate('userRelation', {
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
await context.operate(
|
||||
'userRelation',
|
||||
{
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'create',
|
||||
data: {
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
id: await generateNewIdAsync(),
|
||||
relationId: relation.id,
|
||||
userId: context.getCurrentUserId(),
|
||||
entity: 'account',
|
||||
entityId: accountId,
|
||||
entityId: accountId!,
|
||||
} as EntityDict['userRelation']['CreateSingle']['data'],
|
||||
},
|
||||
}, {});
|
||||
{}
|
||||
);
|
||||
closeRootMode();
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
];
|
||||
exports.default = triggers;
|
||||
];
|
||||
export default triggers; */
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ const sessionMessage_1 = tslib_1.__importDefault(require("./sessionMessage"));
|
|||
const wechatMenu_1 = tslib_1.__importDefault(require("./wechatMenu"));
|
||||
const wechatPublicTag_1 = tslib_1.__importDefault(require("./wechatPublicTag"));
|
||||
const wechatMpJump_1 = tslib_1.__importDefault(require("./wechatMpJump"));
|
||||
const account_1 = tslib_1.__importDefault(require("./account"));
|
||||
// import accountTriggers from './account';
|
||||
exports.default = [
|
||||
...account_1.default,
|
||||
// ...accountTriggers,
|
||||
...application_1.default,
|
||||
...address_1.default,
|
||||
...user_1.default,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ async function sendNotification(notification, context) {
|
|||
await instance.sendSubscribedMessage({
|
||||
templateId: templateId,
|
||||
data: data,
|
||||
openId: data1.openId, // 在notification创建时就赋值了
|
||||
openId: data1.openId,
|
||||
page,
|
||||
state: StateDict[process.env.NODE_ENV],
|
||||
});
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue