package com.willalp.canteen.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.willalp.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 食堂订单明细对象 hs_canteen_order_detail
 *
 * @author songyu
 * @date 2021-12-03
 */

@TableName("hs_gift_order_detail")
public class HsGiftOrderDetail {
    private static final long serialVersionUID = 1L;

    /**
     * 订单明细id
     */
    @TableId
    private String detailId;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderNumber;

    /**
     * 菜单编号
     */
    @Excel(name = "菜单编号")
    private String menuNumber;

    /**
     * 礼品ID
     */
    @Excel(name = "礼品编号")
    @TableField(exist = false)
    private String giftId;

    /**
     * 礼品名称
     */
    @Excel(name = "礼品名称")
    private String giftName;

    /** 礼品编号 */
    @Excel(name = "礼品编号")
    private String giftNumber;

    /**
     * 菜品编号
     */
    @Excel(name = "菜品编号")
    private String cuisineNumber;
    /**
     * 菜品名称
     */
    @Excel(name = "菜品名称")
    private String cuisineName;

    /**
     * 数量
     */
    @Excel(name = "数量")
    private Integer amount;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private BigDecimal price;

    /**
     * 总价
     */
    @Excel(name = "总价")
    private BigDecimal total;

    /**
     * 机构代码
     */
    @Excel(name = "机构代码")
    private String jgid;

    @TableField(exist = false)
    private Integer patternId;

    @TableField(exist = false)
    private String cuisinePictrue;

    /** 事件ID */
    private String eventId;

    /** 事件名称 */
    @TableField(exist = false)
    @Excel(name = "事件名称")
    private String eventName;

    /** 事件时间 */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "事件时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date eventTime;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    @TableLogic
    private Integer isDelete;

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public Date getEventTime() {
        return eventTime;
    }

    public void setEventTime(Date eventTime) {
        this.eventTime = eventTime;
    }

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

    public String getDetailId() {
        return detailId;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setMenuNumber(String menuNumber) {
        this.menuNumber = menuNumber;
    }

    public String getMenuNumber() {
        return menuNumber;
    }

    public void setCuisineNumber(String cuisineNumber) {
        this.cuisineNumber = cuisineNumber;
    }

    public String getCuisineNumber() {
        return cuisineNumber;
    }

    public void setCuisineName(String cuisineName) {
        this.cuisineName = cuisineName;
    }

    public String getCuisineName() {
        return cuisineName;
    }

    public String getGiftName() {
        return giftName;
    }

    public void setGiftName(String giftName) {
        this.giftName = giftName;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    public BigDecimal getTotal() {
        return total;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public String getJgid() {
        return jgid;
    }

    public void setJgid(String jgid) {
        this.jgid = jgid;
    }

    public Integer getPatternId() {
        return patternId;
    }

    public void setPatternId(Integer patternId) {
        this.patternId = patternId;
    }

    public String getCuisinePictrue() {
        return cuisinePictrue;
    }

    public void setCuisinePictrue(String cuisinePictrue) {
        this.cuisinePictrue = cuisinePictrue;
    }

    public String getGiftNumber() {
        return giftNumber;
    }

    public void setGiftNumber(String giftNumber) {
        this.giftNumber = giftNumber;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("detailId", getDetailId())
                .append("orderNumber", getOrderNumber())
                .append("menuNumber", getMenuNumber())
                .append("cuisineNumber", getCuisineNumber())
                .append("cuisineName", getCuisineName())
                .append("amount", getAmount())
                .append("price", getPrice())
                .append("total", getTotal())
                .append("isDelete", getIsDelete())
                .append("jgid", getJgid())
                .append("patternId", getPatternId())
                .append("cuisinePictrue", getCuisinePictrue())
                .toString();
    }

    public String getGiftId() {
        return giftId;
    }

    public void setGiftId(String giftId) {
        this.giftId = giftId;
    }
}
