import { actions } from "./Action"; export const desc = { attributes: { origin: { notNull: true, type: "enum", enumeration: ["mobile", "email"] }, content: { notNull: true, type: "varchar", params: { length: 32 } }, code: { notNull: true, type: "varchar", params: { length: 8 } }, visitorId: { notNull: true, type: "text" }, reason: { type: "text" }, env: { notNull: true, type: "object" }, expired: { notNull: true, type: "boolean" }, expiresAt: { notNull: true, type: "datetime" }, type: { notNull: true, type: "enum", enumeration: ["login", "changePassword", "confirm"] }, applicationId: { type: "ref", ref: "application" }, iState: { type: "enum", enumeration: ["unsent", "sending", "sent", "failure"] } }, actionType: "crud", actions, indexes: [ { name: 'index_mobile_code', attributes: [ { name: 'content', direction: 'ASC', }, { name: 'code', direction: 'ASC', }, { name: '$$createAt$$', direction: 'DESC', } ], } ] };