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

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

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Schema(description = "物资故障管理表")
@NoArgsConstructor
@AllArgsConstructor
public class MaterialsFailureDetail extends Model<MaterialsFailureDetail> {
	@TableId(type = IdType.AUTO)
	@Schema(description = "记录的唯一标识符")
	private Long id;

	@Schema(description = "垂管局")
	private String deptName ;

	@Schema(description = "垂管局id")
	private Long deptId;

	@Schema(description = "仓库名称")
	private String warehouseName ;

	@Schema(description = "仓库id")
	private Long warehouseId;


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

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


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

	@Schema(description = "物资单位")
	private String materialUnit;

	@Schema(description = "入库日期")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private LocalDate inboundTime;

	@Schema(description = "提交日期")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime submitTime;

	@Schema(description = "更新日期")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime updateTime;

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

	@Schema(description = "数量")
	private Long quantity;

	@Schema(description = "总价")
	private BigDecimal totalPrice;

	@Schema(description = "规格")
	private String specs;

	@Schema(description = "生产厂家")
	private String  manufacturer;

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

	@Schema(description = "处理方式")
	private String  method;

	@Schema(description = "状态")
	private Integer status;

	@Schema(description = "备注")
	private String remarks;
	@TableField(exist = false)
	/** 物资名称 */
	@Schema(description = "物资名称")
	private String materialNameVo;
	@Schema(description = "提交日期")
	@TableField(exist = false)
	private String submitTimeVo;

}
