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)
    private String projectName;
    /**
     * 项目联系人
     */
    @Condition(name = "project_concat")
    private String projectConcat;
    /**
     * 联系人手机号
     */
    @Condition(name = "project_phone", type = Condition.ConditionType.like)
    private String projectPhone;
    /**
     * 所属部门
     */
    @Condition(name = "dept_id")
    private Long deptId;
    /**
     * 创建时间
     */
    @Condition(name = "create_time", type = Condition.ConditionType.between)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
    private List<LocalDateTime> createTimes;
    /**
     * 项目状态
     */
    @Condition(name = "project_effect")
    private Integer projectEffect;
}
