104 lines
2.3 KiB
JavaScript
104 lines
2.3 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.desc = void 0;
|
|
const Action_1 = require("./Action");
|
|
exports.desc = {
|
|
attributes: {
|
|
name: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 16
|
|
}
|
|
},
|
|
nickname: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 64
|
|
}
|
|
},
|
|
password: {
|
|
type: "text"
|
|
},
|
|
refId: {
|
|
type: "ref",
|
|
ref: "user"
|
|
},
|
|
passwordSha1: {
|
|
type: "text"
|
|
},
|
|
birth: {
|
|
type: "datetime"
|
|
},
|
|
gender: {
|
|
type: "enum",
|
|
enumeration: ["male", "female"]
|
|
},
|
|
idCardType: {
|
|
type: "enum",
|
|
enumeration: ["ID-Card", "passport", "Mainland-passport"]
|
|
},
|
|
idNumber: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 32
|
|
}
|
|
},
|
|
isRoot: {
|
|
type: "boolean"
|
|
},
|
|
hasPassword: {
|
|
type: "boolean"
|
|
},
|
|
verifyPasswordAt: {
|
|
type: "datetime"
|
|
},
|
|
idState: {
|
|
type: "enum",
|
|
enumeration: ["unverified", "verified", "verifying"]
|
|
},
|
|
userState: {
|
|
type: "enum",
|
|
enumeration: ["disabled", "shadow", "normal", "merged"]
|
|
}
|
|
},
|
|
actionType: "crud",
|
|
actions: Action_1.actions,
|
|
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: "refId",
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|