create table TbTradeOrderItem
(
    tid               bigint not null,
    oid               bigint not null,
    adjust_fee        decimal(18, 2),
    buyer_rate        int,
    cid               bigint,
    consign_time      datetime,
    discount_fee      decimal(18, 2),
    divide_order_fee  decimal(18, 2),
    end_time          datetime,
    invoice_no        varchar(50),
    is_daixiao        int,
    is_oversold       int,
    logistics_company varchar(50),
    num               int,
    num_iid           bigint,
    order_from        varchar(50),
    outer_iid         varchar(50),
    part_mjz_discount decimal(18, 2),
    payment           decimal(18, 2),
    pic_path          varchar(200),
    price             decimal(18, 2),
    refund_status     varchar(50),
    seller_rate       int,
    seller_type       varchar(50),
    shipping_type     varchar(50),
    snapshot_url      varchar(200),
    status            varchar(50),
    title             varchar(200),
    total_fee         decimal(18, 2),
    createDT          datetime,
    updateDT          datetime,
    constraint PK_TbTradeOrderItem
        primary key (tid, oid)
)
go

exec sp_addextendedproperty 'MS_Description', N'淘宝订单商品明细表', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem'
go

exec sp_addextendedproperty 'MS_Description', N'交易编号', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN', 'tid'
go

exec sp_addextendedproperty 'MS_Description', N'子订单订单号', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'oid'
go

exec sp_addextendedproperty 'MS_Description', N'手工调整金额', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'adjust_fee'
go

exec sp_addextendedproperty 'MS_Description', N'买家是否已评价', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'buyer_rate'
go

exec sp_addextendedproperty 'MS_Description', N'交易商品对应的类目ID', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem',
     'COLUMN', 'cid'
go

exec sp_addextendedproperty 'MS_Description', N'子订单发货时间', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'consign_time'
go

exec sp_addextendedproperty 'MS_Description', N'子订单级订单优惠金额', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem',
     'COLUMN', 'discount_fee'
go

exec sp_addextendedproperty 'MS_Description', N'分摊之后的实付金额', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem',
     'COLUMN', 'divide_order_fee'
go

exec sp_addextendedproperty 'MS_Description', N'交易结束时间', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'end_time'
go

exec sp_addextendedproperty 'MS_Description', N'是否代销', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'is_daixiao'
go

exec sp_addextendedproperty 'MS_Description', N'是否超卖', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'is_oversold'
go

exec sp_addextendedproperty 'MS_Description', N'快递公司', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'logistics_company'
go

exec sp_addextendedproperty 'MS_Description', N'数量', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN', 'num'
go

exec sp_addextendedproperty 'MS_Description', N'商品编码', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'num_iid'
go

exec sp_addextendedproperty 'MS_Description', N'子订单来源', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'order_from'
go

exec sp_addextendedproperty 'MS_Description', N'商家外部编码', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'outer_iid'
go

exec sp_addextendedproperty 'MS_Description', N'优惠分摊', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'part_mjz_discount'
go

exec sp_addextendedproperty 'MS_Description', N'实付金额', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'payment'
go

exec sp_addextendedproperty 'MS_Description', N'图片', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'pic_path'
go

exec sp_addextendedproperty 'MS_Description', N'商品价格', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'price'
go

exec sp_addextendedproperty 'MS_Description', N'退款状态', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'refund_status'
go

exec sp_addextendedproperty 'MS_Description', N'卖家是否已评价', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'seller_rate'
go

exec sp_addextendedproperty 'MS_Description', N'卖家类型', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'seller_type'
go

exec sp_addextendedproperty 'MS_Description', N'子订单的运送方式', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem',
     'COLUMN', 'shipping_type'
go

exec sp_addextendedproperty 'MS_Description', N'订单快照URL', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'snapshot_url'
go

exec sp_addextendedproperty 'MS_Description', N'订单状态', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'status'
go

exec sp_addextendedproperty 'MS_Description', N'商品标题', 'SCHEMA', 'dbo', 'TABLE', 'TbTradeOrderItem', 'COLUMN',
     'title'
go

转postgresql语句，包含注释