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_task_target")
@Schema(description = "任务目标")
public class TaskTarget {

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

    @Schema(description = "任务 ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String taskId;

    @Schema(description = "目标类型", example = "student", requiredMode = Schema.RequiredMode.REQUIRED)
    private String targetType;

    @Schema(description = "目标 ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private String targetId;

    @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)
    @TableLogic
    private Integer deleted;

}
