package com.ruoyi.web.modules.industryservice;

import java.util.Calendar;
import java.util.GregorianCalendar;
import com.ruoyi.web.modules.industryservice.domain.dto.BreedingIndustryYakSnapshot;
import com.ruoyi.web.modules.industryservice.support.BreedingIndustryRules;

/**
 * 养殖产业看板测试样本。
 */
public final class BreedingIndustryTestSamples
{
    public static final Long PASTURE_P1 = 101L;

    public static final Long PASTURE_P2 = 202L;

    private BreedingIndustryTestSamples()
    {
    }

    public static BreedingIndustryYakSnapshot normalBull()
    {
        BreedingIndustryYakSnapshot row = new BreedingIndustryYakSnapshot();
        row.setPastureId(PASTURE_P1);
        row.setAssetStatus(BreedingIndustryRules.ASSET_STATUS_NORMAL);
        row.setGender(BreedingIndustryRules.GENDER_BULL);
        row.setAgeMonths(24);
        return row;
    }

    public static BreedingIndustryYakSnapshot normalCow()
    {
        BreedingIndustryYakSnapshot row = new BreedingIndustryYakSnapshot();
        row.setPastureId(PASTURE_P1);
        row.setAssetStatus(BreedingIndustryRules.ASSET_STATUS_NORMAL);
        row.setGender(BreedingIndustryRules.GENDER_COW);
        row.setAgeMonths(12);
        return row;
    }

    public static BreedingIndustryYakSnapshot unknownGender()
    {
        BreedingIndustryYakSnapshot row = normalBull();
        row.setGender(null);
        return row;
    }

    /** 3 月出栏，2 月末趋势仍应计入 */
    public static BreedingIndustryYakSnapshot historicalOutbound()
    {
        BreedingIndustryYakSnapshot row = new BreedingIndustryYakSnapshot();
        row.setPastureId(PASTURE_P1);
        row.setAssetStatus(BreedingIndustryRules.ASSET_STATUS_OUTBOUND);
        row.setStatusChangeDate(new GregorianCalendar(2026, Calendar.MARCH, 15).getTime());
        return row;
    }

    /** 2 月最后一天出栏，2 月末不计 */
    public static BreedingIndustryYakSnapshot outboundOnFebEnd()
    {
        BreedingIndustryYakSnapshot row = new BreedingIndustryYakSnapshot();
        row.setPastureId(PASTURE_P1);
        row.setAssetStatus(BreedingIndustryRules.ASSET_STATUS_OUTBOUND);
        row.setStatusChangeDate(new GregorianCalendar(2026, Calendar.FEBRUARY, 28).getTime());
        return row;
    }

    public static BreedingIndustryYakSnapshot deadWithoutChangeDate()
    {
        BreedingIndustryYakSnapshot row = new BreedingIndustryYakSnapshot();
        row.setPastureId(PASTURE_P1);
        row.setAssetStatus(BreedingIndustryRules.ASSET_STATUS_DEAD);
        row.setStatusChangeDate(null);
        return row;
    }
}
