优化cursor提示

This commit is contained in:
xiaopeng 2025-02-10 02:02:42 +08:00
parent 40bba0a4d4
commit 9f5c92b73a

View File

@ -36,17 +36,16 @@
│ │ └── menu.json(可选,初始化该模块的菜单) │ │ └── menu.json(可选,初始化该模块的菜单)
# 其它 # 其它
- 始终使用中文回复,包括代码注释等
- 始终使用中文回复,包括代码注释等 - `@midwayjs/decorator`,已弃用,使用`@midwayjs/core`
- `@midwayjs/decorator`,已弃用,使用`@midwayjs/core` - 不要使用自定义sql来操作数据库而是使用typeorm的api统计相关的可以考虑使用原生sql
- 不要使用自定义sql来操作数据库而是使用typeorm的api统计相关的可以考虑使用原生sql - Controller中不允许重写`add`、`delete`、`update`、`info`、`list`、`page`方法
- Controller中不允许重写`add`、`delete`、`update`、`info`、`list`、`page`方法 - Controller不需要加@Provide()注解
- Controller不需要加@Provide()注解 - page接口关联表查询一般写在Controller的pageQueryOp中尽量不要使用自定义sql
- page接口关联表查询一般写在Controller的pageQueryOp中尽量不要使用自定义sql - Entity字段使用驼峰命名studentNo
- Entity字段使用驼峰命名studentNo - Entity不允许使用@ManyToOne、@OneToMany等外键关系
- Entity不允许使用@ManyToOne、@OneToMany等外键关系 - Entity的BaseEntity引用固定为`import { BaseEntity } from '../../base/entity/base';`,禁止修改层级
- Entity的BaseEntity引用固定为`import { BaseEntity } from '../../base/entity/base';`,禁止修改层级 - 创建api接口时不要多层级如`/student/detail`,改为`/studentDetail`,用驼峰法;
- 创建api接口时不要多层级如`/student/detail`,改为`/studentDetail`,用驼峰法; - 本项目是版本8.x所有代码都需要按照新的写法进行编写如Entity字典的配置
- 本项目是版本8.x所有代码都需要按照新的写法进行编写如Entity字典的配置 - 文件的命名不要使用驼峰法而是使用下划线法student_info.entity.ts另外禁止太啰嗦比如student模块下的学生信息不要写成student_info 而是写成info.ts班级信息class.ts不要写成student_class.ts
- 文件的命名不要使用驼峰法而是使用下划线法student_info.entity.ts另外禁止太啰嗦比如student模块下的学生信息不要写成student_info 而是写成info.ts班级信息class.ts不要写成student_class.ts - 创建模块代码需要读取.cursor/rules的module.mdc、controller.mdc、service.mdc、db.mdc其它的rules根据需要进行参考