package com.yh.saas.plugin.yiliangyiyun.entity;

import java.io.Serializable;
import java.util.Date;


import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 记录历史库存信息
 * </p>
 *
 * @author Gdc
 * @since 2022-09-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("historical_inventory_info")
public class HistoricalInventoryInfo extends BaseModel<HistoricalInventoryInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 公司id
     */
    private String compId;
    /**
     * 仓库id
     */
    private String baseId;
    /**
     * 仓库名称
     */
    private String warehouseName;
    /**
     * 累计储存量（吨）
     */
    private Double accumulatedStorage;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date startDate;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date endDate;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
