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

import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
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 org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

/**
 * 表单对应可见人员表 Entity
 *
 * @author ccl
 * @date 2021-11-05 15:41:11
 */
@Data
@TableName("core_custom_form_relation_user")
public class CoreCustomFormRelationUser {

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

    /**
     * 表单可见人员id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 表单可见人员名字
     */
    @TableField("user_name")
    private String userName;

    /**
     * 表单id
     */
    @TableField("custom_form_id")
    private Long customFormId;

    /**
     * 是否填报，1是，0否
     */
    @TableField("fill")
    private Integer fill;

    /**
     * 填报时间
     */
    @TableField("fill_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime fillTime;

    @ApiModelProperty("0为教职工，1为家长")
    @TableField("type")
    private Integer type;

    @TableField(exist = false)
    private List<CoreCustomFormRelationUserParent> parentList;
}