package com.chushang.inspection.project.query;

import cn.hutool.core.date.DatePattern;
import com.chushang.common.mybatis.annotation.Condition;
import com.chushang.common.mybatis.page.CommonParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class ProjectQuery extends CommonParam {

    /**
     * 项目名称
     */
    @Condition(name = "project_name", type = Condition.ConditionType.like,tableName = "wrk_info")
    private String projectName;
    /**
     * 项目联系人
     */
    private String projectConcat;
    /**
     * 联系人手机号
     */
    private String projectPhone;
    /**
     * 所属部门
     */
    @Condition(name = "dept_id",type = Condition.ConditionType.eq,tableName = "wrk_info")
    private Long deptId;

    @Condition(name = "user_id", type = Condition.ConditionType.in,tableName = "wrk_info")
    private List<Long> userIds ;
    /**
     * 创建时间
     */
    @Condition(name = "create_time", type = Condition.ConditionType.between,tableName = "wrk_info")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
    private List<LocalDateTime> createTimes;
    /**
     * 项目状态
     */
    @Condition(name = "project_effect", type = Condition.ConditionType.eq,tableName = "wrk_info")
    private Integer projectEffect;

    @Condition(name = "dispose_time", type = Condition.ConditionType.between,tableName = "wrk_info")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
    private List<LocalDateTime>  disposeTimes;

    private List<String> disposeTime;
}
