extrafile中的属性required设置
This commit is contained in:
parent
64dca4a470
commit
16df186172
|
|
@ -5,10 +5,10 @@ export interface Schema extends EntityShape {
|
|||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
tag1: String<16>;
|
||||
tag2: String<16>;
|
||||
tag1?: String<16>;
|
||||
tag2?: String<16>;
|
||||
filename: String<256>;
|
||||
md5: Text;
|
||||
md5?: Text;
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
extra1?: Text;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ var IActionDef = {
|
|||
stm: {
|
||||
online: ['offline', 'online'],
|
||||
offline: ['online', 'offline'],
|
||||
disabled: [['online', 'offline'], 'disabled'],
|
||||
disabled: [['online', 'offline'], 'disabled']
|
||||
},
|
||||
is: 'offline',
|
||||
is: 'offline'
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "online", "offline", "disabled"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ var IActionDef = {
|
|||
stm: {
|
||||
send: ['unsent', 'sending'],
|
||||
success: ['sending', 'sent'],
|
||||
fail: ['sending', 'failure'],
|
||||
fail: ['sending', 'failure']
|
||||
},
|
||||
is: 'unsent',
|
||||
is: 'unsent'
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "send", "success", "fail"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -50,17 +50,17 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
},
|
||||
{
|
||||
name: 'code',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
},
|
||||
{
|
||||
name: '$$createAt$$',
|
||||
direction: 'DESC',
|
||||
direction: 'DESC'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'email',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ export declare type OpSchema = EntityShape & {
|
|||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
tag1: String<16>;
|
||||
tag2: String<16>;
|
||||
tag1?: String<16> | null;
|
||||
tag2?: String<16> | null;
|
||||
filename: String<256>;
|
||||
md5: Text;
|
||||
md5?: Text | null;
|
||||
entity: "article" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
|
|
@ -29,10 +29,10 @@ export declare type Schema = EntityShape & {
|
|||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
tag1: String<16>;
|
||||
tag2: String<16>;
|
||||
tag1?: String<16> | null;
|
||||
tag2?: String<16> | null;
|
||||
filename: String<256>;
|
||||
md5: Text;
|
||||
md5?: Text | null;
|
||||
entity: "article" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
|
|
|
|||
|
|
@ -29,14 +29,12 @@ exports.desc = {
|
|||
}
|
||||
},
|
||||
tag1: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
}
|
||||
},
|
||||
tag2: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
|
|
@ -50,7 +48,6 @@ exports.desc = {
|
|||
}
|
||||
},
|
||||
md5: {
|
||||
notNull: true,
|
||||
type: "text"
|
||||
},
|
||||
entity: {
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ exports.actions = ["count", "stat", "download", "select", "aggregate", "create",
|
|||
var IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
fail: ['sending', 'failure']
|
||||
}
|
||||
};
|
||||
var VisitActionDef = {
|
||||
stm: {
|
||||
visit: ['unvisited', 'visited'],
|
||||
visit: ['unvisited', 'visited']
|
||||
},
|
||||
is: 'unvisited',
|
||||
is: 'unvisited'
|
||||
};
|
||||
exports.ActionDefDict = {
|
||||
iState: IActionDef,
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ exports.ActionDefDict = exports.actions = void 0;
|
|||
var IActionDef = {
|
||||
stm: {
|
||||
apply: ['active', 'applied'],
|
||||
abandon: ['active', 'abandoned'],
|
||||
abandon: ['active', 'abandoned']
|
||||
},
|
||||
is: 'active',
|
||||
is: 'active'
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "apply", "abandon"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'iState',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ exports.actions = ["count", "stat", "download", "select", "aggregate", "create",
|
|||
var IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure'],
|
||||
fail: ['sending', 'failure']
|
||||
},
|
||||
is: 'sending',
|
||||
is: 'sending'
|
||||
};
|
||||
exports.ActionDefDict = {
|
||||
iState: IActionDef
|
||||
|
|
|
|||
|
|
@ -50,20 +50,20 @@ exports.desc = {
|
|||
name: 'index_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name',
|
||||
name: 'name'
|
||||
},
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_entity',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity',
|
||||
name: 'entity'
|
||||
},
|
||||
{
|
||||
name: 'entityId',
|
||||
name: 'entityId'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ var IdActionDef = {
|
|||
stm: {
|
||||
verify: ['unverified', 'verifying'],
|
||||
accept: [['unverified', 'verifying'], 'verified'],
|
||||
reject: [['verifying', 'verified'], 'unverified'],
|
||||
reject: [['verifying', 'verified'], 'unverified']
|
||||
},
|
||||
is: 'unverified',
|
||||
is: 'unverified'
|
||||
};
|
||||
var UserActionDef = {
|
||||
stm: {
|
||||
|
|
@ -15,8 +15,8 @@ var UserActionDef = {
|
|||
disable: [['normal', 'shadow'], 'disabled'],
|
||||
enable: ['disabled', 'normal'],
|
||||
mergeTo: [['normal', 'shadow'], 'merged'],
|
||||
mergeFrom: ['normal', 'normal'],
|
||||
},
|
||||
mergeFrom: ['normal', 'normal']
|
||||
}
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "activate", "disable", "enable", "mergeTo", "mergeFrom", "verify", "accept", "reject"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -61,33 +61,33 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'birth',
|
||||
direction: 'ASC',
|
||||
direction: 'ASC'
|
||||
},
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_fulltext',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name',
|
||||
name: 'name'
|
||||
},
|
||||
{
|
||||
name: 'nickname',
|
||||
name: 'nickname'
|
||||
}
|
||||
],
|
||||
config: {
|
||||
type: 'fulltext',
|
||||
parser: 'ngram',
|
||||
parser: 'ngram'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'index_userState_refId',
|
||||
attributes: [
|
||||
{
|
||||
name: 'userState',
|
||||
name: 'userState'
|
||||
},
|
||||
{
|
||||
name: "refId",
|
||||
name: "refId"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,23 +81,23 @@ exports.desc = {
|
|||
name: 'index_entity_entityId',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity',
|
||||
name: 'entity'
|
||||
},
|
||||
{
|
||||
name: 'entityId',
|
||||
name: 'entityId'
|
||||
},
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_uuid',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired',
|
||||
name: 'expired'
|
||||
},
|
||||
{
|
||||
name: 'expiresAt',
|
||||
name: 'expiresAt'
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,15 +40,15 @@ exports.desc = {
|
|||
name: 'index_text_application',
|
||||
attributes: [
|
||||
{
|
||||
name: 'text',
|
||||
name: 'text'
|
||||
},
|
||||
{
|
||||
name: "applicationId",
|
||||
name: "applicationId"
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true,
|
||||
},
|
||||
unique: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -79,34 +79,34 @@ exports.desc = {
|
|||
name: 'index_entity_entityId_tag',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity',
|
||||
name: 'entity'
|
||||
},
|
||||
{
|
||||
name: 'entityId',
|
||||
name: 'entityId'
|
||||
},
|
||||
{
|
||||
name: 'tag',
|
||||
name: 'tag'
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_expired_expiresAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired',
|
||||
name: 'expired'
|
||||
},
|
||||
{
|
||||
name: 'expiresAt',
|
||||
name: 'expiresAt'
|
||||
},
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_url',
|
||||
attributes: [
|
||||
{
|
||||
name: 'url',
|
||||
name: 'url'
|
||||
},
|
||||
],
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ export interface Schema extends EntityShape {
|
|||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
tag1: String<16>;
|
||||
tag2: String<16>;
|
||||
tag1?: String<16>;
|
||||
tag2?: String<16>;
|
||||
filename: String<256>;
|
||||
md5: Text;
|
||||
md5?: Text;
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
extra1?: Text;
|
||||
|
|
|
|||
Loading…
Reference in New Issue