package cn.ezhizao.project.business.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
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 lombok.EqualsAndHashCode;

import java.util.Date;


/**
 * 载具青岛那对象 biz_equipment_detail
 *
 * @author ezhizao
 * @date 2023-11-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "biz_carrier")
public class BizCarrier extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 载具类别id
     */
    @ApiModelProperty(value = "${comment}")
    private Long categoryId;

    /**
     * 租户（厂别）id
     */
    @ApiModelProperty(value = "${comment}")
    private Long tenantId;
    /**
     * 载具编码
     */
    @Excel(name = "载具编码")
    @ApiModelProperty(value = "载具编码")
    private String code;

    /**
     * 载具状态（0：正常，1：废弃）
     */
    @ApiModelProperty(value = "载具状态（0：正常，1：废弃）")
    private Integer isAbandoned;

    /**
     * 报废日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报废日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "报废日期")
    // mybitis-plus 会忽略将 null 值写入数据库，所以这里需要设置忽略策略
    // @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date abandonmentDate;

    /**
     * 废弃原因
     */
    @Excel(name = "废弃原因")
    @ApiModelProperty(value = "废弃原因")
    private String abandonmentReason;

    /**
     * 备注
     */
    @Excel(name = "备注", readConverterExp = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "二维码存放地址")
    private String qcCode;

    // 是否允许多批
    private Integer isAllowMore;
    @TableField(exist = false)
    private Integer notInUse;

    @TableField(exist = false)
    private Long dayworkId;
}
