CREATE TABLE `company_collateral` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `Status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '抵押赎回状态',
  `Number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '抵押品编号',
  `ClientId` int NOT NULL COMMENT '客户信息',
  `ClientNumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '客户编号',
  `ClientName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '客户名称',
  `ProductAmount` double DEFAULT NULL COMMENT '数量',
  `Rate` double DEFAULT NULL COMMENT '抵押率',
  `UnderlyingId` int DEFAULT NULL COMMENT '标的Id',
  `BackDate` datetime DEFAULT NULL COMMENT '赎回时间',
  `HappenDate` datetime NOT NULL COMMENT '抵押时间',
  `OptStatus` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '执行状态',
  `OptId` int DEFAULT NULL COMMENT '操作人ID',
  `OptName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作人名称',
  `OptDate` datetime DEFAULT NULL COMMENT '操作时间',
  `VarietyId` int DEFAULT NULL COMMENT '标的品种ID',
  `SerialNumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '仓单号',
  `Comments` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `ExcuteDate` datetime DEFAULT NULL COMMENT '执行时间',
  `ExcuteId` int DEFAULT NULL COMMENT '执行人ID',
  `ExcuteName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '执行人姓名',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `ix_company_collateral` (`HappenDate`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='公司抵押品记录表';

ALTER TABLE `structure_info` 
ADD COLUMN `StructureTypeSm` varchar(255) NULL COMMENT '报送时对应的结构类型' AFTER `StructureName`;
ALTER TABLE `structure_details` 
ADD COLUMN `FieldNameSm` varchar(255) NULL COMMENT '报送时对应的字段' AFTER `ColumnDefaultValue`;