2022-01-28 00:25:26 +08:00
|
|
|
import { CollectionOptions } from '@nocobase/database';
|
2022-01-09 22:22:26 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'jobs',
|
|
|
|
title: '流程记录',
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
interface: 'linkTo',
|
|
|
|
type: 'belongsTo',
|
|
|
|
name: 'execution',
|
|
|
|
title: '所属流程'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
interface: 'linkTo',
|
|
|
|
type: 'belongsTo',
|
|
|
|
name: 'node',
|
|
|
|
target: 'flow_nodes',
|
|
|
|
title: '所属节点'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
interface: 'linkTo',
|
|
|
|
type: 'belongsTo',
|
|
|
|
name: 'upstream',
|
|
|
|
target: 'jobs',
|
|
|
|
title: '上游记录'
|
|
|
|
},
|
|
|
|
// pending / resolved / rejected
|
|
|
|
{
|
|
|
|
interface: 'status',
|
|
|
|
type: 'integer',
|
|
|
|
name: 'status',
|
|
|
|
title: '处理状态'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
interface: 'json',
|
|
|
|
type: 'jsonb',
|
|
|
|
name: 'result',
|
|
|
|
title: '处理结果'
|
|
|
|
},
|
|
|
|
// TODO: possibly need node snapshot in case if node has been changed
|
|
|
|
// {
|
|
|
|
// interface: 'json',
|
|
|
|
// type: 'jsonb',
|
|
|
|
// name: 'nodeSnapshot',
|
|
|
|
// title: 'node snapshot'
|
|
|
|
// }
|
|
|
|
]
|
2022-01-28 00:25:26 +08:00
|
|
|
} as CollectionOptions;
|