/*
 Navicat Premium Dump SQL

 Source Server         : localhost-sqlserver
 Source Server Type    : SQL Server
 Source Server Version : 11003000 (11.00.3000)
 Source Host           : localhost:1433
 Source Catalog        : LXZN_TEST_430_NEW
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 11003000 (11.00.3000)
 File Encoding         : 65001

 Date: 11/07/2025 10:50:33
*/


-- ----------------------------
-- Table structure for eam_inspection_order_detail
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[eam_inspection_order_detail]') AND type IN ('U'))
	DROP TABLE [dbo].[eam_inspection_order_detail]
GO

CREATE TABLE [dbo].[eam_inspection_order_detail] (
  [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NULL,
  [item_code] int  NULL,
  [item_name] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [item_demand] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [inspection_result] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NULL,
  [report_flag] nvarchar(1) COLLATE Chinese_PRC_CI_AS  NULL,
  [exception_description] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_time] datetime2(7)  NULL,
  [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [update_time] datetime2(7)  NULL
)
GO

ALTER TABLE [dbo].[eam_inspection_order_detail] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'工单ID',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'order_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目序号',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'item_code'
GO

EXEC sp_addextendedproperty
'MS_Description', N'保养项目',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'item_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'保养要求',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'item_demand'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点检结果;正常、异常、关机、故障',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'inspection_result'
GO

EXEC sp_addextendedproperty
'MS_Description', N'报修标记',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'report_flag'
GO

EXEC sp_addextendedproperty
'MS_Description', N'异常描述',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'exception_description'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建人',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'create_by'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新人',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'update_by'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail',
'COLUMN', N'update_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点检工单明细',
'SCHEMA', N'dbo',
'TABLE', N'eam_inspection_order_detail'
GO


-- ----------------------------
-- Primary Key structure for table eam_inspection_order_detail
-- ----------------------------
ALTER TABLE [dbo].[eam_inspection_order_detail] ADD CONSTRAINT [PK__eam_insp__3213E83FB31E58DA] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

