package pl.dmcs.mati.domain;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

@Entity
@Table(name = "appcar")
public class AppCar {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    long id;
    @NotNull
    @Column(name = "brandName", nullable = false)
    @Size(min=2, max=30, message = "{error.size.firstName}")
    private String brandName;

    @NotNull
    @Size(min = 2, max = 30)
    private String modelName;
    @NotNull
    private String bodyType;
    @NotNull
    @Size(min = 4, max = 4)
    private String productionYear;
    @NotNull
    private String fuelType;
    @NotNull
    private String mileage;
    @NotNull
    @Size(min = 17, max = 17)
    private String vin;
    @NotNull
    private String price;
    private String power;
    private String carColor;
    private String picture;
    private String engineSize;


    public long getId() {
        return id;
    }

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

    public String getBrandName() {
        return brandName;
    }
    public void setBrandName(String brandName) { this.brandName = brandName; }

    public String getModelName() {
        return modelName;
    }
    public void setModelName(String modelName) { this.modelName = modelName;}

    public String getBodyType() {
        return bodyType;
    }
    public void setBodyType(String bodyType) { this.bodyType = bodyType; }

    public String getProductionYear() {
        return productionYear;
    }
    public void setProductionYear(String productionYear) { this.productionYear = productionYear; }

    public String getCarColor() {
        return carColor;
    }
    public void setCarColor(String carColor) { this.carColor = carColor; }

    public String getFuelType() {
        return fuelType;
    }
    public void setFuelType(String fuelType) { this.fuelType = fuelType; }

    public String getEngineSize() {
        return engineSize;
    }
    public void setEngineSize(String engineSize) { this.engineSize = engineSize; }

    public String getMileage() {
        return mileage;
    }
    public void setMileage(String mileage) { this.mileage = mileage; }

    public String getPower() {
        return power;
    }
    public void setPower(String power) { this.power = power; }

    public String getVin() {
        return vin;
    }
    public void setVin(String vin) { this.vin = vin; }

    public String getPrice() { return price; }

    public void setPrice(String price) { this.price = price; }

    public String getPicture() { return picture; }

    public void setPicture(String picture) { this.picture = picture; }

}





