package com.ruoyi.course.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 排课信息
 * </p>
 *
 *
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sc_book_course")
public class ScBookCourse implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 排课编号
     */
    @TableField(value = "course_time_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseTimeId;

    /**
     * 预约状态:0->预约中；1->教练确认；2->店长确认/预约成功/待上课 3->已取消;4- >已完成/待评价;5- >预约失败；
     */
    @TableField("book_status")
    private int bookStatus;

    /**
     * 学员id
     */
    @TableField("student_id")
    private Long studentId;

    /**
     * 创建预约时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;


    @TableField("code")
    private Long code;

    @TableField("qr_code")
    private String qrCode;

    //*0未签到 1签到
    @TableField("check_in")
    private int checkIn;


    @TableField("check_in_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date checkInTime;


    /**
     * 收费模式 count:课时 days:时间 total_fee:储值
     */
    @TableField("charge_type")
    private String chargeType;

    /**
     * 卡号
     */
    @TableField(value = "card_no")
    private String cardNo;


    /**
     * 划扣次数
     */
    @TableField(value = "deduct_cnt")
    private BigDecimal deductCnt;

    /**
     * 划扣金额
     */
    @TableField(value = "deduct_fee")
    private BigDecimal deductFee;

    @TableField(value = "check_in_manager")
    private Long userId;
    /**
     * 所属租户
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 课程id
     */
    @TableField("course_id")
    private Long courseId;

    @TableField("cla_id")
    private Long claId;
    /**
     * 开班校区
     */
    @TableField("depart_id")
    private Long departId;


}
