package com.ruoyi.buyerapi.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 设备工时分摊记录对象 buyer_device_workhour
 *
 * @author ruoyi
 * @date 2022-09-22
 */
@Data
public class BuyerDeviceWorkhour extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private String id;

    /** 备注 */
    private String remarks;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 立项管理id */
    private String projectId;

    /** 立项管理id */
    @Excel(name = "项目名称")
    private String projectName;

    /** 类型(0手动1表格导入) */
    @Excel(name = "类型")
    private String typeName;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String name;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String code;

    /** 所耗工时 */
    @Excel(name = "所耗工时")
    private BigDecimal cost;

    /** 年度 */
    @Excel(name = "年度")
    private Long year;

    /** 月度 */
    @Excel(name = "月度")
    private Long month;

    /** 类型(0手动填写1表格导入)*/
    private String type;

    /** 工作日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "工作日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date workDate;

    private String companyId;

    // 当个设备的消耗
    private BigDecimal oneCost;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remarks", getRemarks())
            .append("delFlag", getDelFlag())
            .append("projectId", getProjectId())
            .append("name", getName())
            .append("code", getCode())
            .append("cost", getCost())
            .append("year", getYear())
            .append("month", getMonth())
            .append("workDate", getWorkDate())
            .toString();
    }
}
