package com.fs.survey.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.fs.live.dto.TaskLiveDto;
import com.fs.survey.dto.PeriodDataDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 问卷任务主对象 survey_task
 *
 * @author fs
 * @date 2026-02-06
 */
@Data
public class SurveyTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;
    @Excel(name = "公司名称")
    private String companyName;
    /** 任务标题 */
    @Excel(name = "任务标题")
    private String title;

    /** 任务说明 */
    @Excel(name = "任务说明")
    private String description;

    /** 封面图URL */
    @Excel(name = "封面图URL")
    private String coverImage;

    /** 关联公共表单系统的表单ID */
    @Excel(name = "关联公共表单系统的表单ID")
    private Long formId;

    /** 分类（字典值） */
    @Excel(name = "分类", readConverterExp = "字=典值")
    private String category;

    /** 所属年份（如：2025） */
    @Excel(name = "所属年份", readConverterExp = "如=：2025")
    private Long year;

    /** 总期数（1-3） */
    @Excel(name = "总期数", readConverterExp = "1=-3")
    private Long totalPeriods;

    /** 间隔天数 */
    @Excel(name = "间隔天数")
    private Long intervalDays;

    /** 状态：0-草稿 1-已发布 2-已下架 */
    @Excel(name = "状态：0-草稿 1-已发布 2-已下架")
    private Long status;

    /** 排序（越大越靠前） */
    @Excel(name = "排序", readConverterExp = "越=大越靠前")
    private Long sort;

    /** 浏览次数 */
    @Excel(name = "浏览次数")
    private Long viewCount;

    /** 逻辑删除：0-否 1-是 */
    @Excel(name = "逻辑删除：0-否 1-是")
    private Long deleted;

    private   Long companyId;
    private Long doctorId;
    @TableField(exist = false)
    private String doctorName;



    @TableField(exist = false)
    @ApiModelProperty(value = "timeStatus == 'before'未开始，timeStatus == 'during'进行中，after已结束")
    private String timeStatus;
    @TableField(exist = false)
    private String periodStartTime;
    @TableField(exist = false)
    private String periodEndTime;

    @TableField(exist = false)
    @Excel(name = "问卷名称")
    private String questionnaireName;

    //问卷分类
    @TableField(exist = false)
    private String surveyQuestionnaireType;

    @TableField(exist = false)
    private SurveyQuestionnaireVersion surveyQuestionnaireVersion;

    @TableField(exist = false)
    private PeriodDataDto periodDataDto;
    @TableField(exist = false)
    private Long periodNum;
    @TableField(exist = false)
    private TaskLiveDto taskLiveDto;
    @TableField(exist = false)
    private Long userId;

}
