package com.seer.teach.admin.request;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@Schema(description = "添加书籍请求参数")
public class BooksSaveReq {

    @Schema(description = "书籍名称")
    @NotBlank(message = "书籍名称不能为空")
    private String title;

    @Schema(description = "书籍作者")
    @NotBlank(message = "书籍作者不能为空")
    private String author;

    @Schema(description = "作者国籍")
    @NotBlank(message = "作者国籍不能为空")
    private String authorNationality;

    @Schema(description = "出版社")
    @NotBlank(message = "出版社不能为空")
    private String publisher;

    @Schema(description = "出版时间")
    @NotNull(message = "出版时间不能为空")
    private LocalDate publishDate;

    @Schema(description = "书籍简介")
    @NotBlank(message = "书籍简介不能为空")
    private String introduction;

    @Schema(description = "是否免费，0：免费，1：不免费")
    private Integer isFree;

    @Schema(description = "是否上架，0：下架，1：上架")
    private Integer status;

    @Schema(description = "书籍价格")
    private BigDecimal price;

    @Schema(description = "封面图片URL")
    @NotBlank(message = "封面图片URL不能为空")
    private String coverImageUrl;

}
