From 8a81242ea5187759f38981039b87db41aed90a38 Mon Sep 17 00:00:00 2001
From: master <master@163.com>
Date: 星期二, 08 三月 2022 17:56:55 +0800
Subject: [PATCH] 更改实体类中的表名
---
src/app/modules/douMsg/controller/admin/douMsg.ts | 13 ++++
src/app/modules/douMsg/entity/douMsg.ts | 57 +++++++++++++++++++
src/app/modules/taskSetting/entity/taskSetting.ts | 20 +++---
src/app/modules/deviceGroup/entity/deviceGroup.ts | 2
src/app/modules/douMsg/config.ts | 16 +++++
src/app/modules/douMsg/controller/app/douMsg.ts | 15 +++++
6 files changed, 112 insertions(+), 11 deletions(-)
diff --git a/src/app/modules/deviceGroup/entity/deviceGroup.ts b/src/app/modules/deviceGroup/entity/deviceGroup.ts
index 9d50b8e..c4476b3 100644
--- a/src/app/modules/deviceGroup/entity/deviceGroup.ts
+++ b/src/app/modules/deviceGroup/entity/deviceGroup.ts
@@ -5,7 +5,7 @@
/**
* 鍟嗗搧
*/
-@EntityModel('devicegroup_fcs')
+@EntityModel('t_base_device_group')
export class DemodeviceGroupEntity extends BaseEntity {
@PrimaryGeneratedColumn({ comment: 'id' })
id: number;
diff --git a/src/app/modules/douMsg/config.ts b/src/app/modules/douMsg/config.ts
new file mode 100644
index 0000000..3c885ac
--- /dev/null
+++ b/src/app/modules/douMsg/config.ts
@@ -0,0 +1,16 @@
+import { Application } from 'egg';
+import { ModuleConfig } from '@cool-midway/core';
+
+/**
+ * 妯″潡閰嶇疆
+ */
+export default (app: Application) => {
+ return {
+ // 妯″潡鍚嶇О
+ name: 'douMsg',
+ // 妯″潡鎻忚堪
+ description: '鏂楄疆鏈轰俊鎭�',
+ // 涓棿浠讹紝鍙鏈ā鍧楁湁鏁�
+ middlewares: [],
+ } as ModuleConfig;
+};
\ No newline at end of file
diff --git a/src/app/modules/douMsg/controller/admin/douMsg.ts b/src/app/modules/douMsg/controller/admin/douMsg.ts
new file mode 100644
index 0000000..e56146b
--- /dev/null
+++ b/src/app/modules/douMsg/controller/admin/douMsg.ts
@@ -0,0 +1,13 @@
+import { Provide } from '@midwayjs/decorator';
+import { CoolController, BaseController } from '@cool-midway/core';
+import { DemodouMsgEntity } from '../../entity/douMsg';
+
+/**
+ * 鎻忚堪
+ */
+@Provide()
+@CoolController({
+ api: ['add', 'delete', 'update', 'info', 'list', 'page'],
+ entity: DemodouMsgEntity,
+})
+export class DemoAdmindouMsgController extends BaseController { }
diff --git a/src/app/modules/douMsg/controller/app/douMsg.ts b/src/app/modules/douMsg/controller/app/douMsg.ts
new file mode 100644
index 0000000..eaadeff
--- /dev/null
+++ b/src/app/modules/douMsg/controller/app/douMsg.ts
@@ -0,0 +1,15 @@
+import { Provide } from '@midwayjs/decorator';
+import { CoolController, BaseController } from '@cool-midway/core';
+import { DemodouMsgEntity } from '../../entity/douMsg';
+
+/**
+ * test
+ */
+@Provide()
+@CoolController(
+ {
+ api: ['add', 'delete', 'update', 'info', 'list', 'page'],
+ entity: DemodouMsgEntity
+ }
+)
+export class DemoAppdouMsgController extends BaseController { }
diff --git a/src/app/modules/douMsg/entity/douMsg.ts b/src/app/modules/douMsg/entity/douMsg.ts
new file mode 100644
index 0000000..1fbcf7b
--- /dev/null
+++ b/src/app/modules/douMsg/entity/douMsg.ts
@@ -0,0 +1,57 @@
+import { EntityModel } from '@midwayjs/orm';
+import { BaseEntity } from '@cool-midway/core';
+import { Column, PrimaryGeneratedColumn } from 'typeorm';
+
+/**
+ * 鍟嗗搧
+ */
+@EntityModel('t_base_dou_trubine')
+export class DemodouMsgEntity extends BaseEntity {
+ @PrimaryGeneratedColumn({ comment: 'id' })
+ id: number;
+
+ @Column({ comment: '鏂楄疆鏈哄悕绉�' })
+ trubine_name: string;
+
+ @Column({ comment: '鏂楄疆鏈虹紪鍙�' })
+ trubine_no: string;
+
+ @Column({ comment: '鏂楄疆鏈虹被鍒�', default: null })
+ trubine_type: string;
+
+ @Column({ comment: '鍨嬪彿灏哄', default: null })
+ trubine_size: string;
+
+ @Column({ comment: '鐓ゅ爢1', default: null })
+ rated_windrow: string;
+
+ @Column({ comment: '鐓ゅ爢2', default: null })
+ max_windrow: string;
+
+ @Column({ comment: 'rated_reclaiming', default: null })
+ rated_reclaiming: string;
+
+ @Column({ comment: 'max_reclaiming', default: null })
+ max_reclaiming: string;
+
+ @Column({ comment: '鏃嬭浆鐩村緞', default: null })
+ diameter_wheel: string;
+
+ @Column({ comment: '鏃嬭浆鐩村緞', default: null })
+ pie_height_up: string;
+
+ @Column({ comment: '鏃嬭浆鐩村緞', default: null })
+ pie_height_down: string;
+
+ @Column({ comment: 'dou_wheel_volumn', default: null })
+ dou_wheel_volumn: string;
+
+ @Column({ comment: 'petch_angle', default: null })
+ petch_angle: string;
+
+ @Column({ comment: '澶囨敞', default: null })
+ remark: string;
+
+ @Column({ comment: '鐘舵��', default: 1 })
+ status: boolean;
+}
diff --git a/src/app/modules/taskSetting/entity/taskSetting.ts b/src/app/modules/taskSetting/entity/taskSetting.ts
index 9928abe..5829c05 100644
--- a/src/app/modules/taskSetting/entity/taskSetting.ts
+++ b/src/app/modules/taskSetting/entity/taskSetting.ts
@@ -5,36 +5,36 @@
/**
* 鍟嗗搧
*/
-@EntityModel('tasksetting_fcs')
+@EntityModel('t_task_periodic_setting')
export class DemotaskSettingEntity extends BaseEntity {
@PrimaryGeneratedColumn({ comment: 'id' })
id: number;
@Column({ comment: '璁惧鍒嗙粍ID' })
- group_id: string;
+ group_id: number;
@Column({ comment: '鍛ㄦ湡浠诲姟' })
crontab_rule: string;
- @Column({ comment: '浠诲姟绫诲瀷', default: "鏃�" })
- task_type: string;
+ @Column({ comment: '浠诲姟绫诲瀷', default: null })
+ task_type: number;
- @Column({ comment: '浠诲姟鍐呭鎻忚堪', default: "鏃�" })
+ @Column({ comment: '浠诲姟鍐呭鎻忚堪', default: null })
task_content: string;
- @Column({ comment: '浠诲姟鍛戒护鏍煎紡', default: "鏃�" })
+ @Column({ comment: '浠诲姟鍛戒护鏍煎紡', default: null })
task_command: string;
- @Column({ comment: '浠诲姟鍙傛暟', default: "鏃�" })
+ @Column({ comment: '浠诲姟鍙傛暟', default: null })
task_params: string;
@Column({ comment: '璁剧疆浜�' })
operator: string;
- @Column({ comment: '浠诲姟缁撴潫鏃堕棿', default: "鏃�" })
- end_time: string;
+ @Column({ comment: '浠诲姟缁撴潫鏃堕棿', default: null })
+ end_time: Date;
- @Column({ comment: '澶囨敞', default: "鏃�" })
+ @Column({ comment: '澶囨敞', default: null })
remark: string;
@Column({ comment: '鐘舵��', default: true })
--
Gitblit v1.9.1