实现工单类型(模板包)管理 API
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Read the designs in issues #2, #3, and #4, then check the tenant and member work in #11 and the shared fixtures in #19. Start with the ticket_types migration and repository, followed by the Go validators in internal/templating and seed/*.yaml. Done means validator unit tests cover invalid examples and the create, query, update, and deactivate integration tests pass; an open linked pull request (#22) shows work is already underway.
Written by the indexing model from the issue text.
Description
Background
模板包的管理侧。设计见 #4(各 JSONB 结构与校验规则)、#2(表)、#3(端点)。本 issue 实现工单类型的 CRUD 与全部校验器。
Technical requirement
- 端点:类型列表 / 创建 / 详情 / 更新 / 停用启用(#3 清单),角色 tenant_admin;
- Go 校验器(独立包
internal/templating,便于测试与前端对齐):- form_schema:类型集、字段 key 蛇形且不重复、options / 校验项合法;
- workflow:唯一 initial、至少一个 final、from / to 存在、action 同状态下不重复;
- assignment:
mode枚举合法(P0 仅manual); - view_config:field 引用必须存在于内置字段或 form_schema;
- sla_policy:数值为非负整数即可(计时 P1);
- 校验错误返回
VALIDATION_FAILED,message逐字段列出原因(英文,面向开发者); - 新租户导入种子模板包:读取
seed/*.yaml,复制为该租户的初始类型(is_builtin = true); - 校验器测试 fixtures 与
seed/共用(见 #19),保证前后端语义同源。
Expect
- 校验器单测覆盖每个非法样例(未知字段类型、重复 key、悬空状态引用等);
- 创建 - 查询 - 更新 - 停用的接口集成测试通过。
Potential TODO list
- ticket_types 迁移与 repository
- 校验器包 + 单测
- CRUD 端点与集成测试
- 种子导入机制
依赖
#4 评审通过;#11(租户与成员,登录可用)。
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LinuxSuRen/tick-flow
-
项目门面:logo、README 与仓库 AboutPossibly taken @linuxsuren-fs claimed this 9 days ago. Opendocumentation good first issue help wanted P0
Difficulty 4/5 3-5 days Newbie friendliness 20/100
LinuxSuRen/tick-flow#20 ·
-
编写四个内置种子模板包Possibly taken @linuxsuren-fs claimed this 9 days ago. Opengood first issue help wanted P0
Difficulty 4/5 3-5 days Newbie friendliness 35/100
LinuxSuRen/tick-flow#19 ·
-
实现处理工作台前端:列表、详情与处理动作Possibly taken @linuxsuren-fs claimed this 9 days ago. Openhelp wanted P0
Difficulty 5/5 Over a week Newbie friendliness 25/100
LinuxSuRen/tick-flow#18 ·
-
实现提交门户前端:表单渲染器与我的工单Possibly taken @linuxsuren-fs claimed this 9 days ago. Openhelp wanted P0
Difficulty 4/5 3-5 days Newbie friendliness 25/100
LinuxSuRen/tick-flow#17 ·
-
实现站内通知与邮件通知Possibly taken @linuxsuren-fs claimed this 9 days ago. Openhelp wanted P0
Difficulty 4/5 3-5 days Newbie friendliness 25/100
LinuxSuRen/tick-flow#16 ·
All issues in LinuxSuRen/tick-flow
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
vetro-protocol/vetro-monorepo#1262 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ProyectoRespira/respira-webapp#334 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100