-- dependson: None
-- model: statistic.models.SellDaily
-- author: Leaf
-- date: 2015.09.07 00:00:15
-- description: add table statistic_selldaily

BEGIN;
CREATE TABLE `statistic_selldaily` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `stat_date` date NOT NULL,
    `area` varchar(64),
    `tag_name` varchar(64),
    `tag_type` varchar(1),
    `stat_type` varchar(1) NOT NULL,
    `total_orders` integer NOT NULL,
    `total_sum` integer NOT NULL,
    `total_sum_gengmei` integer NOT NULL,
    `paid_orders` integer NOT NULL,
    `paid_sum` integer NOT NULL,
    `paid_sum_gengmei` integer NOT NULL,
    `validate_orders` integer NOT NULL,
    `validate_sum` integer NOT NULL,
    `validate_sum_gengmei` integer NOT NULL,
    `refund_orders` integer NOT NULL,
    `refund_sum` integer NOT NULL,
    `refund_sum_gengmei` integer NOT NULL,
    `refund_rate` double precision NOT NULL,
    `refund_sum_rate` double precision NOT NULL,
    `refund_gengmei_rate` double precision NOT NULL
)
;

COMMIT;
