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_course_script_page")
@Schema(description = "课程脚本页面")
public class CourseScriptPage {

    @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 scriptId;

    @Schema(description = "页码", example = "1")
    private Integer pageNumber;

    @Schema(description = "页面内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String content;

    @Schema(description = "图片 URL")
    private String imageUrl;

    @Schema(description = "音频 URL")
    private String audioUrl;

    @Schema(description = "时长（秒）", example = "30")
    private Integer duration;

    @Schema(description = "备注说明")
    private String notes;

    @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_UPDATE)
    private String updatedBy;

    @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 = "是否删除 0-未删除 1-已删除", accessMode = Schema.AccessMode.READ_ONLY)
    @TableLogic
    private Integer deleted;

}
