models + fix DTO
This commit is contained in:
24
PF3/Models/Truck.cs
Normal file
24
PF3/Models/Truck.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PF3.Models;
|
||||
|
||||
public class Truck
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
|
||||
[Required, MaxLength(40)]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
[Range(0, double.MaxValue)]
|
||||
public double? MaxExplosiveCapacity { get; set; }
|
||||
|
||||
[Required, MaxLength(80)]
|
||||
public string? Sizes { get; set; }
|
||||
|
||||
[Required, MaxLength(40)]
|
||||
public string? Statut { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ShowId { get; set; }
|
||||
public Show? Show { get; set; }
|
||||
}
|
Reference in New Issue
Block a user