CREATE TABLE [dbo].[mom_base_client] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abbreviation] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [affiliation_industry] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [address] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_client_id] 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

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

CREATE TABLE [dbo].[mom_base_client_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_client_category_id] 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

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

CREATE TABLE [dbo].[mom_base_client_contact] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sex] nvarchar(10) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [position] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [phone] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [email] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [default_value] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_contact_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_contact_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_contact_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_contact_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [client_contact_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_client_contact_id] 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

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

CREATE TABLE [dbo].[mom_base_constructor] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_constructor_id] 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

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

CREATE TABLE [dbo].[mom_base_department] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_category_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [audit_status] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [department_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_department_id] 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

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

CREATE TABLE [dbo].[mom_base_department_category] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_department_category_id] 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

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

CREATE TABLE [dbo].[mom_base_encode_rule] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [rule_code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [rule_name] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [zero_basis] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code_example] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code_length] int DEFAULT 0 NULL,
    [permission_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(2) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT 0 NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [is_broken_code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [table_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [field_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_encode_rule_id] 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

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

CREATE TABLE [dbo].[mom_base_encode_rule_depart] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code_rule_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT 0 NULL,
    CONSTRAINT [PK_mom_base_encode_rule_depart_id] 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

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

CREATE TABLE [dbo].[mom_base_encode_rule_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code_rule_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code_element] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [element_value] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [length] int DEFAULT 0 NULL,
    [sequence] int DEFAULT 0 NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT 0 NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [time_format] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_encode_rule_detail_id] 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

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

CREATE TABLE [dbo].[mom_base_enterprise] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [credit_code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [full_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [english_name] nvarchar(200) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [address] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [opening_bank] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [account] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [contact] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [phone_number] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [company_telephone] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [email] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT N'9999' NULL,
    [enterprise_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_enterprise_id] 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

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

CREATE TABLE [dbo].[mom_base_enterprise_administrator] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [administrator_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sys_administrator_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auth_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sys_administrator_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sys_administrator_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sys_administrator_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sys_administrator_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_enterprise_administrator_id] 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

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

CREATE TABLE [dbo].[mom_base_equipment_category] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_equipment_category_id] 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

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

CREATE TABLE [dbo].[mom_base_equipment_supplier] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_supplier_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_supplier_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_supplier_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_supplier_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_supplier_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_equipment_supplier_id] 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

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

CREATE TABLE [dbo].[mom_base_factory_element_category] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [factory_element_category_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_element_category_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_element_category_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_element_category_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_element_category_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_factory_element_category_id] 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

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

CREATE TABLE [dbo].[mom_base_factory_model] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_element_category_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [virtual_flag] int DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_factory_model_id] 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

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

CREATE TABLE [dbo].[mom_base_material] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_material_id] 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

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

CREATE TABLE [dbo].[mom_base_material_category] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_material_category_id] 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

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

CREATE TABLE [dbo].[mom_base_production_line_warehouse] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [workshop_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_production_line_warehouse_id] 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

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

CREATE TABLE [dbo].[mom_base_production_line_warehouse_client] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [client_id] nvarchar(36) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_production_line_warehouse_client_id] 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

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

CREATE TABLE [dbo].[mom_base_shift] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [start_time] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [end_time] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [span_days] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [description] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [total_hours] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [rest_hours] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_shift_id] 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

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

CREATE TABLE [dbo].[mom_base_shift_category] (
    [id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [description] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_rest_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_rest_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_rest_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_rest_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_rest_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_shift_category_id] 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

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

CREATE TABLE [dbo].[mom_base_shift_rest_time] (
    [id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [shift_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [start_time] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [end_time] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [span_days] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [description] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [rest_time] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shift_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_shift_rest_time_id] 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

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

CREATE TABLE [dbo].[mom_base_supplier] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abbreviation] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [affiliation_industry] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [address] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_supplier_id] 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

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

CREATE TABLE [dbo].[mom_base_supplier_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_supplier_category_id] 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

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

CREATE TABLE [dbo].[mom_base_supplier_contact] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sex] nvarchar(10) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [position] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [phone] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [email] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [default_value] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_contact_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_contact_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_contact_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_contact_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_contact_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_supplier_contact_id] 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

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

