package premium_store.controller.DTO;

import com.fasterxml.jackson.annotation.JsonProperty;
import premium_store.model.Tank;

public class TankDTO {
    private long id;
    private String name;
    private SimpleNationDTO nation;
    private LevelDTO level;
    private int cost;

    public TankDTO(){}

    public TankDTO(Tank tank){
        this.id = tank.getId();
        this.nation = new SimpleNationDTO(tank.getNation());
        this.level = new LevelDTO(tank.getLevel());
        this.name = tank.getName();
        this.cost = tank.getCost();
    }

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    public long getId(){
        return id;
    }

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

    public String getName(){
        return name;
    }

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

    public SimpleNationDTO getNation(){
        return nation;
    }

    public void setNation(SimpleNationDTO nation) {
        this.nation = nation;
    }

    public LevelDTO getLevel(){
        return level;
    }

    public void setLevel(LevelDTO level) {
        this.level = level;
    }

    public int getCost(){
        return cost;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }
}
