package com.oguerreiro.resilient.service.dto;

import com.oguerreiro.resilient.domain.enumeration.UnitValueType;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

/**
 * A DTO for the {@link com.oguerreiro.resilient.domain.UnitType} entity.
 */
@Schema(description = "UnitType\nType of measure unit types. Convertions can only be done within Unit's of the same UnitType")
public class UnitTypeDTO extends AbstractResilientDTO<Long> {
  private static final long serialVersionUID = 1L;

  @NotNull
  private String name;

  @NotNull
  private String description;

  @NotNull
  private UnitValueType valueType;

  public String getName() {
    return name;
  }

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

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public UnitValueType getValueType() {
    return valueType;
  }

  public void setValueType(UnitValueType valueType) {
    this.valueType = valueType;
  }

  //@formatter:off
  @Override
  public String toString() {
    return "UnitTypeDTO{" +
              "id=" + getId() +
              ", name='" + getName() + "'" +
              ", description='" + getDescription() + "'" +
              ", valueType='" + getValueType() + "'" +
              ", version=" + getVersion() +
           "}";
  }
  //@formatter:off
}
