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

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

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 智慧迎新指南花名册-微信用户绑定关系表Entity
 *
 * @author ZYJ
 * @date 2023-05-17 13:53:18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("edu_smart_welcome_guide_roster_relation")
public class EduSmartWelcomeGuideRosterRelation implements Serializable {

    private static final long serialVersionUID = 8690951904136481894L;

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

    /**
     * 是否删除，1删除0未删除，默认0
     */
    @ApiModelProperty(value = "是否删除，1删除0未删除，默认0")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @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;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 最后修改时间
     */
    @ApiModelProperty(value = "最后修改时间")
    @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;

    /**
     * 最后修改人id
     */
    @ApiModelProperty(value = "最后修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 部门id
     */
    @ApiModelProperty(value = "部门id")
    @TableField("dept_id")
    private Long deptId;

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

    /**
     * 指南id
     */
    @ApiModelProperty(value = "指南id")
    @TableField("guide_id")
    private Long guideId;

    /**
     * 花名册id
     */
    @ApiModelProperty(value = "花名册id")
    @TableField("roster_id")
    private Long rosterId;

    /**
     * 微信openId
     */
    @ApiModelProperty(value = "微信openId")
    @TableField("open_id")
    private String openId;

    /**
     * 登录用户id
     */
    @ApiModelProperty(value = "登录用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "性别. 0-男，1-女")
    private Integer sex;

    @ApiModelProperty("人员基础信息")
    private transient EduSmartWelcomeGuideRoster guideRoster;

    @ApiModelProperty("人员步骤信息")
    private transient List<EduSmartWelcomeGuideStep> stepList;
}