package com.bonus.canteen.core.order.domain;

import java.util.Date;

import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 订单对象 order_info
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
public class OrderInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单号 */
    private Long orderId;

    /** 设备订单号 */
    @Excel(name = "设备订单号")
    private String deviceOrderId;

    /** 设备sn */
    @Excel(name = "设备sn")
    private String deviceSn;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceNum;

    /** 人员编号 */
    @Excel(name = "人员编号")
    private Long userId;

    /** 身份验证方式 1 刷卡 2 刷脸 3 扫码 */
    @Excel(name = "身份验证方式 1 刷卡 2 刷脸 3 扫码")
    private Long identityVerification;

    /** 订单来源类型 */
    @Excel(name = "订单来源类型")
    private Long sourceType;

    /** 是否在线订单 1 是 2 否 */
    @Excel(name = "是否在线订单 1 是 2 否")
    private Long isOnline;

    /** 食堂id */
    @Excel(name = "食堂id")
    private Long canteenId;

    /** 档口id */
    @Excel(name = "档口id")
    private Long stallId;

    /** 餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵 */
    @Excel(name = "餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵")
    private Long mealtimeType;

    /** 餐次名称 */
    @Excel(name = "餐次名称")
    private String mealtimeName;

    /** 订单日期 yyyy-MM-dd */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "订单日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /** 应付金额  分 */
    @Excel(name = "应付金额  分")
    private Long payableAmount;

    /** 优惠金额 分 */
    @Excel(name = "优惠金额 分")
    private Long discountsAmount;

    /** 实付金额 分 */
    @Excel(name = "实付金额 分")
    private Long realAmount;

    /** 账户支付金额 分 */
    @Excel(name = "账户支付金额 分")
    private Long accountPayAmount;

    /** 外部支付金额 分（除账户外） */
    @Excel(name = "外部支付金额 分", readConverterExp = "除=账户外")
    private Long externalPayAmount;

    /** 累计退款金额 分 */
    @Excel(name = "累计退款金额 分")
    private Long refundAmount;

    /** 下单时间 yyyy-MM-dd HH:mm:ss */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "下单时间 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    /** 订单类型 1 当餐 2 预订餐 3 报餐 4 商城  11 线下消费 12 自助餐 21 补扣 22 外部订单 */
    @Excel(name = "订单类型 1 当餐 2 预订餐 3 报餐 4 商城  11 线下消费 12 自助餐 21 补扣 22 外部订单")
    private Long orderType;

    /** 订单状态 1 已下单 2 已完成 3 已取消 */
    @Excel(name = "订单状态 1 已下单 2 已完成 3 已取消")
    private Long orderState;

    /** 订单退款状态 1 未退单 2 已退单 3 部分退单 */
    @Excel(name = "订单退款状态 1 未退单 2 已退单 3 部分退单")
    private Long orderRefundState;

    /** 扣款类型 1 下单扣款 2 核销扣款 */
    @Excel(name = "扣款类型 1 下单扣款 2 核销扣款")
    private Long deductionType;

    /** 支付时间 yyyy-MM-dd HH:mm:ss */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "支付时间 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private Long payType;

    /** 支付渠道 */
    @Excel(name = "支付渠道")
    private Long payChannel;

    /** 支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付 */
    @Excel(name = "支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付")
    private Long payState;

    /** 支付参数  刷卡:卡号  扫码:二维码 */
    @Excel(name = "支付参数  刷卡:卡号  扫码:二维码")
    private String payParam;

    /** 配送费 分 */
    @Excel(name = "配送费 分")
    private Long deliveryAmount;

    /** 包装费 分 */
    @Excel(name = "包装费 分")
    private Long packingAmount;

    /** 配送方式 */
    @Excel(name = "配送方式")
    private Long deliveryType;

    /** 评论状态 1 已评论 2 未评论 */
    @Excel(name = "评论状态 1 已评论 2 未评论")
    private Long commentState;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setDeviceOrderId(String deviceOrderId) 
    {
        this.deviceOrderId = deviceOrderId;
    }

    public String getDeviceOrderId() 
    {
        return deviceOrderId;
    }

    public void setDeviceSn(String deviceSn) 
    {
        this.deviceSn = deviceSn;
    }

    public String getDeviceSn() 
    {
        return deviceSn;
    }

    public void setDeviceNum(String deviceNum) 
    {
        this.deviceNum = deviceNum;
    }

    public String getDeviceNum() 
    {
        return deviceNum;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setIdentityVerification(Long identityVerification) 
    {
        this.identityVerification = identityVerification;
    }

    public Long getIdentityVerification() 
    {
        return identityVerification;
    }

    public void setSourceType(Long sourceType) 
    {
        this.sourceType = sourceType;
    }

    public Long getSourceType() 
    {
        return sourceType;
    }

    public void setIsOnline(Long isOnline) 
    {
        this.isOnline = isOnline;
    }

    public Long getIsOnline() 
    {
        return isOnline;
    }

    public void setCanteenId(Long canteenId) 
    {
        this.canteenId = canteenId;
    }

    public Long getCanteenId() 
    {
        return canteenId;
    }

    public void setStallId(Long stallId) 
    {
        this.stallId = stallId;
    }

    public Long getStallId() 
    {
        return stallId;
    }

    public void setMealtimeType(Long mealtimeType) 
    {
        this.mealtimeType = mealtimeType;
    }

    public Long getMealtimeType() 
    {
        return mealtimeType;
    }

    public void setMealtimeName(String mealtimeName) 
    {
        this.mealtimeName = mealtimeName;
    }

    public String getMealtimeName() 
    {
        return mealtimeName;
    }

    public void setOrderDate(Date orderDate) 
    {
        this.orderDate = orderDate;
    }

    public Date getOrderDate() 
    {
        return orderDate;
    }

    public void setPayableAmount(Long payableAmount) 
    {
        this.payableAmount = payableAmount;
    }

    public Long getPayableAmount() 
    {
        return payableAmount;
    }

    public void setDiscountsAmount(Long discountsAmount) 
    {
        this.discountsAmount = discountsAmount;
    }

    public Long getDiscountsAmount() 
    {
        return discountsAmount;
    }

    public void setRealAmount(Long realAmount) 
    {
        this.realAmount = realAmount;
    }

    public Long getRealAmount() 
    {
        return realAmount;
    }

    public void setAccountPayAmount(Long accountPayAmount) 
    {
        this.accountPayAmount = accountPayAmount;
    }

    public Long getAccountPayAmount() 
    {
        return accountPayAmount;
    }

    public void setExternalPayAmount(Long externalPayAmount) 
    {
        this.externalPayAmount = externalPayAmount;
    }

    public Long getExternalPayAmount() 
    {
        return externalPayAmount;
    }

    public void setRefundAmount(Long refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public Long getRefundAmount() 
    {
        return refundAmount;
    }

    public void setOrderTime(Date orderTime) 
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime() 
    {
        return orderTime;
    }

    public void setOrderType(Long orderType) 
    {
        this.orderType = orderType;
    }

    public Long getOrderType() 
    {
        return orderType;
    }

    public void setOrderState(Long orderState) 
    {
        this.orderState = orderState;
    }

    public Long getOrderState() 
    {
        return orderState;
    }

    public void setOrderRefundState(Long orderRefundState) 
    {
        this.orderRefundState = orderRefundState;
    }

    public Long getOrderRefundState() 
    {
        return orderRefundState;
    }

    public void setDeductionType(Long deductionType) 
    {
        this.deductionType = deductionType;
    }

    public Long getDeductionType() 
    {
        return deductionType;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    public void setPayType(Long payType) 
    {
        this.payType = payType;
    }

    public Long getPayType() 
    {
        return payType;
    }

    public void setPayChannel(Long payChannel) 
    {
        this.payChannel = payChannel;
    }

    public Long getPayChannel() 
    {
        return payChannel;
    }

    public void setPayState(Long payState) 
    {
        this.payState = payState;
    }

    public Long getPayState() 
    {
        return payState;
    }

    public void setPayParam(String payParam) 
    {
        this.payParam = payParam;
    }

    public String getPayParam() 
    {
        return payParam;
    }

    public void setDeliveryAmount(Long deliveryAmount) 
    {
        this.deliveryAmount = deliveryAmount;
    }

    public Long getDeliveryAmount() 
    {
        return deliveryAmount;
    }

    public void setPackingAmount(Long packingAmount) 
    {
        this.packingAmount = packingAmount;
    }

    public Long getPackingAmount() 
    {
        return packingAmount;
    }

    public void setDeliveryType(Long deliveryType) 
    {
        this.deliveryType = deliveryType;
    }

    public Long getDeliveryType() 
    {
        return deliveryType;
    }

    public void setCommentState(Long commentState) 
    {
        this.commentState = commentState;
    }

    public Long getCommentState() 
    {
        return commentState;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("deviceOrderId", getDeviceOrderId())
            .append("deviceSn", getDeviceSn())
            .append("deviceNum", getDeviceNum())
            .append("userId", getUserId())
            .append("identityVerification", getIdentityVerification())
            .append("sourceType", getSourceType())
            .append("isOnline", getIsOnline())
            .append("canteenId", getCanteenId())
            .append("stallId", getStallId())
            .append("mealtimeType", getMealtimeType())
            .append("mealtimeName", getMealtimeName())
            .append("orderDate", getOrderDate())
            .append("payableAmount", getPayableAmount())
            .append("discountsAmount", getDiscountsAmount())
            .append("realAmount", getRealAmount())
            .append("accountPayAmount", getAccountPayAmount())
            .append("externalPayAmount", getExternalPayAmount())
            .append("refundAmount", getRefundAmount())
            .append("orderTime", getOrderTime())
            .append("orderType", getOrderType())
            .append("orderState", getOrderState())
            .append("orderRefundState", getOrderRefundState())
            .append("deductionType", getDeductionType())
            .append("payTime", getPayTime())
            .append("payType", getPayType())
            .append("payChannel", getPayChannel())
            .append("payState", getPayState())
            .append("payParam", getPayParam())
            .append("deliveryAmount", getDeliveryAmount())
            .append("packingAmount", getPackingAmount())
            .append("deliveryType", getDeliveryType())
            .append("commentState", getCommentState())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
