package com.ssm.manage.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ssm.manage.entity.DocPromotionProject;
import com.ssm.manage.entity.PayList;
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 javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@ToString
public class DocPromotionResponse {

    @Transient
    private String errorMessage;
    /**
     * 主键ID
     */
    @Id
    private Long id;

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

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

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

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

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

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity_card")
    private String memberIdentityCard;

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

    /**
     * 单据号
     */
    @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 = "promotion_id")
    private Long promotionId;

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

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

    /**
     * 促销方案价格
     */
    private BigDecimal price;

    /**
     * 促销方案价格
     */
    @Column(name = "debt_money")
    private BigDecimal debtMoney;

    /**
     * 套数
     */
    private Integer count;

    /**
     * 销售金额
     */
    private BigDecimal amount;

    /**
     * 现付金额
     */
    @Column(name = "collection_cash_amount")
    private BigDecimal collectionCashAmount;

    /**
     * 充值卡付金额
     */
    @Column(name = "collection_recharge_amount")
    private BigDecimal collectionRechargeAmount;

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

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

    /**
     * 现付销售业绩
     */
    @Column(name = "achievement_amount")
    private BigDecimal achievementAmount;

    /**
     * 现付销售提成
     */
    @Column(name = "commission_amount")
    private BigDecimal commissionAmount;

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

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

    /**
     * 录单人ID
     */
    @Column(name = "input_id")
    private Long inputId;

    /**
     * 录单人名称
     */
    @Column(name = "input_by")
    private String inputBy;

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

    /**
     * 作废人ID
     */
    @Column(name = "cancel_id")
    private Long cancelId;

    /**
     * 作废人名称
     */
    @Column(name = "cancel_by")
    private String cancelBy;

    /**
     * 作废时间
     */
    @Column(name = "cancel_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date cancelDate;

    /**
     * 是否作废 1:作废/0:未作废
     */
    @Column(name = "is_cancel")
    private Integer isCancel;


    /**
     * 选择的项目序号数组
     */
    @Column(name = "project_count")
    private String projectCount;

    /**
     * 描述
     */
    private String description;

    private List<DocPromotionProject> promotionProjects;

    private List<PayList> payLists;

    private List<RechargeAccountResponse> rechargeConsumeList;

    private List<AchiCommEntity> entities;
}
