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 com.willalp.common.core.domain.BaseEntity;
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_gift
 *
 * @author songyu
 * @date 2022-03-03
 */

@TableName("hs_gift")
public class HsGift extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 礼品id
     */
    @TableId
    private String giftId;

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

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

    /**
     * 礼品图片
     */
    @Excel(name = "礼品图片")
    private String giftPictrue;

    /**
     * 礼品价格
     */
    @Excel(name = "礼品价格")
    private BigDecimal giftPrice;

    /**
     * 礼品描述
     */
    private String giftContent;

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

    /**
     * 礼品类型
     */
    @Excel(name = "礼品类型")
    private String giftType;

    private String giftEventType;

    /**
     * 选择数量
     */
    @TableField(exist = false)
    private Integer num;

    /** 事件ID */
    @TableField(exist = false)
    @Excel(name = "事件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-禁用
     */
    @Excel(name = "启用标志 0-启用 1-禁用")
    private String qybz;

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

    /**
     * 是否删除（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 setGiftId(String giftId) {
        this.giftId = giftId;
    }

    public String getGiftId() {
        return giftId;
    }

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

    public String getGiftNumber() {
        return giftNumber;
    }

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

    public String getGiftName() {
        return giftName;
    }

    public void setGiftPictrue(String giftPictrue) {
        this.giftPictrue = giftPictrue;
    }

    public String getGiftPictrue() {
        return giftPictrue;
    }

    public void setGiftPrice(BigDecimal giftPrice) {
        this.giftPrice = giftPrice;
    }

    public BigDecimal getGiftPrice() {
        return giftPrice;
    }

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

    public Integer getAmount() {
        return amount;
    }

    public void setQybz(String qybz) {
        this.qybz = qybz;
    }

    public String getQybz() {
        return qybz;
    }

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

    public String getJgid() {
        return jgid;
    }

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

    public Integer getIsDelete() {
        return isDelete;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("giftId", getGiftId())
                .append("giftNumber", getGiftNumber())
                .append("giftName", getGiftName())
                .append("giftPictrue", getGiftPictrue())
                .append("giftPrice", getGiftPrice())
                .append("amount", getAmount())
                .append("qybz", getQybz())
                .append("jgid", getJgid())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }

    public String getGiftContent() {
        return giftContent;
    }

    public void setGiftContent(String giftContent) {
        this.giftContent = giftContent;
    }

    public String getGiftType() {
        return giftType;
    }

    public void setGiftType(String giftType) {
        this.giftType = giftType;
    }

    public String getGiftEventType() {
        return giftEventType;
    }

    public void setGiftEventType(String giftEventType) {
        this.giftEventType = giftEventType;
    }
}
