package com.bcxin.tenant.open.domains.criterias;

import com.bcxin.tenant.open.infrastructures.criterias.CriteriaAbstract;
import com.bcxin.tenant.open.infrastructures.enums.PoliceEventLevel;
import com.bcxin.tenant.open.infrastructures.enums.PoliceEventStatus;
import lombok.Getter;

import java.sql.Timestamp;
import java.util.Collection;

@Getter
public class PoliceIncidentsCriteria extends CriteriaAbstract {
    private final String name;
    private final String tenantEmployeeId;
    private final Collection<String> superviseDepartIds;
    private final PoliceEventStatus status;
    private final String reason;
    private final Integer type;
    private final PoliceEventLevel level;
    private final String processedUserName;
    private final String empName;
    private final Timestamp processedStarTime;
    private final Timestamp processedEndTime;
    private final Timestamp createdStarTime;
    private final Timestamp createdEndTime;

    public PoliceIncidentsCriteria(int pageIndex, int pageSize, String tenantEmployeeId, Collection<String> superviseDepartIds,
                                   String name, PoliceEventStatus status, String reason,
                                   Integer type, PoliceEventLevel level,
                                   String processedUserName, String empName, Timestamp processedStarTime,
                                   Timestamp processedEndTime, Timestamp createdStarTime, Timestamp createdEndTime) {
        super(pageIndex,pageSize);
        this.tenantEmployeeId = tenantEmployeeId;
        this.superviseDepartIds = superviseDepartIds;
        this.name = name;
        this.status = status;
        this.reason = reason;
        this.type = type;
        this.level = level;
        this.processedUserName = processedUserName;
        this.empName = empName;
        this.processedStarTime = processedStarTime;
        this.processedEndTime = processedEndTime;
        this.createdStarTime = createdStarTime;
        this.createdEndTime = createdEndTime;
    }

    public static PoliceIncidentsCriteria create(int pageIndex, int pageSize,
                                                 String tenantEmployeeId, Collection<String> superviseDepartIds, String name,
                                                 PoliceEventStatus status, String reason, Integer type, PoliceEventLevel level,
                                                 String processedUserName,
                                                 String empName, Timestamp processedStarTime, Timestamp processedEndTime,
                                                 Timestamp createdStarTime,
                                                 Timestamp createdEndTime) {
        return new PoliceIncidentsCriteria(pageIndex, pageSize, tenantEmployeeId, superviseDepartIds,
                name, status, reason, type, level, processedUserName, empName, processedStarTime,
                processedEndTime, createdStarTime, createdEndTime);
    }
}
