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

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 亲情电话-ic卡 Entity
 *
 * @author zhanghaijun
 * @date 2021-08-10 16:28:12
 */
@Data
@TableName("edu_telephone_card")
public class EduTelephoneCard {

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

    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    @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;

    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * ic卡号
     */
    @TableField("card_no")
    @ApiModelProperty("ic卡号")
    private String cardNo;

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

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

    /**
     * 使用状态，0-正常使用，1-冻结
     */
    @TableField("status")
    @ApiModelProperty("使用状态，0-正常使用，1-冻结")
    private Integer status;

    /**
     * 余额
     */
    @TableField("balance")
    @ApiModelProperty("余额")
    private String balance;

    /**
     * 费率
     */
    private Long priceId;

    @TableField("school_id")
    private Long schoolId;

    /**
     *
     */
    @TableField("school_name")
    private String schoolName;

    /**
     *
     */
    @TableField("campus_id")
    private Long campusId;

    /**
     *
     */
    @TableField("campus_name")
    private String campusName;

    /**
     *
     */
    @TableField("section_id")
    private Long sectionId;

    /**
     *
     */
    @TableField("section_name")
    private String sectionName;

    /**
     *
     */
    @TableField("grade_id")
    private Long gradeId;

    /**
     *
     */
    @TableField("grade_name")
    private String gradeName;

    /**
     *
     */
    @TableField("class_id")
    private Long classId;

    /**
     *
     */
    @TableField("class_name")
    private String className;

    @ApiModelProperty("学生头像")
    @TableField(exist = false)
    private String avatar;

    @ApiModelProperty("家庭类型,0-普通，1-低保，2-残疾，3-贫困，4-军人烈士，5-教师子女,','分割")
    @TableField(exist = false)
    private String familyType;

    private transient Double balanceValue;

    private transient LocalDateTime mealDdl;

}