CREATE TABLE [dbo].[mom_base_team] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [site_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [area_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [production_line_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [type] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_team_id] 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

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

CREATE TABLE [dbo].[mom_base_unit] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_unit_id] 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

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

CREATE TABLE [dbo].[mom_base_unit_category] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pid] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_unit_category_id] 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

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

CREATE TABLE [dbo].[mom_base_unit_conversion] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [target_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [conversion_ratio] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_unit_conversion_id] 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

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

CREATE TABLE [dbo].[mom_base_warehouse] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [whether_waste_warehouse] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location_manage] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [whether_automation_warehouse] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [service_object] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_warehouse_id] 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

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

CREATE TABLE [dbo].[mom_base_warehouse_area] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [quantity] decimal(38) DEFAULT NULL NULL,
    [create_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_warehouse_area_id] 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

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

CREATE TABLE [dbo].[mom_base_warehouse_client] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [client_id] nvarchar(36) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [element_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_client_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_warehouse_client_id] 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

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

CREATE TABLE [dbo].[mom_base_warehouse_location] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [warehouse_area_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [xnum] decimal(38) DEFAULT NULL NULL,
    [ynum] decimal(38) DEFAULT NULL NULL,
    [znum] decimal(38) DEFAULT NULL NULL,
    [create_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_warehouse_location_id] 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

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

CREATE TABLE [dbo].[mom_base_work_center] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [service_category] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_category] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_model_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [feeding_area] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [baiting_area] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [work_center_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [remark] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [parent_factory_model_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_work_center_id] 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

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

CREATE TABLE [dbo].[mom_base_work_center_equipment] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [work_center_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_equipment_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_equipment_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_equipment_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_equipment_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_equipment_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_work_center_equipment_id] 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

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

CREATE TABLE [dbo].[mom_base_work_center_user] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [work_center_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_user_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_user_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_user_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_user_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_center_user_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_base_work_center_user_id] 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

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

CREATE TABLE [dbo].[mom_eam_calibration_order] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [management_mode] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_result] nvarchar(5) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [issue_time] datetime2(0) DEFAULT NULL NULL,
    [calibration_result_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_item_num] int DEFAULT NULL NULL,
    [calibration_item_pass_num] int DEFAULT NULL NULL,
    [calibration_item_fail_num] int DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [difference] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda6] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_time] datetime2(0) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_calibration_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_calibration_order_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [calibration_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_precision_parameters_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sort] int DEFAULT NULL NULL,
    [precision_parameters_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [difference] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_item_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [init_value] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_value] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [judgment_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_detail_uda6] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [upper_limit] int DEFAULT NULL NULL,
    [lower_limit] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_calibration_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_calibration_order_report] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [calibration_order_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [judgment_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_calibration_order_report_id] 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

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

CREATE TABLE [dbo].[mom_eam_change_cause] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_cause_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_cause_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_cause_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_cause_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_cause_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_change_cause_id] 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

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

CREATE TABLE [dbo].[mom_eam_daily_inspection_standard] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dis_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dis_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dis_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dis_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dis_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_daily_inspection_standard_id] 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

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

