table('order_tj',array('id' => true,'primary_key' => ['id'],'engine'=>'InnoDB','comment'=>'订单统计记录')); $table->addColumn('create_time', 'integer', array('limit' => 10,'signed' => false, 'default' => 0, 'comment' => '创建时间')) ->addColumn('remark', 'string',array('limit' => 255,'default'=>'','comment'=>'备注')) ->addColumn('ftype', 'integer',array('limit' => 10,'default'=>0,'comment'=>'1:日,2:周,3:月')) ->addColumn('total_price', 'decimal',array('limit' => 11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'应付总金额(含运费)')) ->addColumn('total_goods_price', 'decimal',array('limit' => 11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'应付商品总金额')) ->addColumn('total_pay_price', 'decimal',array('limit' => 11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'实付金额(含运费)')) ->addColumn('total_express_price', 'decimal',array('limit' =>11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'运费)')) ->addColumn('total_coupon_price', 'decimal',array('limit' => 11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'平台优惠券抵扣)')) ->addColumn('total_users', 'integer',array('limit' => 11,'signed'=>false,'default'=>0,'comment'=>'成交用户数)')) ->addColumn('total_orders', 'integer',array('limit' => 11,'signed'=>false,'default'=>0,'comment'=>'成交订单数)')) ->addColumn('pcts', 'decimal',array('limit' => 11,'precision'=>10,'scale'=>2,'signed'=>false,'default'=>0,'comment'=>'客单价')) ->addColumn('tj_time', 'datetime', array('comment' => '统计时间')) ->create(); } }