oak-db/test/entities/System.ts

32 lines
1.1 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { String, Boolean, Text } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
import { Schema as Platform } from './Platform';
export interface Schema extends EntityShape {
name: String<32>;
description?: Text;
folder?: String<16>;
platform?: Platform;
super?: Boolean; // super表示是这个platform本身的系统可以操作application/system这些数据也可以访问超出本system的其它数据。
entity?: String<32>; // System是抽象对象应用上级与之一对一的对象可以使用双向指针以方便编程
entityId?: String<64>;
};
export const entityDesc: EntityDesc<Schema> = {
locales: {
zh_CN: {
name: '系统',
attr: {
name: '名称',
description: '描述',
super: '超级系统',
folder: '代码目录名',
entity: '关联对象',
entityId: '关联对象id',
platform: '平台',
},
},
}
};