CREATE TABLE [dbo].[mom_eam_daily_inspection_standard_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [daily_inspection_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [photo] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [last_inspection_time] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_daily_inspection_standard_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_daily_maintenance_order] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [maintenance_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_daily_maintenance_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_daily_maintenance_order_detail] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [daily_maintenance_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_daily_maintenance_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_deterioration_factor] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [df_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [df_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [df_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [df_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [df_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [deterioration_factor_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_deterioration_factor_id] 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

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

CREATE TABLE [dbo].[mom_eam_deterioration_factor_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dfc_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dfc_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dfc_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dfc_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [dfc_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_deterioration_factor_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_document_type] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_document_type_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_photo] nvarchar(128) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [leave_factory_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [acceptance_check_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [affiliation_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manage_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manager] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [use_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [functionary] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(128) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_template_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_template_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [verification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [verification_period] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [last_verification_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [next_verification_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [source_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_change] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_method] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_change_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_change_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_change_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_reason] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_manager] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_manager] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_usage_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_usage_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_functionary] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_functionary] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [before_technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [after_technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_datail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_datail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_datail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_datail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_change_datail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_change_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_disposal_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_change_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disposal_reason] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disposal_date] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_disposal_detail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_disposal_detail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_disposal_detail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_disposal_detail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_disposal_detail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_photo] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_disposal_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_document] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sort] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_document_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_document_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_document_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_document_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_document_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_document_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_importance] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_importance_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_lease] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [calibration_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [calibration_result] nvarchar(5) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_result_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_item_num] int DEFAULT NULL NULL,
    [calibration_item_pass_num] int DEFAULT NULL NULL,
    [calibration_item_fail_num] int DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calibration_order_uda6] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_lease_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_lease_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_photo] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [factory_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [leave_factory_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [acceptance_check_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [affiliation_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manage_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manager] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [use_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [functionary] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(128) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [verification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [verification_period] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [last_verification_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [next_verification_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_account_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_account_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_account_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_account_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_account_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_lease_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_operation] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_date] date DEFAULT NULL NULL,
    [team_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [created_time] date  NOT NULL,
    [updated_time] date  NOT NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_operation_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_operation_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_operation_list_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [start_time] date DEFAULT NULL NULL,
    [end_time] date DEFAULT NULL NULL,
    [run_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_reason] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [created_time] date  NOT NULL,
    [updated_time] date  NOT NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_detail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_detail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_detail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_detail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_detail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_operation_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_operation_list] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_operation_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [operation_hours] decimal(10,4) DEFAULT NULL NULL,
    [planned_downtime] decimal(10,4) DEFAULT NULL NULL,
    [unplanned_downtime] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_list_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_list_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_list_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_list_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_operation_list_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_operation_list_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_precision_parameters] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [leave_factory_value] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_value] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [verification_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [initial_measured_value] int DEFAULT NULL NULL,
    [allowable_range] int DEFAULT NULL NULL,
    [upper_limit] int DEFAULT NULL NULL,
    [lower_limit] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_precision_parameters_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_process_parameters] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parameters_value] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [epp_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_process_parameters_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_report_repair] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_description] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [photo] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_time] datetime2(0) DEFAULT NULL NULL,
    [is_stop] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [err_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [err_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [err_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [err_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [err_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [source] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [source_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_report_repair_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_scrap_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_change_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [scrap_reason] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [scrap_date] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_scrap_detail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_scrap_detail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_scrap_detail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_scrap_detail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_scrap_detail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_photo] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_scrap_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_seal_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_change_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(20) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [seal_reason] nvarchar(200) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [seal_date] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_seal_detail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_seal_detail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_seal_detail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_seal_detail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_seal_detail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_unseal_date] date DEFAULT NULL NULL,
    [equipment_photo] nvarchar(128) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_seal_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_spares] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mating_quantity] numeric(10,2) DEFAULT NULL NULL,
    [life_span] numeric(10,2) DEFAULT NULL NULL,
    [change_cycle] numeric(10,2) DEFAULT NULL NULL,
    [unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [lase_change_time] datetime2(0) DEFAULT NULL NULL,
    [next_change_time] datetime2(0) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_spares_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_structure] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_structure_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_structure_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_transfer] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [out_enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [in_enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [transfer_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint  NOT NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_catrgory_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_transfer_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_transfer_in_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_transfer_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technical_status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [demand_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [actual_in_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [in_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [in_manager_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [use_depart_id] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [responsibility_team_id] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [responsibility_user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [position] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_in_dtl_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_in_dtl_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_in_dtl_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_in_dtl_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_in_dtl_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_transfer_in_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_transfer_out_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_transfer_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [technical_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [demand_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [actual_out_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [in_depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [in_manager_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_out_dtl_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_out_dtl_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_out_dtl_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_out_dtl_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_transfer_out_dtl_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_transfer_out_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_unloading] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [business_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint  NOT NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [use_depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unloading_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_unloading_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_unloading_borrow_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_unloading_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technical_status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_borrow_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [responsibility_team_id] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [responsibility_user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_borrow_dtl_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_borrow_dtl_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_borrow_dtl_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_borrow_dtl_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_borrow_dtl_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_unloading_borrow_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_unloading_return_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_unloading_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technical_status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_borrow_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_return_date] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [responsibility_team_id] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [responsibility_user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_return_dtl_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_return_dtl_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_return_dtl_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_return_dtl_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unloading_return_dtl_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_unloading_return_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_equipment_unseal_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_change_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_importance_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [seal_reason] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [seal_date] datetime2(0) DEFAULT NULL NULL,
    [unseal_date] datetime2(0) DEFAULT NULL NULL,
    [unseal_reason] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unseal_detail_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unseal_detail_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unseal_detail_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unseal_detail_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_unseal_detail_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_equipment_unseal_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_fault_cause] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_fault_cause_id] 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

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

CREATE TABLE [dbo].[mom_eam_fault_type] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [fault_type_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_fault_type_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_cycle] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [cycle] decimal(10) DEFAULT NULL NULL,
    [cycle_unit] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [first_inspection_date] datetime2(0) DEFAULT NULL NULL,
    [first_inspection_time] datetime2(0) DEFAULT NULL NULL,
    [lead_time] decimal(10) DEFAULT NULL NULL,
    [effective_time] decimal(10) DEFAULT NULL NULL,
    [unit] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [version_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calendar] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [start_condition] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [arrange_way] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [inspection_cycle_uda1] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_uda2] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_uda3] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_uda4] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_uda5] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_cycle_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_method] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_method_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_order] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_standard_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_standard_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_date] datetime2(0) DEFAULT NULL NULL,
    [inspection_time] datetime2(0) DEFAULT NULL NULL,
    [inspection_deadline] datetime2(0) DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [start_work_condition] int DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [inspection_result] nvarchar(5) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_result_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_item_num] int DEFAULT NULL NULL,
    [inspection_item_pass_num] int DEFAULT NULL NULL,
    [inspection_item_fail_num] int DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda6] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_order_detail] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [inspection_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_standard_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sort] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [check_uesr_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [photo] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_tool] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [analysis_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [test_value_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [detection_standard] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [acceptability_limit] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [judgment_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abnormal_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abnormal_photo] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [treatment_measure] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda6] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_order_record] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [inspection_standard_detail_id] nvarchar(36) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [generate_time] date DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_order_record_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_project] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_tool] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [analysis_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [test_value_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [detection_standard] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [acceptability_limit] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [surface_value] decimal(38) DEFAULT NULL NULL,
    [up_value] decimal(38) DEFAULT NULL NULL,
    [down_value] decimal(38) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_project_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_project_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_project_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_specialty] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_specialty_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_specialty_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_specialty_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_specialty_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_specialty_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_specialty_id] 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

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

CREATE TABLE [dbo].[mom_eam_inspection_type] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_type_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_type_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_type_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_type_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_type_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_inspection_type_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_cycle] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [cycle] decimal(10) DEFAULT NULL NULL,
    [cycle_unit] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [first_maintenance_time] datetime2(0) DEFAULT NULL NULL,
    [lead_time] decimal(10) DEFAULT NULL NULL,
    [effective_time] decimal(10) DEFAULT NULL NULL,
    [unit] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [calendar_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [arrange_way] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [maintenance_cycle_uda1] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_uda2] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_uda3] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_uda4] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_uda5] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_cycle_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_method] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_method_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_order_actual_material] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_order_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [quantity] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smoam_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smoam_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smoam_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smoam_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smoam_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_order_actual_material_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_order_actual_working_hour] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_order_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_working_hour_quota] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_order_actual_working_hour_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_project] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [standard] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_require] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_tool] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [working_hour_quota] int DEFAULT NULL NULL,
    [maintenance_project_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_project_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_project_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_project_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_specialty] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_specialty_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_specialty_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_standard] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [team_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_standard_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_standard_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_require] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [disd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_mode] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_standard_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_standard_planning_material] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [quantity] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_standard_planning_material_id] 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

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

