oak-pay-business/es/entities/Pay.js

124 lines
3.6 KiB
JavaScript

;
export const IActionDef = {
stm: {
startPaying: ['unpaid', 'paying'],
succeedPaying: [['unpaid', 'paying'], 'paid'],
close: [['unpaid', 'paying'], 'closed'],
startRefunding: [['paid', 'partiallyRefunded', 'refunding'], 'refunding'],
refundAll: [['paid', 'refunding', 'partiallyRefunded'], 'refunded'],
refundPartially: [['paid', 'refunding', 'partiallyRefunded'], 'partiallyRefunded'],
stopRefunding: ['refunding', 'paid'],
},
is: 'unpaid',
};
export const entityDesc = {
indexes: [
//索引
{
name: 'index_iState',
attributes: [
{
name: 'iState',
},
],
},
{
name: 'index_externalId_channel',
attributes: [
{
name: 'externalId',
},
{
name: 'channel',
}
],
config: {
unique: true,
}
},
{
name: 'refundable_gap',
attributes: [
{
name: 'refundable',
},
{
name: 'forbidRefundAt',
}
],
}
],
locales: {
zh_CN: {
name: '订单',
attr: {
price: '应支付金额',
paid: '已支付金额',
refunded: '已退款金额',
iState: '支付状态',
channel: '支付渠道',
order: '所属订单',
timeoutAt: '过期时间',
forbidRefundAt: '停止退款时间',
refundable: '是否可退款',
account: '充值帐户',
meta: '支付metadata',
externalId: '外部订单Id',
opers: '被关联帐户操作',
application: '关联应用',
creator: '创建者',
phantom1: '索引项一',
phantom2: '索引项二',
phantom3: '索引项三',
phantom4: '索引项四',
},
action: {
startPaying: '开始支付',
continuePaying: '继续支付',
succeedPaying: '支付成功',
close: '关闭',
startRefunding: '开始退款',
refundAll: '完全退款',
refundPartially: '部分退款',
closeRefund: '禁止退款',
stopRefunding: '停止退款',
},
v: {
iState: {
unpaid: '待付款',
paying: '支付中',
paid: '已付款',
closed: '已关闭',
refunding: '退款中',
refunded: '已退款',
partiallyRefunded: '已部分退款',
},
}
},
},
style: {
icon: {
startPaying: '',
succeedPaying: '',
close: '',
startRefunding: '',
refundAll: '',
refundPartially: '',
closeRefund: '',
stopRefunding: '',
continuePaying: '',
},
color: {
iState: {
unpaid: '#48C9B0',
paid: '#3498DB',
paying: '#D6EAF8',
closed: '#5D6D7E',
refunded: '#FAE5D3',
partiallyRefunded: '#F0B27A',
refunding: '#CA6F1E'
},
}
}
};