package com.gxwebsoft.clinic.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 药品库
 *
 * @author 科技小王子
 * @since 2025-10-22 02:06:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ClinicMedicine对象", description = "药品库")
public class ClinicMedicine implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "药名")
    private String name;

    @Schema(description = "拼音")
    private String pinyin;

    @Schema(description = "分类（如“清热解毒”、“补气养血”）")
    private String category;

    @Schema(description = "规格（如“饮片”、“颗粒”）")
    private String specification;

    @Schema(description = "单位（如“克”、“袋”）")
    private String unit;

    @Schema(description = "描述")
    private String content;

    @Schema(description = "单价")
    private BigDecimal pricePerUnit;

    @Schema(description = "是否活跃")
    private Integer isActive;

    @Schema(description = "买家用户ID")
    private Integer userId;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "商城ID")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
