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 java.math.BigDecimal;
import java.util.*;

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

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

    /**
     * 消费订单id
     */
    @TableId
    private String orderId;

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

    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
    private String userNumber;


    @Excel(name = "姓名")
    private String userName;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phone;


    @TableField(exist = false)
    @Excel(name = "活动名称")
    private String eventName;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型", readConverterExp = "1=预定兑换,2=现场兑换")
    private Integer zfbz;

    /**
     * 订单总额
     */
    @Excel(name = "订单总额")
    private BigDecimal orderTotal;

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

    @Excel(name = "领取地点")
    private String placeNumber;

    @TableField(exist = false)
    @Excel(name = "领取时间")
    private String eventTime;

    @TableField(exist = false)
    @Excel(name = "商品", width = 100)
    private String giftsAndNum;

    /**
     * 设备编号
     */
    private String deviceNumber;

    /**
     * 设备名称
     */
    private String deviceName;

    @TableField(exist = false)
    private String eventId;

    /**
     * 接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date zfsj;

    private String jgid;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态文本
     */
    private String statusText;

    /**
     * 是否新提示（0否，1是）
     */
    private String isNews;
    /**
     * 是否新提示用户端（0否，1是）
     */
    private String isNewsUser;

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

    /**
     * 0消费 1记账
     */
    private Integer consumeSign;

    @TableField(exist = false)
    private Integer patternId;


    @TableField(exist = false)
    private String phonenumber;

    @TableField(exist = false)
    private String placeName;

    @TableField(exist = false)
    private String cardCode;

    @TableField(exist = false)
    private List<String> loginName = new ArrayList<>();

    /**
     * 请求参数
     */
    @TableField(exist = false)
    private Map<String, Object> params;

    public String getGiftsAndNum() {
        return giftsAndNum;
    }

    public void setGiftsAndNum(String giftsAndNum) {
        this.giftsAndNum = giftsAndNum;
    }

    public String getEventName() {
        return eventName;
    }

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

    public String getEventTime() {
        return eventTime;
    }

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

    public String getEventId() {
        return eventId;
    }

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

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public List<String> getLoginName() {
        return loginName;
    }

    public void setLoginName(List<String> loginName) {
        this.loginName = loginName;
    }

    public String getOrderId() {
        return orderId;
    }

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

    public String getOrderNumber() {
        return orderNumber;
    }

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

    public BigDecimal getOrderTotal() {
        return orderTotal;
    }

    public void setOrderTotal(BigDecimal orderTotal) {
        this.orderTotal = orderTotal;
    }

    public String getDeviceNumber() {
        return deviceNumber;
    }

    public void setDeviceNumber(String deviceNumber) {
        this.deviceNumber = deviceNumber;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Date getPaytime() {
        return paytime;
    }

    public void setPaytime(Date paytime) {
        this.paytime = paytime;
    }

    public Integer getZfbz() {
        return zfbz;
    }

    public void setZfbz(Integer zfbz) {
        this.zfbz = zfbz;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

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

    public String getJgid() {
        return jgid;
    }

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

    public String getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber = userNumber;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getConsumeSign() {
        return consumeSign;
    }

    public void setConsumeSign(Integer consumeSign) {
        this.consumeSign = consumeSign;
    }

    public Integer getPatternId() {
        return patternId;
    }

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

    public String getPlaceNumber() {
        return placeNumber;
    }

    public void setPlaceNumber(String placeNumber) {
        this.placeNumber = placeNumber;
    }

    public Date getZfsj() {
        return zfsj;
    }

    public void setZfsj(Date zfsj) {
        this.zfsj = zfsj;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public String getPlaceName() {
        return placeName;
    }

    public void setPlaceName(String placeName) {
        this.placeName = placeName;
    }

    public String getCardCode() {
        return cardCode;
    }

    public void setCardCode(String cardCode) {
        this.cardCode = cardCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("orderNumber", getOrderNumber())
                .append("orderTotal", getOrderTotal())
                .append("deviceNumber", getDeviceNumber())
                .append("deviceName", getDeviceName())
                .append("paytime", getPaytime())
                .append("zfbz", getZfbz())
                .append("isDelete", getIsDelete())
                .append("jgid", getJgid())
                .append("userNumber", getUserNumber())
                .append("userName", getUserName())
                .append("consumeSign", getConsumeSign())
                .append("patternId", getPatternId())
                .append("placeNumber", getPlaceNumber())
                .append("zfsj", getZfsj())
                .append("phonenumber", getPhonenumber())
                .append("cardCode", getCardCode())
                .append("placeName", getPlaceName())
                .toString();
    }

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public String getStatusText() {
        return statusText;
    }

    public void setStatusText(String statusText) {
        this.statusText = statusText;
    }

    public String getIsNews() {
        return isNews;
    }

    public void setIsNews(String isNews) {
        this.isNews = isNews;
    }

    public String getIsNewsUser() {
        return isNewsUser;
    }

    public void setIsNewsUser(String isNewsUser) {
        this.isNewsUser = isNewsUser;
    }
}
