package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.*;
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.math.BigInteger;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class PromotionListRequest extends BasePage {

    /**
     * 疗程送的充值列表
     */
    private List<PromotionRechargeList> promotionRechargeLists;
    /**
     * 主键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 = "suitable_store")
    private Integer suitableStore;

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

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



    /**
     * 状态0:添加/1:修改/2:送审/3:回收/4:审核/5:反审核/6:关闭
     */
    private Integer state;

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

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

    /**
     * 0:未发布/1:已发布
     */
    @Column(name = "push_state")
    private Integer pushState;

    /**
     * 发布状态进行推送次数
     */
    @Column(name = "push_count")
    private Integer pushCount;

    /**
     * 0:不允许充值卡付/1:允许充值卡付
     */
    @Column(name = "card_buy")
    private Integer cardBuy;

    /**
     * 0:折扣卡不允许打折赠送卡不允许使用赠送金额/1:折扣卡允许打折赠送卡允许使用赠送金额
     */
    @Column(name = "card_limit")
    private Integer cardLimit;

    /**
     * 0:包项目/1:买就送
     */
    private Integer type;

    private String staffPhone;

    private List<PromotionProject> promotionProjectLists;

    private List<PromotionMember> promotionMemberLists;

    private List<Long> promotionunitId;

    private List<PromotionStore> promotionStores;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;


    /**
     * 创建时间
     */
    @Column(name = "created_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdDate;

    /**
     * 创建人ID
     */
    @Column(name = "created_id")
    private Long createdId;

    /**
     * 创建人名称
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "update_date")
    private Date updateDate;

    /**
     * 修改人ID
     */
    @Column(name = "updated_id")
    private Long updatedId;

    /**
     * 修改人名称
     */
    @Column(name = "updated_by")
    private String updatedBy;

    /**
     * 审核人时间
     */
    @Column(name = "audit_date")
    private Date auditDate;

    /**
     * 审核人ID
     */
    @Column(name = "audit_id")
    private Long auditId;

    /**
     * 审核人名称
     */
    @Column(name = "audit_by")
    private String auditBy;

    /**
     * 选择性项目促销的选择项目数
     */
    @Column(name = "project_count")
    private Integer projectCount;

    /**
     * 选择性项目促销的选择项目数
     */
    @Column(name = "project_total")
    private Integer projectTotal;

    /**
     * 是否必选：0=必选，1=非必选，用于促销的选择性项目方案
     */
    @Column(name = "required")
    private Integer required;

    /**
     * 随心选总价方式（0=固定价，1=选择项目金额和）
     */
    @Column(name = "money_type")
    private Integer moneyType;


    /*@Column(name = "valid_time")
    private Integer validTime;

    @Column(name = "use_end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date useEndDate;*/

    //1有效期 2截止日期
    private Integer typeInfo;
}
