package com.vctgo.file.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 com.vctgo.common.core.web.domain.TenantEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * 文件与用户的操作关系对象 file_re_user_operate
 *
 * @author caesar
 * @date 2024-01-31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("file_re_user_operate")
public class FileReUserOperate implements Serializable {
    private static final long serialVersionUID = 1L;

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

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

    /**
     * 文件Id
     */
    @Excel(name = "文件Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fileId;

    /**
     * 用户Id
     */
    @Excel(name = "用户Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    private String userName;

    /**
     * 用户手机号
     */
    @Excel(name = "用户手机号")
    private String phoneNumber;

    /**
     * 文件分组id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "文件分组id")
    private Long fileUserAuthId;

    /**
     * 文件分组code
     */
    @Excel(name = "文件分组code")
    private String fileUserAuthCode;

    /**
     * 文件分组说明
     */
    @Excel(name = "文件分组说明")
    private String fileUserAuthDesc;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

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

    /**
     * 创建人ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    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
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "最近更新人ID")
    @TableField(fill = FieldFill.UPDATE)
    private Long updateById;

    /**
     * 权限字符
     */
    @TableField(exist = false)
    private String groupPermissions;

}
