package com.ssm.manage.extendEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ssm.manage.page.BasePage;
import com.ssm.manage.utils.DateUtils;
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.util.Date;

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

    /**
     * 收银单号
     */
    @Column(name = "cash_num")
    private String cashNum;

    /**
     * 单据日期
     */
    @Column(name = "cash_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cashDate;

    /**
     * 会员编码
     */
    @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;

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

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

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

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

    /**
     * 员工是否反馈0:未反馈/1:已反馈
     */
    @Column(name = "is_staff_feedback")
    private Integer isStaffFeedback;

    private Long staffId;

    private String staffName;

    private String selectDate;

    @JsonIgnore
    public String getTab(){
        return DateUtils.YMFormat(cashDate);
    }
}
