删除了残留的无用代码
This commit is contained in:
parent
f9974af1fd
commit
b7505c52f4
|
|
@ -1,8 +1,7 @@
|
||||||
import { AspectDict } from './AspectDict';
|
import { AspectDict } from './AspectDict';
|
||||||
import { test } from './sample';
|
|
||||||
|
|
||||||
const aspectDict = {
|
const aspectDict = {
|
||||||
test,
|
|
||||||
} as AspectDict;
|
} as AspectDict;
|
||||||
|
|
||||||
export default aspectDict;
|
export default aspectDict;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
|
||||||
|
|
||||||
export async function test(params: string, context: BackendRuntimeContext) {
|
|
||||||
return 'hello world';
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
import { Checker } from 'oak-domain/lib/types';
|
|
||||||
import { RuntimeCxt } from '../types/RuntimeCxt';
|
|
||||||
import { checkAttributesNotNull } from 'oak-domain/lib/utils/validator';
|
|
||||||
import { CreateOperationData as CreateStoreData } from '@oak-app-domain/Store/Schema';
|
|
||||||
|
|
||||||
export const checkers: Checker<EntityDict, 'store', RuntimeCxt>[] = [
|
|
||||||
{
|
|
||||||
type: 'data',
|
|
||||||
action: 'create',
|
|
||||||
entity: 'store',
|
|
||||||
checker: (data, context) => {
|
|
||||||
if (data instanceof Array) {
|
|
||||||
data.forEach((ele) => {
|
|
||||||
checkAttributesNotNull('store', data, [
|
|
||||||
'coordinate',
|
|
||||||
'name',
|
|
||||||
'addrDetail',
|
|
||||||
'areaId',
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
checkAttributesNotNull('store', data, [
|
|
||||||
'coordinate',
|
|
||||||
'name',
|
|
||||||
'addrDetail',
|
|
||||||
'areaId',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
import {
|
|
||||||
String,
|
|
||||||
Int,
|
|
||||||
Text,
|
|
||||||
Float,
|
|
||||||
SingleGeo,
|
|
||||||
} from 'oak-domain/lib/types/DataType';
|
|
||||||
import { ActionDef, EntityDesc } from 'oak-domain/lib/types';
|
|
||||||
// import { Schema as Area } from 'oak-general-business/lib/entities/Area';
|
|
||||||
// import { Schema as ExtraFile } from 'oak-general-business/lib/entities/ExtraFile';
|
|
||||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
||||||
|
|
||||||
export interface Schema extends EntityShape {
|
|
||||||
coordinate: SingleGeo; //坐标
|
|
||||||
// area: Area; //地区
|
|
||||||
name: String<32>; //名称
|
|
||||||
addrDetail: String<32>; //地址详情
|
|
||||||
// files: Array<ExtraFile>; //封面图
|
|
||||||
}
|
|
||||||
|
|
||||||
type IAction = 'online' | 'offline' | 'disable';
|
|
||||||
type IState = 'online' | 'offline' | 'disabled';
|
|
||||||
|
|
||||||
const IActionDef: ActionDef<IAction, IState> = {
|
|
||||||
stm: {
|
|
||||||
online: ['offline', 'online'],
|
|
||||||
offline: ['online', 'offline'],
|
|
||||||
disable: [['online', 'offline'], 'disabled'],
|
|
||||||
},
|
|
||||||
is: 'offline',
|
|
||||||
};
|
|
||||||
|
|
||||||
type Action = IAction;
|
|
||||||
|
|
||||||
const entityDesc: EntityDesc<
|
|
||||||
Schema,
|
|
||||||
Action,
|
|
||||||
'',
|
|
||||||
{
|
|
||||||
iState: IState;
|
|
||||||
}
|
|
||||||
> = {
|
|
||||||
indexes: [
|
|
||||||
{
|
|
||||||
name: 'index_name',
|
|
||||||
attributes: [
|
|
||||||
{
|
|
||||||
name: 'name',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
config: {
|
|
||||||
unique: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
locales: {
|
|
||||||
zh_CN: {
|
|
||||||
name: '门店',
|
|
||||||
attr: {
|
|
||||||
coordinate: '位置',
|
|
||||||
// area: '地区',
|
|
||||||
name: '名称',
|
|
||||||
addrDetail: '地址详情',
|
|
||||||
// files: '照片',
|
|
||||||
iState: '状态',
|
|
||||||
},
|
|
||||||
action: {
|
|
||||||
online: '上线',
|
|
||||||
offline: '下线',
|
|
||||||
disable: '禁用',
|
|
||||||
},
|
|
||||||
v: {
|
|
||||||
iState: {
|
|
||||||
online: '已上线',
|
|
||||||
offline: '已下线',
|
|
||||||
disabled: '已禁用',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
icon: {
|
|
||||||
offline: '',
|
|
||||||
online: '',
|
|
||||||
disable: ''
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
iState: {
|
|
||||||
offline: '#FFFFFF',
|
|
||||||
online: '#FF0000',
|
|
||||||
disabled: '#00FF00',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Loading…
Reference in New Issue