package com.mall.coupon.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

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

@Getter
@Setter
@Accessors(chain = true)
@TableName("sms_coupon")
@Schema(name = "Coupon对象", title = "优惠券信息", description = "优惠券信息的实体类对象")
public class Coupon {

    @Schema(name = "id", title = "id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(name = "couponType", title = "优惠卷类型[0->全场赠券；1->会员赠券；2->购物赠券；3->注册赠券]")
    private Boolean couponType;

    @Schema(name = "couponImg", title = "优惠券图片")
    private String couponImg;

    @Schema(name = "couponName", title = "优惠卷名字")
    private String couponName;

    @Schema(name = "num", title = "数量")
    private Integer num;

    @Schema(name = "amount", title = "金额")
    private BigDecimal amount;

    @Schema(name = "perLimit", title = "每人限领张数")
    private Integer perLimit;

    @Schema(name = "minPoint", title = "使用门槛")
    private BigDecimal minPoint;

    @Schema(name = "startTime", title = "开始时间")
    private LocalDateTime startTime;

    @Schema(name = "endTime", title = "结束时间")
    private LocalDateTime endTime;

    @Schema(name = "useType", title = "使用类型[0->全场通用；1->指定分类；2->指定商品]")
    private Boolean useType;

    @Schema(name = "note", title = "备注")
    private String note;

    @Schema(name = "publishCount", title = "发行数量")
    private Integer publishCount;

    @Schema(name = "useCount", title = "已使用数量")
    private Integer useCount;

    @Schema(name = "receiveCount", title = "领取数量")
    private Integer receiveCount;

    @Schema(name = "enableStartTime", title = "可以领取的开始日期")
    private LocalDateTime enableStartTime;

    @Schema(name = "enableEndTime", title = "可以领取的结束日期")
    private LocalDateTime enableEndTime;

    @Schema(name = "code", title = "优惠码")
    private String code;

    @Schema(name = "memberLevel", title = "可以领取的会员等级[0->不限等级，其他-对应等级]")
    private Boolean memberLevel;

    @Schema(name = "publish", title = "发布状态[0-未发布，1-已发布]")
    private Boolean publish;

}