oak-pay-business/es/oak-app-domain/Pay/Storage.js

111 lines
2.3 KiB
JavaScript

import { actions } from "./Action";
export const desc = {
attributes: {
price: {
notNull: true,
type: "money"
},
paid: {
notNull: true,
type: "money"
},
refunded: {
notNull: true,
type: "money"
},
channel: {
notNull: true,
type: "varchar",
params: {
length: 32
}
},
timeoutAt: {
type: "datetime"
},
forbidRefundAt: {
type: "datetime"
},
accountId: {
type: "ref",
ref: "account"
},
orderId: {
type: "ref",
ref: "order"
},
externalId: {
type: "varchar",
params: {
length: 80
}
},
meta: {
notNull: true,
type: "object"
},
applicationId: {
notNull: true,
type: "ref",
ref: "application"
},
phantom1: {
type: "varchar",
params: {
length: 32
}
},
phantom2: {
type: "varchar",
params: {
length: 32
}
},
phantom3: {
type: "int",
params: {
width: 4,
signed: true
}
},
phantom4: {
type: "int",
params: {
width: 8,
signed: true
}
},
iState: {
type: "enum",
enumeration: ["unpaid", "paying", "paid", "closed", "refunding", "partiallyRefunded", "refunded"]
}
},
actionType: "crud",
actions,
indexes: [
//索引
{
name: 'index_iState',
attributes: [
{
name: 'iState',
},
],
},
{
name: 'index_externalId_channel',
attributes: [
{
name: 'externalId',
},
{
name: 'channel',
}
],
config: {
unique: true,
}
}
]
};