package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.PayList;
import com.ssm.manage.entity.Salesman;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class CardChangeInProjectRequest {
    @Id
    private Long id;

    /**
     * 单据号
     */
    @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;

    /**
     * 项目编码
     */
    @Column(name = "project_id")
    private Long projectId;

    /**
     * 项目名称
     */
    @Column(name = "project_name")
    private String projectName;

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

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

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

    /**
     * 单次最小销售次数
     */
    @Column(name = "minumum_times")
    private Integer minumumTimes;

    /**
     * 散客价
     */
    private BigDecimal price;

    /**
     * 最低散客价
     */
    @Column(name = "minumum_price")
    private BigDecimal minumumPrice;

    /**
     * 会员价
     */
    @Column(name = "price_member")
    private BigDecimal priceMember;

    /**
     * 最低会员价
     */
    @Column(name = "minumum_price_member")
    private BigDecimal minumumPriceMember;

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

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

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

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

    /**
     * 有效期 单位:月
     */
    @Column(name = "valid_time")
    private Integer validTime;

    /**
     * 转入次数
     */
    @Column(name = "change_in_time")
    private Integer changeInTime;

    /**
     * 转入金额
     */
    @Column(name = "change_in_money")
    private BigDecimal changeInMoney;

    /**
     * 转入套数
     */
    @Column(name = "change_in_case_time")
    private Integer changeInCaseTime;

    /**
     * 欠款金额
     */
    @Column(name = "debt_money")
    private BigDecimal debtMoney;

    /**
     * 退款金额
     */
    @Column(name = "refund_money")
    private BigDecimal refundMoney;

    /**
     * 成交金额
     */
    @Column(name = "transaction_money")
    private BigDecimal transactionMoney;

    //业务员列表
    private List<StaffRequest> staffLists;


    private List<PayList> payLists;
    private List<Salesman> salesmens;


}
