forked from Imfdj/egg-beehive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 添加任务优先级、任务状态、任务标签、任务-任务标签关系、任务类型、任务;
添加任务优先级、任务状态、任务标签、任务-任务标签关系、任务类型、任务;
- Loading branch information
Imfdj_lt
committed
Feb 21, 2021
1 parent
4cf7910
commit 8344f7b
Showing
74 changed files
with
2,981 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
'use strict'; | ||
|
||
const body = { | ||
taskId: { | ||
id: { type: 'number', required: true, description: 'id' }, | ||
}, | ||
taskBodyReq: { | ||
name: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 600, | ||
trim: true, | ||
example: '任务名称', | ||
description: '任务名称', | ||
}, | ||
parent_id: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
example: '0', | ||
description: '父ID', | ||
}, | ||
task_list_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '所属任务列表ID', | ||
}, | ||
task_state_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '任务状态', | ||
}, | ||
task_type_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '任务类型ID', | ||
}, | ||
task_priority_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '任务优先级ID', | ||
}, | ||
executor_id: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
example: '1', | ||
description: '执行者ID', | ||
}, | ||
start_date: { | ||
type: 'string', | ||
max: 30, | ||
trim: true, | ||
required: false, | ||
example: '2021-01-01 00:00:00', | ||
description: '开始时间', | ||
}, | ||
end_date: { | ||
type: 'string', | ||
max: 30, | ||
trim: true, | ||
required: false, | ||
example: '2021-01-01 00:00:00', | ||
description: '结束时间', | ||
}, | ||
remark: { | ||
type: 'string', | ||
required: false, | ||
trim: true, | ||
example: '', | ||
description: '任务备注', | ||
}, | ||
is_privacy: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
max: 1, | ||
example: '0', | ||
description: '是否为隐私模式.1为true,0为false', | ||
}, | ||
is_recycle: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
max: 1, | ||
example: '0', | ||
description: '是否进入回收站.1为true,0为false', | ||
}, | ||
likes: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
example: '0', | ||
description: '点赞数', | ||
}, | ||
sort: { | ||
type: 'number', | ||
required: false, | ||
min: 0, | ||
example: '0', | ||
description: '排序,越小越靠前', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
...body, | ||
taskPutBodyReq: { | ||
...body.taskId, | ||
...body.taskBodyReq, | ||
}, | ||
taskDelBodyReq: { | ||
ids: { | ||
type: 'array', | ||
required: true, | ||
itemType: 'number', | ||
description: 'ids', | ||
example: [1, 2], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
|
||
const body = { | ||
task_priorityId: { | ||
id: { type: 'number', required: true, description: 'id' }, | ||
}, | ||
task_priorityBodyReq: { | ||
name: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 30, | ||
trim: true, | ||
example: '优先级名称', | ||
description: '优先级名称', | ||
}, | ||
color: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 10, | ||
trim: true, | ||
example: '颜色', | ||
description: '颜色', | ||
}, | ||
sort: { | ||
type: 'number', | ||
required: false, | ||
max: 999999999, | ||
example: '0', | ||
description: '排序,越大越靠前', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
...body, | ||
task_priorityPutBodyReq: { | ||
...body.task_priorityId, | ||
...body.task_priorityBodyReq, | ||
}, | ||
task_priorityDelBodyReq: { | ||
ids: { | ||
type: 'array', | ||
required: true, | ||
itemType: 'number', | ||
description: 'ids', | ||
example: [1, 2], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
'use strict'; | ||
|
||
const body = { | ||
task_stateId: { | ||
id: { type: 'number', required: true, description: 'id' }, | ||
}, | ||
task_stateBodyReq: { | ||
name: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 50, | ||
trim: true, | ||
example: '状态名称', | ||
description: '状态名称', | ||
}, | ||
color: { | ||
type: 'string', | ||
required: false, | ||
min: 1, | ||
max: 16, | ||
trim: true, | ||
example: '颜色', | ||
description: '颜色', | ||
}, | ||
icon: { | ||
type: 'string', | ||
required: false, | ||
min: 1, | ||
max: 50, | ||
trim: true, | ||
example: '图标', | ||
description: '图标', | ||
}, | ||
sort: { | ||
type: 'number', | ||
required: false, | ||
max: 999999999, | ||
example: '0', | ||
description: '排序,越大越靠前', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
...body, | ||
task_statePutBodyReq: { | ||
...body.task_stateId, | ||
...body.task_stateBodyReq, | ||
}, | ||
task_stateDelBodyReq: { | ||
ids: { | ||
type: 'array', | ||
required: true, | ||
itemType: 'number', | ||
description: 'ids', | ||
example: [1, 2], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict'; | ||
|
||
const body = { | ||
task_tagId: { | ||
id: { type: 'number', required: true, description: 'id' }, | ||
}, | ||
task_tagBodyReq: { | ||
name: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 100, | ||
trim: true, | ||
example: '标签名称', | ||
description: '标签名称', | ||
}, | ||
color: { | ||
type: 'string', | ||
required: true, | ||
min: 1, | ||
max: 30, | ||
trim: true, | ||
example: '颜色', | ||
description: '颜色', | ||
}, | ||
project_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '所属项目ID', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
...body, | ||
task_tagPutBodyReq: { | ||
...body.task_tagId, | ||
...body.task_tagBodyReq, | ||
}, | ||
task_tagDelBodyReq: { | ||
ids: { | ||
type: 'array', | ||
required: true, | ||
itemType: 'number', | ||
description: 'ids', | ||
example: [1, 2], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use strict'; | ||
|
||
const body = { | ||
task_task_tagId: { | ||
id: { type: 'number', required: true, description: 'id' }, | ||
}, | ||
task_task_tagBodyReq: { | ||
task_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '任务ID', | ||
}, | ||
task_tag_id: { | ||
type: 'number', | ||
required: true, | ||
min: 1, | ||
example: '1', | ||
description: '任务标签ID', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
...body, | ||
task_task_tagPutBodyReq: { | ||
...body.task_task_tagId, | ||
...body.task_task_tagBodyReq, | ||
}, | ||
task_task_tagDelBodyReq: { | ||
ids: { | ||
type: 'array', | ||
required: true, | ||
itemType: 'number', | ||
description: 'ids', | ||
example: [1, 2], | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.