package com.ssm.manage.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ssm.manage.entity.PromotionMember;
import com.ssm.manage.entity.PromotionProject;
import com.ssm.manage.page.BasePage;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
public class PromotionListResponse {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 门店ID
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 促销方案编码
     */
    @Column(name = "promotion_num")
    private String promotionNum;

    /**
     * 促销方案名称
     */
    @Column(name = "promotion_name")
    private String promotionName;

    /**
     * 促销方案售价
     */
    @Column(name = "sale_money")
    private BigDecimal saleMoney;

    /**
     * 促销方案总价
     */
    @Column(name = "total_money")
    private BigDecimal totalMoney;

    /**
     * 开始时间
     */
    @Column(name = "begin_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginDate;

    /**
     * 结束时间
     */
    @Column(name = "end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endDate;

    /**
     * 适用对象0:所有会员/1:生日会员/2:指定会员
     */
    @Column(name = "suitable_object")
    private Integer suitableObject;

    /**
     * 0:不限购/1:限购
     */
    @Column(name = "limit_buy")
    private Integer limitBuy;

    /**
     * 限购次数
     */
    @Column(name = "limit_count")
    private Integer limitCount;



    /**
     * 状态0:添加/1:修改/2:审核/3:反审核
     */
    private Integer state;

    /**
     * 现付销售提成，大于1表示固定提成，小于等于1表示比率提成
     */
    @Column(name = "sales_commission")
    private BigDecimal salesCommission;

    /**
     * 卡付销售提成，大于1表示固定提成，小于等于1表示比率提成
     */
    @Column(name = "card_sales_commission")
    private BigDecimal cardSalesCommission;

    private List<PromotionProject> promotionProjectLists;

    private List<PromotionMember> promotionMemberLists;
}
