package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.Objects;
import io.github.jhipster.service.filter.BooleanFilter;
import io.github.jhipster.service.filter.DoubleFilter;
import io.github.jhipster.service.filter.Filter;
import io.github.jhipster.service.filter.FloatFilter;
import io.github.jhipster.service.filter.IntegerFilter;
import io.github.jhipster.service.filter.LongFilter;
import io.github.jhipster.service.filter.StringFilter;
import io.github.jhipster.service.filter.InstantFilter;

/**
 * Criteria class for the TBDetailUser entity. This class is used in TBDetailUserResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-detail-users?id.greaterThan=5&amp;attr1.contains=something&amp;attr2.specified=false</code>
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 * fix type specific filters.
 */
public class TBDetailUserCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter fullName;

    private StringFilter phone;

    private InstantFilter birthday;

    private IntegerFilter gender;

    private LongFilter tbRoleId;

    private LongFilter tbCustomerId;

    private LongFilter tbAddressId;

    private LongFilter tbCropId;

    private StringFilter fcmToken;

    public LongFilter getId() {
        return id;
    }

    public void setId(LongFilter id) {
        this.id = id;
    }

    public StringFilter getFullName() {
        return fullName;
    }

    public void setFullName(StringFilter fullName) {
        this.fullName = fullName;
    }

    public StringFilter getPhone() {
        return phone;
    }

    public void setPhone(StringFilter phone) {
        this.phone = phone;
    }

    public InstantFilter getBirthday() {
        return birthday;
    }

    public void setBirthday(InstantFilter birthday) {
        this.birthday = birthday;
    }

    public IntegerFilter getGender() {
        return gender;
    }

    public void setGender(IntegerFilter gender) {
        this.gender = gender;
    }

    public LongFilter getTbRoleId() {
        return tbRoleId;
    }

    public void setTbRoleId(LongFilter tbRoleId) {
        this.tbRoleId = tbRoleId;
    }

    public LongFilter getTbCustomerId() {
        return tbCustomerId;
    }

    public void setTbCustomerId(LongFilter tbCustomerId) {
        this.tbCustomerId = tbCustomerId;
    }

    public LongFilter getTbAddressId() {
        return tbAddressId;
    }

    public void setTbAddressId(LongFilter tbAddressId) {
        this.tbAddressId = tbAddressId;
    }

    public LongFilter getTbCropId() {
        return tbCropId;
    }

    public void setTbCropId(LongFilter tbCropId) {
        this.tbCropId = tbCropId;
    }

    public StringFilter getFcmToken() {
        return fcmToken;
    }

    public void setFcmToken(StringFilter fcmToken) {
        this.fcmToken = fcmToken;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBDetailUserCriteria that = (TBDetailUserCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(fullName, that.fullName) &&
            Objects.equals(phone, that.phone) &&
            Objects.equals(birthday, that.birthday) &&
            Objects.equals(gender, that.gender) &&
            Objects.equals(tbRoleId, that.tbRoleId) &&
            Objects.equals(tbCustomerId, that.tbCustomerId) &&
            Objects.equals(tbAddressId, that.tbAddressId) &&
            Objects.equals(fcmToken, that.fcmToken) &&
            Objects.equals(tbCropId, that.tbCropId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        fullName,
        phone,
        birthday,
        gender,
        tbRoleId,
        tbCustomerId,
        tbAddressId,
        fcmToken,
        tbCropId
        );
    }

    @Override
    public String toString() {
        return "TBDetailUserCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (fullName != null ? "fullName=" + fullName + ", " : "") +
                (phone != null ? "phone=" + phone + ", " : "") +
                (birthday != null ? "birthday=" + birthday + ", " : "") +
                (gender != null ? "gender=" + gender + ", " : "") +
                (tbRoleId != null ? "tbRoleId=" + tbRoleId + ", " : "") +
                (tbCustomerId != null ? "tbCustomerId=" + tbCustomerId + ", " : "") +
                (tbAddressId != null ? "tbAddressId=" + tbAddressId + ", " : "") +
                (fcmToken != null ? "fcmToken=" + fcmToken + ", " : "") +
                (tbCropId != null ? "tbCropId=" + tbCropId + ", " : "") +
            "}";
    }

}
