package com.emergency.avenue.storage.api.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Schema(description = "库存视图")
@EqualsAndHashCode(callSuper = true)
public class MaterialView extends Model<MaterialView> {

	private String deptId;

	@Schema(description = "物资大类")
	private String materialGroup;

	@Schema(description = "物资类别")
	private String materialType;

	@Schema(description = "物资名称")
	private String materialName;


	@Schema(description = "单位")
	private String unit;
	@Schema(description = "数量")
	private BigDecimal quantity; // 假设 quantity 是双精度浮点数
	@Schema(description = "入库时间")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date inboundTime; // 假设 inbound_time 是日期类型
	@Schema(description = "单价")
	private BigDecimal unitPrice; // 假设 unit_price 是双精度浮点数
	@Schema(description = "是否可用")
	private String isAvailable; // 假设 is_available 是布尔类型
	private String remarks;

}
