package com.vctgo.system.api.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vctgo.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 核心经验对象 profile_core_experience
 *
 * @author caesar
 * @date 2024-06-13
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("profile_core_experience")
public class ProfileCoreExperience implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 租户Id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long tenantId;

    /**
     * 父Id
     */
    @Excel(name = "父Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 详情
     */
    @Excel(name = "详情")
    private String detailDesc;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否删除
     */
    @Excel(name = "是否删除")
    private String isDeleted;

    /**
     * 创建人ID
     */
    @Excel(name = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createById;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 最近更新人ID
     */
    @Excel(name = "最近更新人ID")
    @TableField(fill = FieldFill.UPDATE)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateById;


    // =======================================页面扩展字段==============================================
    @TableField(exist = false)
    private List<ProfileCoreExperience> profileCoreExperienceList;

}
