package com.vctgo.file.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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.util.List;

/**
 * 分享信息对象 file_share
 *
 * @author caesar
 * @date 2023-08-04
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(value = {"handler"})
@Data
@TableName("file_share")
public class FileShare extends TenantEntity {
    private static final long serialVersionUID = 1L;

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

    /**
     * 时间单位
     */
    @Excel(name = "时间单位")
    private String timeUnit;

    /**
     * 分享总时长
     */
    @Excel(name = "分享总时长")
    private String totalShareTime;

    /**
     * 是否过期
     */
    @Excel(name = "是否过期")
    private String isShareExpired;

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

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

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

    /**
     *被分享的文件Id列表
     */
    @TableField(exist = false)
    private List<Long> fileIdList;

}
