drop Table CT_ESI_AttachmentSPC;
Create Table CT_ESI_AttachmentSPC ( FName_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FName_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FName_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS,
FDescription_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FDescription_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FDescription_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS,
FSimpleName NVARCHAR(80) COLLATE Chinese_PRC_CS_AS,
FID VARCHAR(44) DEFAULT '' NOT NULL  COLLATE Chinese_PRC_CS_AS,
FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
FCreateTime DateTime,
FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
FLastUpdateTime DateTime,
FControlUnitID VARCHAR(44) DEFAULT '11111111-1111-1111-1111-111111111111CCE7AED4' COLLATE Chinese_PRC_CS_AS,
CFFirstCategory NVARCHAR(100) COLLATE Chinese_PRC_CS_AS,
CFSecondCategory NVARCHAR(100) COLLATE Chinese_PRC_CS_AS,
CFComponentId NVARCHAR(100) COLLATE Chinese_PRC_CS_AS,
CFState INT,CONSTRAINT CPK_ESI_AtxmntSoov PRIMARY KEY (FID));

drop Table CT_ESI_ESGSO;
Create Table CT_ESI_ESGSO ( 
    FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
    FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
    FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
    FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS,FBizDate DateTime,
    FHandlerID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,FDescription NVARCHAR(580) COLLATE Chinese_PRC_CS_AS,
    FHasEffected INT,FAuditorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,
    FSourceBillID NVARCHAR(80) COLLATE Chinese_PRC_CS_AS,FSourceFunction NVARCHAR(80) COLLATE Chinese_PRC_CS_AS,
    FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,
    FFivouchered INT,CFPersonID VARCHAR(44)  COLLATE Chinese_PRC_CS_AS,
    CFOperatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS,CFSendStatus INT,CFEsignStatus INT,
    CFApiNumber NVARCHAR(200)  COLLATE Chinese_PRC_CS_AS,
    CFErrorMsg NText COLLATE Chinese_PRC_CS_AS,CFRequestParams NText COLLATE Chinese_PRC_CS_AS,
    CFSignFlowId NVARCHAR(200)  COLLATE Chinese_PRC_CS_AS,CFFileName NVARCHAR(500)  COLLATE Chinese_PRC_CS_AS,
    CFEfileId NVARCHAR(200),CFEsignName VARCHAR(100) COLLATE Chinese_PRC_CS_AS,CFFiesign INT,
    CFNowOperator NVARCHAR(500) COLLATE Chinese_PRC_CS_AS,CONSTRAINT CPK_ESI_ESGSOIDiee PRIMARY KEY (FID));

drop Table CT_ESI_ESignTemplate;
Create Table CT_ESI_ESignTemplate ( FName_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FDescription_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FSimpleName NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS  DEFAULT '11111111-1111-1111-1111-111111111111CCE7AED4',CFState INT,CFUipkID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFESignTemplateNum NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFPositionX NUMERIC(28,10),CONSTRAINT CPK_ESI_ESTIDi308p PRIMARY KEY (FID));

drop Table CT_ESI_ESignTemplateFields;
Create Table CT_ESI_ESignTemplateFields ( FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FSeq INT DEFAULT 0 NOT NULL ,FParentID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,CFSeq INT,CFTemplateFieldId NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFTemplateFieldKey NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFTemplateFieldName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFRequired INT DEFAULT 0,CFInvalid INT DEFAULT 0,CFComponentType INT,CFDataFormat NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,CFPositionX NUMERIC(28,10),CFPositionY NUMERIC(28,10),CFPageNum INT,CFPageRange NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFRelatedControlID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFSigningParty NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT CPK_ESI_ESTFIDk2ft PRIMARY KEY (FID));

drop Table CT_ESI_ESignTemplateFileEntry;
Create Table CT_ESI_ESignTemplateFileEntry ( FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FSeq INT DEFAULT 0 NOT NULL ,FParentID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,CFSeq INT,CFName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFESignTemplateId NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFAttachmentCatego VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFState INT,CFSyncStatus INT,CFSyncResult NVARCHAR(2000) COLLATE Chinese_PRC_CS_AS,CFSyncTime DateTime,CONSTRAINT CPK_ESI_ESTFEIDcjt PRIMARY KEY (FID));

