package com.greenorange.promotion.model.dto.courseChapter;

import com.greenorange.promotion.annotation.EnumValue;
import com.greenorange.promotion.model.enums.PreviewPermissionEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.math.BigDecimal;

import java.io.Serial;
import java.io.Serializable;
import com.greenorange.promotion.common.PageRequest;

/**
 * 课程章节查询请求体，继承自分页请求 PageRequest
 */
@Data
@Schema(description = "课程章节查询请求体", requiredProperties = {"current", "pageSize"})
public class CourseChapterQueryRequest extends PageRequest implements Serializable {

    /**
     * 章节名称
     */
    @Schema(description = "章节名称", example = "企业经营管理者为什么必须懂财务？")
    private String name;

    /**
     * 试看权限[全集试看,部分试看,关闭,开启]
     */
    @EnumValue(enumClass = PreviewPermissionEnum.class)
    @Schema(description = "试看权限[全集试看,部分试看,关闭,开启]", example = "全集试看")
    private String permissions;

    /**
     * 课程id
     */
    @NotNull(message = "课程id不能为null")
    @Min(value = 1, message = "课程id不能小于1")
    @Schema(description = "课程id", example = "1")
    private Long courseId;


    @Serial
    private static final long serialVersionUID = 1L;
}

