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_detail
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
public class OrderDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 详情id */
    private Long detailId;

    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;

    /** 订单日期 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;

    /** 商品菜品id */
    @Excel(name = "商品菜品id")
    private Long goodsId;

    /** 商品菜品名称 */
    @Excel(name = "商品菜品名称")
    private String goodsName;

    /** 商品菜品图片路径 */
    @Excel(name = "商品菜品图片路径")
    private String goodsImgUrl;

    /** 菜品详情id */
    @Excel(name = "菜品详情id")
    private Long menuDetailId;

    /** 售卖价格 分 */
    @Excel(name = "售卖价格 分")
    private Long salePrice;

    /** 优惠价格 分 */
    @Excel(name = "优惠价格 分")
    private Long discountPrice;

    /** 计算价格 分 会员为优惠价格  非会员为售卖价格 */
    @Excel(name = "计算价格 分 会员为优惠价格  非会员为售卖价格")
    private Long finalPrice;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 销售方式 1 按份 */
    @Excel(name = "销售方式 1 按份")
    private Long salesMode;

    /** 明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣 */
    @Excel(name = "明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣")
    private Long detailType;

    /** 订单详情总金额 分 */
    @Excel(name = "订单详情总金额 分")
    private Long totalAmount;

    /** 订单详情计算总金额 分  会员为优惠总额  非会员为售卖总额 */
    @Excel(name = "订单详情计算总金额 分  会员为优惠总额  非会员为售卖总额")
    private Long calcTotalAmount;

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

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

    /** 订单详情状态 1 正常 2 已退菜 3 部分退菜 */
    @Excel(name = "订单详情状态 1 正常 2 已退菜 3 部分退菜")
    private Long detailState;

    /** 商品已退数量 */
    @Excel(name = "商品已退数量")
    private Long refundNum;

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

    /** 流水号 */
    @Excel(name = "流水号")
    private String serialNum;

    public void setDetailId(Long detailId) 
    {
        this.detailId = detailId;
    }

    public Long getDetailId() 
    {
        return detailId;
    }

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

    public Long getOrderId() 
    {
        return orderId;
    }

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

    public Date getOrderDate() 
    {
        return orderDate;
    }

    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }

    public void setGoodsName(String goodsName) 
    {
        this.goodsName = goodsName;
    }

    public String getGoodsName() 
    {
        return goodsName;
    }

    public void setGoodsImgUrl(String goodsImgUrl) 
    {
        this.goodsImgUrl = goodsImgUrl;
    }

    public String getGoodsImgUrl() 
    {
        return goodsImgUrl;
    }

    public void setMenuDetailId(Long menuDetailId) 
    {
        this.menuDetailId = menuDetailId;
    }

    public Long getMenuDetailId() 
    {
        return menuDetailId;
    }

    public void setSalePrice(Long salePrice) 
    {
        this.salePrice = salePrice;
    }

    public Long getSalePrice() 
    {
        return salePrice;
    }

    public void setDiscountPrice(Long discountPrice) 
    {
        this.discountPrice = discountPrice;
    }

    public Long getDiscountPrice() 
    {
        return discountPrice;
    }

    public void setFinalPrice(Long finalPrice) 
    {
        this.finalPrice = finalPrice;
    }

    public Long getFinalPrice() 
    {
        return finalPrice;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setSalesMode(Long salesMode) 
    {
        this.salesMode = salesMode;
    }

    public Long getSalesMode() 
    {
        return salesMode;
    }

    public void setDetailType(Long detailType) 
    {
        this.detailType = detailType;
    }

    public Long getDetailType() 
    {
        return detailType;
    }

    public void setTotalAmount(Long totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public Long getTotalAmount() 
    {
        return totalAmount;
    }

    public void setCalcTotalAmount(Long calcTotalAmount) 
    {
        this.calcTotalAmount = calcTotalAmount;
    }

    public Long getCalcTotalAmount() 
    {
        return calcTotalAmount;
    }

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

    public Long getRealAmount() 
    {
        return realAmount;
    }

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

    public Long getRefundAmount() 
    {
        return refundAmount;
    }

    public void setDetailState(Long detailState) 
    {
        this.detailState = detailState;
    }

    public Long getDetailState() 
    {
        return detailState;
    }

    public void setRefundNum(Long refundNum) 
    {
        this.refundNum = refundNum;
    }

    public Long getRefundNum() 
    {
        return refundNum;
    }

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

    public String getDeviceSn() 
    {
        return deviceSn;
    }

    public void setSerialNum(String serialNum) 
    {
        this.serialNum = serialNum;
    }

    public String getSerialNum() 
    {
        return serialNum;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("detailId", getDetailId())
            .append("orderId", getOrderId())
            .append("orderDate", getOrderDate())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("goodsImgUrl", getGoodsImgUrl())
            .append("menuDetailId", getMenuDetailId())
            .append("salePrice", getSalePrice())
            .append("discountPrice", getDiscountPrice())
            .append("finalPrice", getFinalPrice())
            .append("quantity", getQuantity())
            .append("salesMode", getSalesMode())
            .append("detailType", getDetailType())
            .append("totalAmount", getTotalAmount())
            .append("calcTotalAmount", getCalcTotalAmount())
            .append("realAmount", getRealAmount())
            .append("refundAmount", getRefundAmount())
            .append("detailState", getDetailState())
            .append("refundNum", getRefundNum())
            .append("deviceSn", getDeviceSn())
            .append("serialNum", getSerialNum())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
