72 lines
1.8 KiB
TypeScript
72 lines
1.8 KiB
TypeScript
import { Schema as User } from 'oak-general-business/lib/entities/User';
|
|
import { EntityDesc } from 'oak-domain/lib/types';
|
|
import { String, Int, Text, Boolean, Datetime } from 'oak-domain/lib/types/DataType';
|
|
|
|
export interface Schema extends User {
|
|
hahha: String<32>;
|
|
}
|
|
|
|
export const entityDesc: EntityDesc<
|
|
Schema
|
|
> = {
|
|
locales: {
|
|
zh_CN: {
|
|
name: '用户',
|
|
attr: {
|
|
hahha: '哈哈',
|
|
name: '姓名',
|
|
nickname: '昵称',
|
|
birth: '生日',
|
|
password: '密码',
|
|
passwordSha1: 'sha1加密密码',
|
|
gender: '性别',
|
|
idCardType: '证件类型',
|
|
idNumber: '证件号码',
|
|
ref: '指向用户',
|
|
files: '相关文件',
|
|
codes: '微信分享二维码',
|
|
isRoot: '是否超级用户',
|
|
addresses: '收货地址',
|
|
hasPassword: '用户是否存在密码'
|
|
},
|
|
},
|
|
},
|
|
indexes: [
|
|
{
|
|
name: 'index_birth',
|
|
attributes: [
|
|
{
|
|
name: 'birth',
|
|
direction: 'ASC',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'index_fulltext',
|
|
attributes: [
|
|
{
|
|
name: 'name',
|
|
},
|
|
{
|
|
name: 'nickname',
|
|
},
|
|
],
|
|
config: {
|
|
type: 'fulltext',
|
|
parser: 'ngram',
|
|
},
|
|
},
|
|
{
|
|
name: 'index_userState_refId',
|
|
attributes: [
|
|
{
|
|
name: 'userState',
|
|
},
|
|
{
|
|
name: 'ref',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|