IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[pub_messagetemplate]') AND type = 'U')
CREATE TABLE [dbo].[pub_messagetemplate]
(
    [mp_id] int NOT NULL IDENTITY(1, 1),
    [mp_cmpid] int NULL DEFAULT((0)),
    [mp_name] varchar(30) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_scope] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_caption] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_gzhincode] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_dayuincode] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_gzhtext] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_qyhtext] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_dingtext] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_dayutext] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_pctext] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL,
    [mp_gzhid] int NULL DEFAULT((0)),
    [mp_qyhid] int NULL DEFAULT((0)),
    [mp_dingid] int NULL DEFAULT((0)),
    [mp_dayuid] int NULL DEFAULT((0)),
    [mp_gzhpreview] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_dingpreview] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_qyhpreview] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_dayupreview] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_pcpreview] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL,
    [mp_sign] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_PUB_MESSAGETEMPLATE] PRIMARY KEY ([mp_id] ASC)
)