drop Table CT_ESI_EsignLog;
Create Table CT_ESI_EsignLog ( FName_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FDescription_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FSimpleName NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44)  DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS ,FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS  DEFAULT '11111111-1111-1111-1111-111111111111CCE7AED4',CFAdminOrgUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFUrl NVARCHAR(800) COLLATE Chinese_PRC_CS_AS,CFEsiginName NVARCHAR(1000) COLLATE Chinese_PRC_CS_AS ,CFRequestData NText  COLLATE Chinese_PRC_CS_AS ,CFResponseData NText  COLLATE Chinese_PRC_CS_AS ,CFSource NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFMsg NVARCHAR(500) COLLATE Chinese_PRC_CS_AS ,CFRequestState NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT CPK_ESI_EsignLo835 PRIMARY KEY (FID));

drop Table CT_ESI_FieldMapping;
Create Table CT_ESI_FieldMapping ( FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FBizDate DateTime,FHandlerID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FDescription NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FHasEffected INT,FAuditorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FSourceBillID NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FSourceFunction NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FFivouchered INT,CFName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFDataSourceID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFESignFileID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFDataInterface NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT CPK_ESI_FieldMIjr0 PRIMARY KEY (FID));

drop Table CT_ESI_FieldMappingEntry;
Create Table CT_ESI_FieldMappingEntry ( FSeq INT,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FParentID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFTemplateID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFEFieldID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFDataSourceFieldI VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFEFieldMark NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFEFieldName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT CPK_ESI_FieldMEru0 PRIMARY KEY (FID));

drop Table CT_ESI_FileTab;
Create Table CT_ESI_FileTab ( FPersonID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,CFNumber NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT PK_FileTab PRIMARY KEY (FID));

drop Table CT_ESI_GeneralESignBill;
Create Table CT_ESI_GeneralESignBill ( FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FBizDate DateTime,FHandlerID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FDescription NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FHasEffected INT,FAuditorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FSourceBillID NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FSourceFunction NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FFivouchered INT,CFPersonID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFAdminOrgID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFPositionID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFESignFileTemplat VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CFIssueStatus INT,CFESignMappingID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,CONSTRAINT CPK_ESI_JnrlESBrm8 PRIMARY KEY (FID));

drop Table CT_ESI_Seal;
Create Table CT_ESI_Seal ( FName_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FName_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FNumber NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FDescription_l1 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l2 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FDescription_l3 NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,FSimpleName NVARCHAR(80) COLLATE Chinese_PRC_CS_AS ,FID VARCHAR(44) DEFAULT '' NOT NULL COLLATE Chinese_PRC_CS_AS,FCreatorID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FCreateTime DateTime,FLastUpdateUserID VARCHAR(44) COLLATE Chinese_PRC_CS_AS ,FLastUpdateTime DateTime,FControlUnitID VARCHAR(44) COLLATE Chinese_PRC_CS_AS  DEFAULT '11111111-1111-1111-1111-111111111111CCE7AED4',CFOrgId NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,CFSealId NVARCHAR(255) COLLATE Chinese_PRC_CS_AS ,CFSealName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFSealCreateTime DateTime,CFDefaultSealFlag INT,CFSealHeight INT,CFSealWidth INT,CFSealBizType NVARCHAR(1000) COLLATE Chinese_PRC_CS_AS ,CFSealBizTypeDescription NVARCHAR(1000) COLLATE Chinese_PRC_CS_AS ,CFSealStyle INT,CFEffectiveTime DateTime,CFExpireTime DateTime,CFSealAuthBizId NVARCHAR(200) COLLATE Chinese_PRC_CS_AS ,CFAuthorizerOrgName NVARCHAR(100) COLLATE Chinese_PRC_CS_AS ,CFAuthorizerOrgId NVARCHAR(200) COLLATE Chinese_PRC_CS_AS ,CFAuthorizer INT,CFSealStatus INT,CONSTRAINT CPK_ESI_SealID26d2 PRIMARY KEY (FID));


