package com.yida.data.common.core.entity.consume;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 消费机学生消费记录Entity
 *
 * @author ZYJ
 * @date 2023-03-24 16:16:49
 */
@Data
@TableName("edu_consume_record")
public class EduConsumeRecord implements Serializable {

    private static final long serialVersionUID = 7445355621973217547L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间（下单时间）
     */
    @ApiModelProperty(value = "创建时间（下单时间）")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    @TableField("order_no")
    private Long orderNo;

    /**
     * 消费机设备编号
     */
    @ApiModelProperty(value = "消费机设备编号")
    @TableField("device_no")
    private String deviceNo;

    /**
     * 学生主键ID
     */
    @ApiModelProperty(value = "学生主键ID")
    @TableField("student_id")
    private Long studentId;

    /**
     * 学生姓名
     */
    @ApiModelProperty(value = "学生姓名")
    @TableField("student_name")
    private String studentName;

    /**
     * 校园卡号
     */
    @ApiModelProperty(value = "校园卡号")
    @TableField("stu_card_number")
    private String stuCardNumber;

    /**
     * 消费金额. 单位: 元
     */
    @ApiModelProperty(value = "消费金额. 单位: 元")
    @TableField("transaction_amount")
    private BigDecimal transactionAmount;
    /**
     * 消费时间
     */
    @ApiModelProperty(value = "消费时间")
    @TableField("transaction_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime transactionTime;

    /**
     * 学校主键ID
     */
    @ApiModelProperty(value = "学校主键ID")
    @TableField("school_id")
    private Long schoolId;

    /**
     * 学校名称
     */
    @ApiModelProperty(value = "学校名称")
    @TableField("school_name")
    private String schoolName;

    /**
     * 学区主键ID
     */
    @ApiModelProperty(value = "学区主键ID")
    @TableField("campus_id")
    private Long campusId;

    /**
     * 学区名称
     */
    @ApiModelProperty(value = "学区名称")
    @TableField("campus_name")
    private String campusName;

    /**
     * 学段主键ID
     */
    @ApiModelProperty(value = "学段主键ID")
    @TableField("section_id")
    private Long sectionId;

    /**
     * 学段名称
     */
    @ApiModelProperty(value = "学段名称")
    @TableField("section_name")
    private String sectionName;

    /**
     * 年级主键ID
     */
    @ApiModelProperty(value = "年级主键ID")
    @TableField("grade_id")
    private Long gradeId;

    /**
     * 年级名称
     */
    @ApiModelProperty(value = "年级名称")
    @TableField("grade_name")
    private String gradeName;

    /**
     * 班级主键ID
     */
    @ApiModelProperty(value = "班级主键ID")
    @TableField("class_id")
    private Long classId;

    /**
     * 班级名称
     */
    @ApiModelProperty(value = "班级名称")
    @TableField("class_name")
    private String className;
}