package com.mvrent.carrental.web;

import com.mvrent.carrental.model.MaintenanceStatus;
import com.mvrent.carrental.model.MaintenanceType;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;

public record MaintenanceForm(
        Long id,
        Long carId,
        MaintenanceType type,
        MaintenanceStatus status,
        @JsonFormat(pattern = "yyyy-MM-dd")
        @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate serviceDate,
        Integer odometer,
        BigDecimal cost,
        String garage,
        String notes,
        @JsonFormat(pattern = "yyyy-MM-dd")
        @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate nextServiceDate,
        Integer nextServiceOdometer
) {}
