package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.BaseProject;
import com.ssm.manage.entity.BaseStaff;
import com.ssm.manage.page.BasePage;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.Column;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@Transactional
@JsonIgnoreProperties(ignoreUnknown = true)
public class MemberOrderRequest extends BasePage {
    /**
     * 主键ID
     */
    @Id
    private Long id;

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

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

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

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

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


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

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

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

    /**
     * 业务员ID
     */
    @Column(name = "staff_id")
    private Long staffId;

    /**
     * 业务员名称
     */
    @Column(name = "staff_name")
    private String staffName;

    /**
     * 记录录入时间
     */
    @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;

    /**
     * 预约时间(精确到小时)
     */
    @Column(name = "order_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date orderDate;

    /**
     * 状态 0:预约状态/1:开单状态
     */
    private Integer state;

    /**
     * 疗程账户ID
     */
    @Column(name = "course_account_id")
    private Long courseAccountId;

    private List<BaseProject> projectList;
    private List<BaseStaff> staffList;


}