CREATE TABLE [dbo].[mom_eam_maintenance_standard_safety_requirement] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [risk_prevention_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mssr_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mssr_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mssr_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mssr_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mssr_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL
    )
    GO

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

CREATE TABLE [dbo].[mom_eam_maintenance_standard_work_instruction] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [maintenance_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [work_instruction_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL
    )
    GO

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

CREATE TABLE [dbo].[mom_eam_maintenance_type] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_maintenance_type_id] 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

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

CREATE TABLE [dbo].[mom_eam_precision_parameters] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_precision_parameters_id] 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

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

CREATE TABLE [dbo].[mom_eam_precision_parameters_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_precision_parameters_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_precision_parameters_template] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_precision_parameters_template_id] 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

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

CREATE TABLE [dbo].[mom_eam_precision_parameters_template_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [precision_parameters_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [precision_parameters_template_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_precision_parameters_template_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_process_parameters] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_process_parameters_id] 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

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

CREATE TABLE [dbo].[mom_eam_process_parameters_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_process_parameters_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_process_parameters_template] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [ppt_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_process_parameters_template_id] 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

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

CREATE TABLE [dbo].[mom_eam_process_parameters_template_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [process_parameters_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [process_parameters_template_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [pptd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_process_parameters_template_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_project_maintenance_order] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [change_method] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_project_maintenance_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_project_maintenance_order_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [project_maintenance_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [task_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [asset_number] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specific_equipment] nvarchar(20) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [technology_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [supplier_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_mode] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [item_name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [urgency_degree] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_project_maintenance_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_repair_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_description] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_time] datetime2(0) DEFAULT NULL NULL,
    [photo] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [is_stop] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [repair_order_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(1) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_type] smallint DEFAULT NULL NULL,
    [create_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [maintenance_method] nvarchar(1) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [working_hour_quota] decimal(10,4) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_actual_material] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [outbound_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_quantity] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_am_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_am_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_am_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_am_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_am_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_actual_material_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_actual_work_hours] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [team_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_hour] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_actual_hours_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_actual_hours_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_actual_hours_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_actual_hours_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_actual_hours_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_actual_work_hours_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [location] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sketch_map] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_item] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_require] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_way] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_tooling] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [safety_requirement] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_cycle] decimal(10,4) DEFAULT NULL NULL,
    [time_quota] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mamaintenance_specialty_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [order_detail_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [order_detail_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [order_detail_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [order_detail_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [order_detail_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [create_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [tenant_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_fault_analysis] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_cause] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [suggestion] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_fault_analysis_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_fault_analysis_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_fault_analysis_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_fault_analysis_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_fault_analysis_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_fault_analysis_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_operation_guidance] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [document_type_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [size] decimal(10,4) DEFAULT NULL NULL,
    [path] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_operation_guidance_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_plan_material] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [repair_order_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [material_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [quantity] decimal(10,4) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [mspm_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_plan_material_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_order_risk_prevention] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [risk_prevention_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [tenant_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_order_risk_prevention_id] 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

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

CREATE TABLE [dbo].[mom_eam_repair_plan_type] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_plan_type_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_plan_type_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_plan_type_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_plan_type_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [repair_plan_type_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_repair_plan_type_id] 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

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

CREATE TABLE [dbo].[mom_eam_report_after_repair] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [fault_description] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [fault_time] datetime2(0) DEFAULT NULL NULL,
    [is_stop] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_mode] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [target_depart_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [team_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [executor_user_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [completion_time] datetime2(0) DEFAULT NULL NULL,
    [report_repair_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_after_repair_uda1] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_after_repair_uda2] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_after_repair_uda3] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_after_repair_uda4] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [report_after_repair_uda5] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_report_after_repair_id] 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

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

CREATE TABLE [dbo].[mom_eam_risk_prevention] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [description] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [measure] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [risk_prevention_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [risk_prevention_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [risk_prevention_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [risk_prevention_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [risk_prevention_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_risk_prevention_id] 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

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

CREATE TABLE [dbo].[mom_eam_sapre_part_receive_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_receive_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_inventory_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_sapre_part_receive_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_shutdown_cause] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [shutdown_cause_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_shutdown_cause_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specification] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [conversion_ratio] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [batch_managed_flag] int DEFAULT 0 NULL,
    [validity_managed_flag] int DEFAULT 0 NULL,
    [validity_period] int DEFAULT 0 NULL,
    [validity_period_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inventory_upper_limit] int DEFAULT 0 NULL,
    [inventory_lower_limit] int DEFAULT 0 NULL,
    [inventory_warn_limit] int DEFAULT 10 NULL,
    [economic_order_quantity] int DEFAULT 100 NULL,
    [purchase_lead_time] int DEFAULT 3 NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_cancelling_stocks] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_cancelling_stocks_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_cancelling_stocks_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_cancelling_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_inventory_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [batch_num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manufacture_date] date DEFAULT NULL NULL,
    [supplier_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [warehouse_location_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_area_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [outbound_main_quantity] numeric(10,2) DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_cancelling_stocks_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_category] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [code] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_category_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_outbound] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [outbound_person_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_outbound_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_outbound_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_outbound_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_part_inventory_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [outbound_main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [outbound_auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [batch_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manufacture_date] datetime2(0) DEFAULT NULL NULL,
    [supplier_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_outbound_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_purchase_storage] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_purchase_storage_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_purchase_storage_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_purchase_storage_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [batch_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [manufacture_date] datetime2(0) DEFAULT NULL NULL,
    [supplier_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [constructor_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_area_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_location_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] date DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] date DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_purchase_storage_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_receive] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_receive_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_receive_deatil] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_receive_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_inventory] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_receive_deatil_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_requirement] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_requirement_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_requirement_deatil] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_requirement_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [requirement_time] date DEFAULT NULL NULL,
    [main_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,2) DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_quantity] numeric(10,2) DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_requirement_deatil_id] 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

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

CREATE TABLE [dbo].[mom_eam_spare_part_scrap] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [audit_status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [source_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [related_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spare_part_scrap_id] 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

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

CREATE TABLE [dbo].[mom_eam_spares_part_inventory] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [batch_num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [validity_forecast] smallint DEFAULT 0 NULL,
    [inventory_forecast] smallint DEFAULT 0 NULL,
    [constructor_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [main_quantity] numeric(10,4) DEFAULT 0.0000 NULL,
    [auxiliary_quantity] numeric(10,4) DEFAULT 0.0000 NULL,
    [manufacture_date] date DEFAULT NULL NULL,
    [supplier_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_area_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [warehouse_location_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [validity_period] int DEFAULT 0 NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spares_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spares_part_inventory_id] 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

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

CREATE TABLE [dbo].[mom_eam_spares_scrap_detail] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [spare_part_scrap_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [spare_part_inventory_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specification] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [scrap_reason] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [storage_area_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [storage_location_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [scrap_date] datetime2(0) DEFAULT NULL NULL,
    [main_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [auxiliary_unit_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [scrap_main_quantity] numeric(10,2) DEFAULT 0.00 NULL,
    [scrap_auxiliary_quantity] numeric(10,2) DEFAULT 0.00 NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] int DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [enterprise_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_spares_scrap_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_order] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_inspection_plan_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_time] datetime2(0) DEFAULT NULL NULL,
    [inspection_deadline] datetime2(0) DEFAULT NULL NULL,
    [inspection_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_order_detail] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specialty_inspection_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_inspection_plan_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_inspection_standard_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [photo] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_tool] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [analysis_method] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [test_value_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [detection_standard] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [acceptability_limit] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [judgment_result] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abnormal_desc] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [abnormal_photo] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [treatment_measure] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_order_detail_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_plan] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [duty_depart_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sip_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sip_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sip_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sip_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sip_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_plan_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_plan_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specialty_inspection_plan_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sort] int DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_inspection_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_plan_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_standard] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [data_version_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [version] int DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sis_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sis_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sis_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sis_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sis_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_standard_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_inspection_standard_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specialty_inspection_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_project_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [inspection_cycle_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [location] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [photo] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sisd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_inspection_standard_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_maintenance_order] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_maintenance_plan_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [actual_start_time] datetime2(0) DEFAULT NULL NULL,
    [actual_end_time] datetime2(0) DEFAULT NULL NULL,
    [maintenance_user_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [plan_start_time] datetime2(0) DEFAULT NULL NULL,
    [plan_end_time] datetime2(0) DEFAULT NULL NULL,
    [recipient_user_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_maintenance_order_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_maintenance_order_detail] (
    [id] nvarchar(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specialty_maintenance_order_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [specialty_maintenance_plan_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [equipment_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_detail_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_project_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda1] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda2] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda3] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda4] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_order_detail_uda5] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_maintenance_order_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_maintenance_plan] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_cycle_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_type_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_mode] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [depart_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [duty_depart_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [enterprise_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smp_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smp_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smp_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smp_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smp_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_maintenance_plan_id] 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

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

CREATE TABLE [dbo].[mom_eam_specialty_maintenance_plan_detail] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [specialty_maintenance_plan_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [sort] int DEFAULT NULL NULL,
    [equipment_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [maintenance_standard_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smpd_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smpd_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smpd_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smpd_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [smpd_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_specialty_maintenance_plan_detail_id] 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

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

CREATE TABLE [dbo].[mom_eam_transfer_method] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_transfer_method_id] 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

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

CREATE TABLE [dbo].[mom_eam_transfer_method_category] (
    [id] nvarchar(64) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [name] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_uda1] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_uda2] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_uda3] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_uda4] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [transfer_method_category_uda5] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [status] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [parent_id] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_eam_transfer_method_category_id] 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

ALTER TABLE [dbo].[mom_eam_transfer_method_category] SET (LOCK_ESCALATION = TABLE)


CREATE TABLE [dbo].[mom_sys_identity] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [num] int  NOT NULL,
    [month_value] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [year_value] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [type] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [remark] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [prifix] nvarchar(100) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_rule_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_sys_identity_id] 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

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

CREATE TABLE [dbo].[mom_sys_upload] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [name] nvarchar(1000) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [encode_name] nvarchar(1000) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [upload_type] nvarchar(20) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [size] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [format] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [path] nvarchar(512) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [description] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_sys_upload_id] 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

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

CREATE TABLE [dbo].[mom_sys_upload_rela] (
    [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
    [bus_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [bus_type] nvarchar(64) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [upload_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [create_time] datetime2(0) DEFAULT NULL NULL,
    [update_by] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [update_time] datetime2(0) DEFAULT NULL NULL,
    [tenant_id] nvarchar(32) COLLATE Chinese_PRC_CI_AS DEFAULT NULL NULL,
    [del_flag] smallint DEFAULT NULL NULL,
    CONSTRAINT [PK_mom_sys_upload_rela_id] 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

ALTER TABLE [dbo].[mom_sys_upload_rela] SET (LOCK_ESCALATION = TABLE)