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