package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.Salesman;
import com.ssm.manage.extendEntity.AchiCommEntity;
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
@JsonIgnoreProperties(ignoreUnknown = true)
public class CardChangeOutProjectRequest {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    private String courseNum;

    /**
     * 单据号
     */
    @Column(name = "doc_num")
    private String docNum;

    /**
     * 单据时间
     */
    @Column(name = "doc_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date docDate;

    /**
     * 会员ID
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员卡
     */
    private String card;

    /**
     * 会员手机号
     */
    @Column(name = "mobile_phone")
    private String mobilePhone;

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

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

    /**
     * 开卡疗程ID
     */
    @Column(name = "course_project_id")
    private Long courseProjectId;

    /**
     * 开卡疗程名称
     */
    @Column(name = "course_project_name")
    private String courseProjectName;

    /**
     * 开卡疗程金额
     */
    @Column(name = "course_project_money")
    private BigDecimal courseProjectMoney;

    /**
     * 开卡疗程次数
     */
    @Column(name = "course_count")
    private Integer courseCount;

    /**
     * 开卡剩余次数
     */
    @Column(name = "course_rest_count")
    private Integer courseRestCount;

    /**
     * 开卡可用次数
     */
    @Column(name = "course_consume_count")
    private Integer courseConsumeCount;

    /**
     * 账户类型0:疗程/1:促销
     */
    @Column(name = "course_type")
    private String courseType;

    /**
     * 项目单价
     */
    @Column(name = "unit_money")
    private BigDecimal unitMoney;

    /**
     * 转出次数
     */
    @Column(name = "change_out_time")
    private Integer changeOutTime;

    /**
     * 转出金额
     */
    @Column(name = "change_out_money")
    private BigDecimal changeOutMoney;

    /**
     * 促销方案ID
     */
    @Column(name = "promotion_id")
    private Long promotionId;

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

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

    /**
     * 账户ID
     */
    @Column(name = "account_id")
    private Long accountId;

    /**
     * 卡付销售业绩，大于1表示固定业绩，小于等于1表示比率业绩
     */
    @Column(name = "card_sales_achievement")
    private BigDecimal cardSalesAchievement;

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

    /**
     * 卡付销售业绩
     */
    @Column(name = "card_achievement_amount")
    private BigDecimal cardAchievementAmount;

    /**
     * 卡付销售提成
     */
    @Column(name = "card_commission_amount")
    private BigDecimal cardCommissionAmount;

    //业务员列表
    private List<StaffRequest> staffLists;
    private List<Salesman> salesmen;
    private List<AchiCommEntity> entities;
}
