feat: 新增客户拜访、建筑、房间及项目全流程业务模块
本次提交新增了客户拜访、客户建筑、客户房间的完整业务模块,同时补充了项目勘察、项目方案、合同管理、项目验收、回访记录的全项目流程相关功能,包括: 1. 新增对应业务的实体类、DTO、控制器、服务层代码 2. 完善RBAC权限映射配置 3. 添加前端API、路由及页面菜单配置 4. 更新数据库种子数据补充菜单和权限绑定
This commit is contained in:
1 parent
f61ade107b
commit
219091f864
53 files changed
+5990
-6
No files matched your search
@@ -0,0 +1,49 @@
|
||||
import { Column, Model, Table, DataType, CreatedAt, ForeignKey, BelongsTo } from "sequelize-typescript";
|
||||
import Customer from "./customer.entity";
|
||||
|
||||
@Table({
|
||||
tableName: "customer_visit",
|
||||
comment: "客户拜访信息表",
|
||||
timestamps: true,
|
||||
createdAt: "created_at",
|
||||
updatedAt: false,
|
||||
indexes: [
|
||||
{ name: "idx_visit_customer", fields: ["customer_id"] },
|
||||
{ name: "idx_visit_salesman", fields: ["salesman_id"] }
|
||||
]
|
||||
})
|
||||
export default class CustomerVisit extends Model {
|
||||
@Column({ type: DataType.BIGINT, autoIncrement: true, primaryKey: true })
|
||||
id!: number;
|
||||
|
||||
@Column({ type: DataType.STRING(64), allowNull: false, unique: true, field: "visit_no", comment: "拜访单号(唯一)" })
|
||||
visitNo!: string;
|
||||
|
||||
@ForeignKey(() => Customer)
|
||||
@Column({ type: DataType.BIGINT, allowNull: false, field: "customer_id", comment: "客户ID" })
|
||||
customerId!: number;
|
||||
|
||||
@Column({ type: DataType.STRING(64), allowNull: false, field: "visit_person", comment: "拜访人" })
|
||||
visitPerson!: string;
|
||||
|
||||
@Column({ type: DataType.STRING(20), field: "visit_phone", comment: "拜访人电话" })
|
||||
visitPhone!: string;
|
||||
|
||||
@Column({ type: DataType.TEXT, field: "visit_content", comment: "拜访内容" })
|
||||
visitContent!: string;
|
||||
|
||||
@Column({ type: DataType.DATEONLY, field: "visit_time", comment: "拜访时间" })
|
||||
visitTime!: string;
|
||||
|
||||
@Column({ type: DataType.BIGINT, field: "salesman_id", comment: "业务员(关联sys_user.id)" })
|
||||
salesmanId!: number;
|
||||
|
||||
@Column({ type: DataType.SMALLINT, defaultValue: 0, field: "will_plan", comment: "是否做方案:0不同意 1同意" })
|
||||
willPlan!: number;
|
||||
|
||||
@BelongsTo(() => Customer)
|
||||
customer!: Customer;
|
||||
|
||||
@CreatedAt
|
||||
created_at!: Date;
|
||||
}
|
||||
Reference in new issue
Block a user