tachybase_todo/packages/plugins/workflow/src/collections/workflows.ts
Junyi 26f072e499
chore(plugin-workflow): add translation (#345)
* chore(plugin-workflow): add translation

* fix(plugin-workflow): type
2022-04-30 10:06:25 +08:00

65 lines
1.2 KiB
TypeScript

import { CollectionOptions } from '@nocobase/database';
export default {
name: 'workflows',
model: 'WorkflowModel',
title: '自动化',
fields: [
{
interface: 'string',
type: 'string',
name: 'title',
title: '工作流名称',
required: true
},
{
interface: 'boolean',
type: 'boolean',
name: 'enabled',
title: '启用'
},
{
interface: 'textarea',
type: 'text',
name: 'description',
title: '描述'
},
{
interface: 'select',
type: 'string',
title: '触发方式',
name: 'type',
required: true
},
{
interface: 'json',
type: 'jsonb',
title: '触发配置',
name: 'config',
required: true,
defaultValue: {}
},
{
interface: 'boolean',
type: 'boolean',
title: '使用事务',
name: 'useTransaction',
defaultValue: true
},
{
interface: 'linkTo',
type: 'hasMany',
name: 'nodes',
target: 'flow_nodes',
title: '流程节点'
},
{
interface: 'linkTo',
type: 'hasMany',
name: 'executions',
target: 'executions',
title: '触发执行'
}
]
} as CollectionOptions;