package cn.ezhizao.project.business.workOrder.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 工单完成记录对象 biz_work_order_record
 *
 * @author ruoyi
 * @date 2023-11-10
 */
@Data
@TableName(value = "biz_work_order_record")
public class BizWorkOrderRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 年 */
    @Excel(name = "年")
    @ApiModelProperty(value = "年")
    private String year;

    /** 月 */
    @Excel(name = "月")
    @ApiModelProperty(value = "月")
    private String month;

    /** 工单外键 */
    @ApiModelProperty(value = "工单外键")
    private Long workOrderId;

    /** 完成状态 */
    @Excel(name = "完成状态")
    @ApiModelProperty(value = "完成状态")
    private Integer status;

    /** 状态描述 */
    @Excel(name = "状态描述")
    @ApiModelProperty(value = "状态描述")
    private String statusDescript;

    /** 租户id */
    @ApiModelProperty(value = "状态描述")
    private Long tenantId;

    /** 客户id */
    @ApiModelProperty(value = "客户外键")
    private Long companyId;

    @ApiModelProperty(value = "记录人/完成人")
    private Long recorderId;
    @ApiModelProperty(value = "办理人")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long  handlerId;
    @ApiModelProperty(value = "根节点外键")
    private Long fromId;

    @ApiModelProperty("消耗")
    private BigDecimal cost;

    @TableField(exist = false)
    private List<Long> workOrderIds;

    /** 办理人时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @TableField(updateStrategy = FieldStrategy.IGNORED)

    private Date handlerTime;

    @TableField(exist = false)
    private String handlerName;
    @TableField(exist = false)
    private String recorderName;
    /** 委托时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date entrustTime;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date finishTime;
}
