package com.ruoyi.system.domain;

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

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import java.util.List;

/**
 * PromotionCouponBatch对象 promotion_coupon_batch
 *
 * @author ruoyi
 * @date 2024-05-30
 */
@Data
@TableName(value = "promotion_coupon_batch")
@EqualsAndHashCode(callSuper = false)
public class PromotionCouponBatch
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @GeneratedValue
    /** id */
    private Long id;

    /** 门店ID */
    private Long storeId;

    /** 券名称 */
    private String name;

    /** 1=满减券 2=商品券 3=免配送费券 */
    private Integer couponType;

    /** 发放总量 */
    private Integer totalCount;

    /** 剩余数量 */
    private Integer remainCount;

    /** 已领取数量 */
    private Integer receivedCount;

    /** 0=未开始 1=进行中 2=已结束 3=已下架 */
    private Integer status;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 有效天数 */
    private Integer validDays;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 券规则（单条，兼容旧接口） */
    @TableField(exist = false)
    private PromotionCouponRule rule;

    /** 券规则列表（多商品券） */
    @TableField(exist = false)
    private List<PromotionCouponRule> rules;

    /** 是否可编辑 */
    @TableField(exist = false)
    private boolean editable;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setStoreId(Long storeId)
    {
        this.storeId = storeId;
    }

    public Long getStoreId()
    {
        return storeId;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public void setCouponType(Integer couponType)
    {
        this.couponType = couponType;
    }

    public Integer getCouponType()
    {
        return couponType;
    }

    public void setTotalCount(Integer totalCount)
    {
        this.totalCount = totalCount;
    }

    public Integer getTotalCount()
    {
        return totalCount;
    }

    public void setRemainCount(Integer remainCount)
    {
        this.remainCount = remainCount;
    }

    public Integer getRemainCount()
    {
        return remainCount;
    }

    public void setReceivedCount(Integer receivedCount)
    {
        this.receivedCount = receivedCount;
    }

    public Integer getReceivedCount()
    {
        return receivedCount;
    }

    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }

    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }

    public void setValidDays(Integer validDays)
    {
        this.validDays = validDays;
    }

    public Integer getValidDays()
    {
        return validDays;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    public Date getCreateTime()
    {
        return createTime;
    }

    public void setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime()
    {
        return updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeId", getStoreId())
            .append("name", getName())
            .append("couponType", getCouponType())
            .append("totalCount", getTotalCount())
            .append("remainCount", getRemainCount())
            .append("receivedCount", getReceivedCount())
            .append("status", getStatus())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("validDays", getValidDays())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
