package top.imwork.window.silos.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 图书信息表（书目数据）
 *
 * @author jiangxiaowei
 * email: e-jiangxiaowei@outlook.com
 * date: 2025-11-04 13:16:26
 */
@TableName("book_info")
public class Info implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 图书信息唯一标识符
     */
    @TableId
    private Long id;
    /**
     * 国际标准书号
     */
    private String isbn;
    /**
     * 图书正题名
     */
    private String title;
    /**
     * 副题名
     */
    private String subtitle;
    /**
     * 第一作者
     */
    private String author;
    /**
     * 其他责任者
     */
    private String otherAuthors;
    /**
     * 出版社
     */
    private String publisher;
    /**
     * 出版日期
     */
    private Date publishDate;
    /**
     * 版次
     */
    private String edition;
    /**
     * 分类ID
     */
    private String categoryCode;
    /**
     * 正文语种
     */
    private String language;
    /**
     * 封面图片路径/URL
     */
    private String coverImage;
    /**
     * 内容简介/摘要
     */
    private String summary;
    /**
     * 目录
     */
    private String toc;
    /**
     * 定价
     */
    private BigDecimal price;
    /**
     * 页数
     */
    private Integer pages;
    /**
     * 开本/尺寸
     */
    private String dimensions;
    /**
     * 装帧
     */
    private String binding;
    /**
     * 丛书名
     */
    private String series;
    /**
     * 来源
     */
    private String source;
    /**
     * 记录创建时间
     */
    private Date createdAt;
    /**
     * 记录最后更新时间
     */
    private Date updatedAt;

    @Override
    public String toString() {
        return "Info{" +
                "id=" + id +
                ", isbn='" + isbn + '\'' +
                ", title='" + title + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", author='" + author + '\'' +
                ", otherAuthors='" + otherAuthors + '\'' +
                ", publisher='" + publisher + '\'' +
                ", publishDate=" + publishDate +
                ", edition='" + edition + '\'' +
                ", categoryCode=" + categoryCode +
                ", language='" + language + '\'' +
                ", coverImage='" + coverImage + '\'' +
                ", summary='" + summary + '\'' +
                ", toc='" + toc + '\'' +
                ", price=" + price +
                ", pages=" + pages +
                ", dimensions='" + dimensions + '\'' +
                ", binding='" + binding + '\'' +
                ", series='" + series + '\'' +
                ", source='" + source + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Info info)) return false;
        return Objects.equals(id, info.id) && Objects.equals(isbn, info.isbn) && Objects.equals(title, info.title) && Objects.equals(subtitle, info.subtitle) && Objects.equals(author, info.author) && Objects.equals(otherAuthors, info.otherAuthors) && Objects.equals(publisher, info.publisher) && Objects.equals(publishDate, info.publishDate) && Objects.equals(edition, info.edition) && Objects.equals(categoryCode, info.categoryCode) && Objects.equals(language, info.language) && Objects.equals(coverImage, info.coverImage) && Objects.equals(summary, info.summary) && Objects.equals(toc, info.toc) && Objects.equals(price, info.price) && Objects.equals(pages, info.pages) && Objects.equals(dimensions, info.dimensions) && Objects.equals(binding, info.binding) && Objects.equals(series, info.series) && Objects.equals(source, info.source) && Objects.equals(createdAt, info.createdAt) && Objects.equals(updatedAt, info.updatedAt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, isbn, title, subtitle, author, otherAuthors, publisher, publishDate, edition, categoryCode, language, coverImage, summary, toc, price, pages, dimensions, binding, series, source, createdAt, updatedAt);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getOtherAuthors() {
        return otherAuthors;
    }

    public void setOtherAuthors(String otherAuthors) {
        this.otherAuthors = otherAuthors;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public String getEdition() {
        return edition;
    }

    public void setEdition(String edition) {
        this.edition = edition;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getCoverImage() {
        return coverImage;
    }

    public void setCoverImage(String coverImage) {
        this.coverImage = coverImage;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getToc() {
        return toc;
    }

    public void setToc(String toc) {
        this.toc = toc;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public String getDimensions() {
        return dimensions;
    }

    public void setDimensions(String dimensions) {
        this.dimensions = dimensions;
    }

    public String getBinding() {
        return binding;
    }

    public void setBinding(String binding) {
        this.binding = binding;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
}
