package com.cf.imes.module.executor.dal.dataobject.heapsplit;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
import com.cf.imes.framework.mybatis.core.type.CompressObjectListTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * 分堆任务 heap_split_task_{N} DO
 *
 * @author Gqr
 * @since 2026/3/10 17:15
 */
@TableName(value = "heap_split_task", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HeapSplitTaskDO extends BaseDO {
    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 组织ID
     */
    @TableField(fill = FieldFill.INSERT)
    private Long organId;

    /**
     * 任务名称
     */
    private String name;

    /**
     * 已分堆板件数
     */
    private int splittedPlateNum;

    /**
     * 未分堆板件数
     */
    private int unsplitPlateNum;

    /**
     * 总板件数
     */
    private int totalPlateNum;

    /**
     * 已分堆配件数
     */
    private int splittedPartNum;

    /**
     * 未分堆配件数
     */
    private int unsplitPartNum;

    /**
     * 总配件数
     */
    private int totalPartNum;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 订单ID列表
     */
    @TableField(typeHandler = CompressObjectListTypeHandler.class)
    private List<Long> orderIds;
}
