IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[eam_third_maintenance_work_plan_sheet]') AND type in (N'U')) DROP TABLE [dbo].[eam_third_maintenance_work_plan_sheet];
CREATE TABLE [dbo].[eam_third_maintenance_work_plan_sheet](
                                                              id NVARCHAR(32) NOT NULL,
                                                              create_by NVARCHAR(50),
                                                              create_time DATETIME2,
                                                              update_by NVARCHAR(50),
                                                              update_time DATETIME2,
                                                              del_flag INT,
                                                              equipment_code NVARCHAR(255),
                                                              equipment_name NVARCHAR(255),
                                                              factory_org_code NVARCHAR(255),
                                                              equipment_model NVARCHAR(255),
                                                              maintenance_date DATETIME2,
                                                              hf_code NVARCHAR(255),
                                                              PRIMARY KEY (id)
);

EXEC sp_addextendedproperty 'MS_Description', '三级保养工作计划单', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '设备统一编号', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', equipment_code;
EXEC sp_addextendedproperty 'MS_Description', '设备名称', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', equipment_name;
EXEC sp_addextendedproperty 'MS_Description', '使用部门', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', factory_org_code;
EXEC sp_addextendedproperty 'MS_Description', '设备型号', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', equipment_model;
EXEC sp_addextendedproperty 'MS_Description', '保养日期', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', maintenance_date;
EXEC sp_addextendedproperty 'MS_Description', 'hf编码', 'SCHEMA', dbo, 'table', eam_third_maintenance_work_plan_sheet, 'column', hf_code;



INSERT INTO [sys_dict_item]([id], [dict_id], [item_text], [item_value], [description], [sort_order], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1962764933997375489', N'1941372067586695170', N'三级保养工作计划单', N'THIRD_MAINTENANCE_WORK_PLAN_SHEET', N'', 18, 1, N'admin', '2025-09-02 14:30:01.0000000', N'admin', '2025-09-02 14:36:28.3440000'); GO
