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

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.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MaterialMaintenanceResponse extends Model<MaterialMaintenanceResponse> {

	@TableId(type = IdType.AUTO)
	@Schema(description = "记录的唯一标识符")
	private Integer id;

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

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


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

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

	/**
	 * 用户id
	 */
	@Schema(description = "用户id")
	private String userId;

	/**
	 * 部门id
	 */
	@Schema(description = "部门id")
	private String deptId;

	@TableField(exist = false)
	@Schema(description = "物资名称（用于查询与回显）")
	private String materialNameVo;
	@TableField(exist = false)
	@Schema(description = "物资大类（用于查询与回显）")
	private String materialGroupVo;
	@TableField(exist = false)
	@Schema(description = "物资类别（用于查询与回显）")
	private String materialTypeVo;

	@TableField(exist = false)
	@Schema(description = "库点简称")
	private String warehouse;

	@Schema(description = "局名称")
	private String gameName;

	@Schema(description = "维护保养人")
	private String maintenancePerson;

	@Schema(description = "维护保养单位")
	private String maintenanceUnit;

	@Schema(description = "维护保养时间")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date maintenanceTime;

	@Schema(description = "附件路径")
	private String filePart;

	@Schema(description = "附件名称")
	private String fileName;

	@Schema(description = "省份")
	private String province;


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

}
