package com.seer.teach.teacher.module.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.seer.teach.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 书籍信息表
 * </p>
 *
 * @author Captain
 * @since 2025-06-13
 */
@Getter
@Setter
@TableName("teacher_books")
@Schema(name = "BooksEntity对象", description = "书籍信息表")
public class BooksEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "书籍标题")
    @TableField("title")
    private String title;

    @Schema(description = "作者")
    @TableField("author")
    private String author;

    @Schema(description = "作者国籍")
    @TableField("author_nationality")
    private String authorNationality;

    @Schema(description = "出版社")
    @TableField("publisher")
    private String publisher;

    @Schema(description = "出版时间")
    @TableField("publish_date")
    private LocalDate publishDate;

    @Schema(description = "书籍简介")
    @TableField("introduction")
    private String introduction;

    @Schema(description = "上架时间")
    @TableField("shelf_time")
    private LocalDateTime shelfTime;

    @Schema(description = "下架时间")
    @TableField("delist_time")
    private LocalDateTime deListTime;

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

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

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

    @Schema(description = "推荐的最小年龄")
    @TableField("min_grade_id")
    private Integer minGradeId;

    @Schema(description = "推荐的最大年龄")
    @TableField("max_grade_id")
    private Integer maxGradeId;

    @Schema(description = "封面图片URL")
    @TableField("cover_image_url")
    private String coverImageUrl;

    @Schema(description = "阅读量")
    @TableField("readership")
    private Integer readership;


}
