oak-general-business/lib/oak-app-domain/UserEntityGrant/Storage.js

100 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: {
relationEntity: {
notNull: true,
type: "varchar",
params: {
length: 32
}
},
relationEntityFilter: {
notNull: true,
type: "object"
},
relationIds: {
notNull: true,
type: "object"
},
entity: {
notNull: true,
type: "varchar",
params: {
length: 32
}
},
entityId: {
notNull: true,
type: "varchar",
params: {
length: 64
}
},
type: {
notNull: true,
type: "enum",
enumeration: ["grant", "transfer"]
},
rule: {
notNull: true,
type: "enum",
enumeration: ["single", "all", "free"]
},
ruleOnRow: {
notNull: true,
type: "enum",
enumeration: ["single", "all", "free"]
},
multiple: {
type: "boolean"
},
remark: {
type: "text"
},
granterId: {
notNull: true,
type: "ref",
ref: "user"
},
qrCodeType: {
notNull: true,
type: "enum",
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
},
expiresAt: {
type: "datetime"
},
expired: {
type: "boolean"
},
redirectTo: {
type: "object"
},
claimUrl: {
notNull: true,
type: "varchar",
params: {
length: 128
}
}
},
actionType: "crud",
actions: Action_1.actions,
indexes: [
{
name: 'index_expired_expiredAt',
attributes: [
{
name: 'expired',
},
{
name: 'expiresAt',
},
],
}
]
};