2023新版黑马程序员大数据入门到实战教程,大数据开发必会的Hadoop、Hiv

P66
-- orders创建
create table orders(
orderId bigint comment '订单id',
orderNo string comment '订单编号',
shopId bigint comment '门店id',
userId bigint comment '用户id',
orderStatus tinyint comment '订单状态 -3:用户拒收 -2:未付款的订单 -1:用户取消 0:待发货 1:配送中 2:用户确认收货',
goodsMoney double comment '商品金额',
deliverMoney double comment '运费',
totalMoney double comment '订单金额(包括运费)',
realTotalMoney double comment '实际订单金额(折扣后金额)',
payType tinyint comment '支付方式,0:未知;1:支付宝;2:微信;3:现金;4:其他',
isPay tinyint comment '是否支付 0:未支付 1:已支付',
userName string comment '收件人姓名',
userAddress string comment '收件人地址',
userPhone string comment '收件人电话',
createTime timestamp comment '下单时间',
payTime timestamp comment '支付时间',
totalPayFee int comment '总支付金额'
) row format delimited fields terminated by '\t';
-- users表创建
create table users(
userId int,
loginName string,
loginSecret int,
loginPwd string,
userSex tinyint,
userName string,
trueName string,
birthday date,
userPhoto string,
userQQ string,
userPhone string,
userScore int,
userTotalScore int,
userFrom tinyint,
userMoney double,
lockMoney double,
createTime timestamp,
payPwd string,
rechargeMoney double
) row format delimited fields terminated by '\t';