package com.kym.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.kym.entity.awoara.Detail; import com.kym.entity.typehandle.WashOrderDetailTypeHandle; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import java.time.LocalDateTime; import java.util.List; /** *

* 洗车订单表 *

* * @author skyline * @since 2024-09-11 */ @Getter @Setter @TableName(value = "t_wash_order", autoResultMap = true) @Accessors(chain = true) public class WashOrder extends BaseEntity { public static final int ORDER_STATUS_未知 = -1; public static final int ORDER_STATUS_开机 = 0; public static final int ORDER_STATUS_成功 = 1; public static final int ORDER_STATUS_失败 = 2; public static final int ORDER_STATUS_取消 = 3; public static final int PAY_STATUS_未支付 = 0; public static final int PAY_STATUS_已支付 = 1; public static final String START_CLOSE_TYPE_网络 = "network"; public static final String START_CLOSE_TYPE_按键 = "button"; /** * 领取停车券最低消费金额6元 */ public static final int PARKING_COUPON_MIN_AMOUNT = 600; private static final long serialVersionUID = 1L; private Long userId; private String stationId; /** * 产品key */ private String productKey; /** * 设备名称 */ private String deviceName; /** * 设备编号 */ private String shortId; /** * 开机方式:button维护按钮,network网络命令,coin投币,card刷卡 */ private String openType; /** * 关机方式:button维护按钮,network网络命令,no_balance超过预设金额,idle_timeout设备空闲超时,operation_timeout操作超时,card刷卡。注意:为空表示还没有关机,正在使用 */ private String closeType; /** * 订单号,和开机命令的order_id相同,如果使用按钮快速开机,order_id是空字符串 */ private String orderId; /** * 本机订单号 */ private String orderIdLocal; /** * 会员折扣比例(0-100,100表示不享受折扣,95表示9.5折优惠) */ private Integer memberDiscount; /** * 本次开机的预付金额(单位分,本次开机最大消费金额限制) */ private Integer prepayMoney; /** * 消费总额,等于各单项费用之和(单位分) */ private Integer amount; /** * 应收金额,如果大于预付金额,则限制为预付金额并关机,否则等于消费总金额(单位分) */ private Integer amountReceivable; /** * 实收金额等于应收金额乘会员折扣(单位分) */ private Integer amountReceived; /** * 优惠金额等于消费总额减去实收金额(单位分) */ private Integer discountMoney; /** * 订单操作剩余操作时间(单位秒),开机后从operation_timeout开始每秒减1,减到0关机,关机原因close_type=operation_timeout */ private Integer operationRemainTime; /** * 设备空闲关机倒计时剩余时间(单位秒),开机后从idle_timeout开始每秒减1,见到0关机,关机原因close_type=idle_time(递减过程中按任意功能键,重新开始从idle_timeout递减) */ private Integer idleRemainTime; /** * 费用明细:name 名称 price 单价(单位分) seconds 时长(单位秒) amount 费用(单位分) space⻋位或场地,water清水,foam泡沫,cleaner吸尘,tap水龙头,user_ext用户扩展,消毒或吹干等功能,coat镀膜,blow吹气 */ @TableField(typeHandler = WashOrderDetailTypeHandle.class) private List detail; /** * 开始时间 */ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime startTime; /** * 结束时间 */ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime endTime; /** * 洗车总时长(秒) */ private Integer totalSeconds; /** * 优惠方式:RechargeRights-充值权益 Coupon-优惠券 */ private String discountType; /** * 优惠金额(分) */ private Integer discountAmount; /** * 订单状态:0:未知,1:成功,2:失败,3:取消 */ private Integer orderStatus; /** * 支付状态:0:未支付,1:已支付 */ private Integer payStatus; /** * 充值款支付金额(分) */ private Integer rechargePayment; /** * 赠款支付金额(分) */ private Integer grantsPayment; /** * 停止原因 */ private String stopReason; /** * 发票状态:0-待开票 1-已开票 2-已作废(用不上) 3-开票中 */ private Integer invoiceStatus; /** * 发票id */ private Long invoiceId; /** * 是否跨店:0-否,1-是 */ private Boolean isCross; }