54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import { String, Int, Datetime, Image, Boolean, Text } from 'oak-domain/lib/types/DataType';
|
|
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
import { Schema as System } from './System';
|
|
|
|
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
|
|
|
export type AppType = 'web' | 'wechatMp' | 'wechatPublic' | 'native';
|
|
|
|
export interface Schema extends EntityShape {
|
|
name: String<32>;
|
|
description?: Text;
|
|
type: AppType;
|
|
system: System;
|
|
};
|
|
|
|
const entityDesc: EntityDesc<
|
|
Schema,
|
|
'',
|
|
'',
|
|
{
|
|
type: Schema['type'];
|
|
}
|
|
> = {
|
|
locales: {
|
|
zh_CN: {
|
|
name: '应用',
|
|
attr: {
|
|
description: '描述',
|
|
type: '类型',
|
|
system: '系统',
|
|
name: '名称',
|
|
},
|
|
v: {
|
|
type: {
|
|
web: '网站',
|
|
wechatPublic: '微信公众号',
|
|
wechatMp: '微信小程序',
|
|
native: 'App',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
style: {
|
|
color: {
|
|
type: {
|
|
wechatMp: '#32CD32',
|
|
web: '#00FF7F',
|
|
wechatPublic: '#90EE90',
|
|
native: '#008000',
|
|
}
|
|
}
|
|
}
|
|
};
|