using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AutoServiceWinForms.Models
{
public class Vehicle
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(17)]
public string Vin { get; set; } = string.Empty;
[Required]
[MaxLength(15)]
public string LicensePlate { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Brand { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Model { get; set; } = string.Empty;
public int? Year { get; set; }
public int? Mileage { get; set; }
[ForeignKey("Client")]
public int ClientId { get; set; }
public Client? Client { get; set; }
}
}