package com.reading.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 资源库实体
 */
@Data
@TableName("t_resource_library")
@Schema(description = "资源库")
public class ResourceLibrary {

    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID", accessMode = Schema.AccessMode.READ_ONLY)
    private String id;

    @Schema(description = "租户 ID")
    private String tenantId;

    @Schema(description = "资源库名称")
    private String name;

    @Schema(description = "资源库描述")
    private String description;

    @Schema(description = "资源库类型")
    private String type;

    @Schema(description = "创建人用户名", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @Schema(description = "创建时间", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @Schema(description = "更新人用户名", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    @Schema(description = "是否删除", accessMode = Schema.AccessMode.READ_ONLY)
    @TableLogic
    private Integer deleted;

}
