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.time.LocalDateTime;

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

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

    @Schema(description = "药品")
    private Integer medicineId;

    @Schema(description = "库存数量")
    private Integer stockQuantity;

    @Schema(description = "最小库存预警")
    private Integer minStockLevel;

    @Schema(description = "上次更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastUpdated;

    @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;

}
