package com.arrebol.taxiservicios.model.admin;

import com.arrebol.taxiservicios.model.catalog.ClaveProductoServicio;
import com.arrebol.taxiservicios.model.catalog.ClaveUnidad;
import com.arrebol.taxiservicios.model.catalog.Location;
import com.arrebol.taxiservicios.model.core.User;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

/**
 *
 * @author Picasso
 */
public class Service implements Serializable {

    private static final long serialVersionUID = 3947758256696936831L;

    private String id;
    private String name;
    private Float charge;
    private int discountFix;
    private Boolean active;
    private User createdBy;
    private Date createdOn;
    private User lastUpdatedBy;
    private Date lastUpdatedOn;
    private Set personHasServices = new HashSet(0);
    private Set contractHasServices = new HashSet(0);
    private boolean disable;
    private Location location;
    private ClaveUnidad claveUnidad;
    private ClaveProductoServicio claveProductoServicio;

    public Service() {
    }

    public Service(String id) {
        this.id = id;
    }

    public Service(String id, String name, Float charge) {
        this.id = id;
        this.name = name;
        this.charge = charge;
    }
    
    public Service(String id, String name, Float charge, int discountFix) {
        this.id = id;
        this.name = name;
        this.charge = charge;
        this.discountFix = discountFix;
    }

    public int getDiscountFix() {
        return discountFix;
    }

    public void setDiscountFix(int discountFix) {
        this.discountFix = discountFix;
    }

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Float getCharge() {
        return charge;
    }

    public void setCharge(Float charge) {
        this.charge = charge;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public User getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }

    public User getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(User lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdatedOn() {
        return lastUpdatedOn;
    }

    public void setLastUpdatedOn(Date lastUpdatedOn) {
        this.lastUpdatedOn = lastUpdatedOn;
    }

    public Set getPersonHasServices() {
        return personHasServices;
    }

    public void setPersonHasServices(Set personHasServices) {
        this.personHasServices = personHasServices;
    }

    public Set getContractHasServices() {
        return contractHasServices;
    }

    public void setContractHasServices(Set contractHasServices) {
        this.contractHasServices = contractHasServices;
    }

    public boolean isDisable() {
        return disable;
    }

    public void setDisable(boolean disable) {
        this.disable = disable;
    }

    @Override
    public String toString() {
        return "Service{" + "id=" + id + ", name=" + name + ", charge=" + charge + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 31 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Service other = (Service) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public ClaveUnidad getClaveUnidad() {
        return claveUnidad;
    }

    public void setClaveUnidad(ClaveUnidad claveUnidad) {
        this.claveUnidad = claveUnidad;
    }

    public ClaveProductoServicio getClaveProductoServicio() {
        return claveProductoServicio;
    }

    public void setClaveProductoServicio(ClaveProductoServicio claveProductoServicio) {
        this.claveProductoServicio = claveProductoServicio;
    }

    
}
