package com.ruoyi.system.domain.house.vo;

import lombok.Data;

import java.util.List;

/**
 * 时间窗内的新增 / 修改 / 删除汇总。数据来源于 {@code data_change_record}。
 *
 * <h3>房源（HOUSE_RESOURCE）维度</h3>
 * <ul>
 *     <li>{@link #houseResourceInsert} / {@link #houseResourceUpdate} / {@link #houseResourceDelete}：
 *         按 {@code house_resource.type} 分组，固定补齐 type = 1/4/5/6/7 五档；</li>
 *     <li>{@code insert} / {@code update} 桶的每个档位会带上 {@code ids} 列表，
 *         前端可以直接把这组 id 传给 {@code /api/house/page} 的 {@code ids} 参数做 drilldown，
 *         计数和列表天然一致；</li>
 *     <li>{@code delete} 桶**只给 count 不给 ids**：drilldown 列表本身会过滤掉逻辑删除的
 *         房源，所以给 id 也没法展示，只保留数量用于汇总展示。</li>
 * </ul>
 *
 * <h3>经营主体（BUSINESS_ENTITY_INFO）维度</h3>
 * <ul>
 *     <li>{@link #businessEntityInsertCount} / {@link #businessEntityInsertIds}：
 *         新增经营主体的数量和 id 列表（可传给 drilldown）；</li>
 *     <li>{@link #businessEntityUpdateCount} / {@link #businessEntityUpdateIds}：同上；</li>
 *     <li>{@link #businessEntityDeleteCount}：只给 count，无 id。</li>
 * </ul>
 *
 * <h3>计数口径</h3>
 * <p>insert / update 桶会过滤 {@code delete_flag = 0}，保证和 pageHouseResources 的 drilldown
 * 列表能一一对上；delete 桶不过滤 {@code delete_flag}，用于统计窗内发生过删除事件的数量。</p>
 */
@Data
public class HouseResourceDataCollection {

    private List<HouseResourceDataCollectionSimpleObject> houseResourceInsert;

    private List<HouseResourceDataCollectionSimpleObject> houseResourceUpdate;

    private List<HouseResourceDataCollectionSimpleObject> houseResourceDelete;

    private long businessEntityInsertCount;

    private List<String> businessEntityInsertIds;

    private long businessEntityUpdateCount;

    private List<String> businessEntityUpdateIds;

    private long businessEntityDeleteCount;
}
