package com.ruoyi.school.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 lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 上课出勤表
 * </p>
 *
 * @author zhangby
 * @since 2020-09-30 02:33:26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sc_cla_time_attend")
public class ScClaTimeAttend implements Serializable {


    /**
     * 主键
     */
    @TableId(value = "attend_id", type = IdType.ASSIGN_ID)
    private Long attendId;


    /**
     * sc_cla_time.course_time_id
     */
    @TableField("course_time_id")
    private Long courseTimeId;

    @TableField("book_id")
    private Long bookId;

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

    /**
     * 班级 冗余自动
     */
    @TableField("cla_id")
    private Long claId;

    /**
     * 课程 冗余自动
     */
    @TableField("course_id")
    private Long courseId;

    /**
     * 上课教练
     */
    @TableField("teacher_id")
    private Long teacherId;

    /**
     * 教练名
     */
    @TableField("teacher_name")
    private String teacherName;

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

    /**
     * 出席状态 1:到课 2:请假 3:缺勤
     */
    @TableField("attend_status")
    private String attendStatus;

    /**
     * 教练获取课时费（未使用）
     */
    @TableField("teacher_get_cla_fee")
    private BigDecimal teacherGetClaFee;

    /**
     * 扣减课时数量
     */
    @TableField("pay_hour")
    private BigDecimal payHour;

    /**
     * 学费消耗
     */
    @TableField("pay_fee")
    private BigDecimal payFee;

    /**
     * 备注
     */
    @TableField("memo")
    private String memo;

    /**
     * 创建者
     */
    @TableField("create_user")
    private Long  createUser;

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


    /**
     * 卡ID
     */
    @TableField(value = "member_card_id")
    private Long memberCardId;

    /**
     * 划扣前次数
     */
    @TableField(value = "count_before")
    private BigDecimal countBefore;

    /**
     * 划扣后次数
     */
    @TableField(value = "count_after")
    private BigDecimal countAfter;



    /**
     * 划扣前余额
     */
    @TableField(value = "fee_before")
    private BigDecimal feeBefore;

    /**
     * 划扣后余额
     */
    @TableField(value = "fee_after")
    private BigDecimal feeAfter;

    /**
     * 所属租户
     */
    @TableField("tenant_id")
    private String tenantId;
}
