/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.stocks.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.stream.Collectors;


/**
 * 设备折旧表
 *
 * @author admin
 * @date Mon Dec 12 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_STOCKS_DEVICE_DEPRECIATE", resultMap = "deviceDepreciateMap")
@KeySequence("TF_STOCKS_DEVICE_DEPRECIATE")
@ApiModel
public class DeviceDepreciate extends Model<DeviceDepreciate> {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 入库详单id
     */
    @ApiModelProperty(value = "入库详单id")
    @NotNull(message = "设备入库详情Id不能为空")
    private Long instockDetailId;
    /**
     * 折旧方式
     */
    @ApiModelProperty(value = "折旧方式")
    @NotNull(message ="折旧方式不能为空")
    private String depreciateType;
    /**
     * 折旧数值
     */
    @ApiModelProperty(value = "折旧数值")
    @NotNull(message ="折旧数值不能为空")
    private String depreciateValue;
    /**
     * 入库相差月份
     */
    @ApiModelProperty(value = "入库相差月份")
    private Integer inStockMonth;
    /**
     * 当前价值
     */
    @ApiModelProperty(value = "当前价值")
    private Double currentPrice;
    /**
     * 折旧价值
     */
    @ApiModelProperty(value = "折旧价值")
    private Double depreciatePrice;
    /**
     * 折旧备注
     */
    @ApiModelProperty(value = "折旧备注")
    private String depreciateRemark;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String updateUserName;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
