package com.ruoyi.web.modules.innovation;

import java.util.Calendar;
import java.util.Date;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.web.modules.innovation.domain.BizTechProjectGuide;

/**
 * 科技项目指南测试样例。
 */
public final class TechProjectGuideTestSamples
{
    private TechProjectGuideTestSamples()
    {
    }

    public static BizTechProjectGuide sampleDraft()
    {
        BizTechProjectGuide row = new BizTechProjectGuide();
        row.setProjectName("示范科技项目");
        row.setProjectType("002002");
        row.setProjectIntro("农业科技创新示范项目简介");
        row.setApplicationTarget("县域农牧企业");
        row.setApplicationStartDate(date(2026, Calendar.JUNE, 1));
        row.setApplicationEndDate(date(2026, Calendar.DECEMBER, 31));
        row.setProjectPeriod("12个月");
        row.setApplicationConditions("符合申报条件的企业");
        row.setApplicationProcess("提交材料→初审→公示");
        row.setPersonInCharge("张三");
        row.setContactPhone("13800138000");
        return row;
    }

    public static BizTechProjectGuide sampleWithAttachment()
    {
        BizTechProjectGuide row = sampleDraft();
        row.setAttachmentFileUrl("http://file/guide.pdf");
        row.setAttachmentFilePath(Constants.RESOURCE_PREFIX + "/upload/guide.pdf");
        row.setAttachmentFileName("guide.pdf");
        row.setCoverFileUrl("http://img/cover.jpg");
        row.setCoverFilePath(Constants.RESOURCE_PREFIX + "/upload/cover.jpg");
        return row;
    }

    public static Date date(int year, int month, int day)
    {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month, day, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
}
