Return to Snippet

Revision: 67783
at October 30, 2014 02:11 by jacktan


Initial Code
CREATE TABLE IF NOT EXISTS `goods_order`
(
  `order_id`        INT UNSIGNED      NOT NULL             COMMENT '订单单号',
  `goods_id`        INT UNSIGNED      NOT NULL DEFAULT '0' COMMENT '商品款号',
  `order_type`      TINYINT UNSIGNED  NOT NULL DEFAULT '0' COMMENT '订单类型',
  `order_status`    TINYINT UNSIGNED  NOT NULL DEFAULT '0' COMMENT '订单状态',
  `color_id`        SMALLINT  UNSIGNED NOT NULL DEFAULT '0' COMMENT '颜色id',
  `size_id`         SMALLINT  UNSIGNED NOT NULL DEFAULT '0' COMMENT '尺寸id',
  `goods_number`    MEDIUMINT  UNSIGNED NOT NULL DEFAULT '0' COMMENT '数量',
  `depot_id`        INT UNSIGNED  NOT NULL DEFAULT '0' COMMENT '仓库id',
  `packet_id`       INT UNSIGNED  NOT NULL DEFAULT '0' COMMENT '储位code',
  `gmt_create`      TIMESTAMP     NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '添加时间',
  `gmt_modify`      TIMESTAMP     NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',

  PRIMARY KEY(`order_id`,`goods_id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';

Initial URL


Initial Description
Confirm the sql script file is encoded with `UTF-8`

Initial Title
Table creating sql for a typical shopping cart

Initial Tags
table

Initial Language
SQL