diff --git a/PyroFetes/Models/Availability.cs b/PyroFetes/Models/Availability.cs index a727c3a..5d85e0d 100644 --- a/PyroFetes/Models/Availability.cs +++ b/PyroFetes/Models/Availability.cs @@ -5,8 +5,8 @@ namespace PyroFetes.Models; public class Availability { [Key] public int Id { get; set; } - [Required] public string AvailabilityDate { get; set; } - [Required] public string DeliveryDate { get; set; } - [Required] public string ExpirationDate { get; set; } - [Required] public string RenewallDate { get; set; } + [Required] public string? AvailabilityDate { get; set; } + [Required] public DateOnly DeliveryDate { get; set; } + [Required] public DateOnly ExpirationDate { get; set; } + [Required] public DateOnly RenewallDate { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/Communication.cs b/PyroFetes/Models/Communication.cs index 7c3e284..6faa91a 100644 --- a/PyroFetes/Models/Communication.cs +++ b/PyroFetes/Models/Communication.cs @@ -5,9 +5,9 @@ namespace PyroFetes.Models; public class Communication { [Key] public int Id { get; set; } - [Required] public string Calling { get; set; } - [Required] public string Email { get; set; } - [Required] public string Meeting { get; set; } + [Required] public string? Calling { get; set; } + [Required] public string? Email { get; set; } + [Required] public string? Meeting { get; set; } //REL } \ No newline at end of file diff --git a/PyroFetes/Models/Contact.cs b/PyroFetes/Models/Contact.cs index 87385bc..8b6a6cf 100644 --- a/PyroFetes/Models/Contact.cs +++ b/PyroFetes/Models/Contact.cs @@ -5,14 +5,16 @@ namespace PyroFetes.Models; public class Contact { [Key] public int Id { get; set; } - [Required] public string LastName { get; set; } - [Required] public string FirstName { get; set; } - [Required] public string Email { get; set; } - [Required] public string PhoneNumber { get; set; } - [Required] public string Address { get; set; } - [Required] public string Role { get; set; } + [Required, MaxLength(100)] public string? LastName { get; set; } + [Required, MaxLength(100)] public string? FirstName { get; set; } + [Required] public string? Email { get; set; } + [Required] public string? PhoneNumber { get; set; } + [Required] public string? Address { get; set; } + [Required] public string? ZipCode { get; set; } + [Required] public string? City { get; set; } + [Required] public string? Role { get; set; } //RELATIONS DE CON LA - public int CommunicationID { get; set; } + public int CommunicationId { get; set; } public Communication? Communication { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/Customer.cs b/PyroFetes/Models/Customer.cs index 3e7139a..31f0203 100644 --- a/PyroFetes/Models/Customer.cs +++ b/PyroFetes/Models/Customer.cs @@ -6,6 +6,7 @@ public class Customer { [Key] public int Id { get; set; } [Required] public string? Note { get; set; } + //Les relations public int CustomerTypeId { get; set; } public CustomerType? CustomerType { get; set; } diff --git a/PyroFetes/Models/CustomerType.cs b/PyroFetes/Models/CustomerType.cs index 28fc14d..3e24483 100644 --- a/PyroFetes/Models/CustomerType.cs +++ b/PyroFetes/Models/CustomerType.cs @@ -5,7 +5,7 @@ namespace PyroFetes.Models; public class CustomerType { [Key] public int Id { get; set; } - [Required] public string? Price { get; set; } - //RELATIONS PTN + [Required] public decimal Price { get; set; } + public List? Customers { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/ExperienceLevel.cs b/PyroFetes/Models/ExperienceLevel.cs index 8a2bb93..41a1879 100644 --- a/PyroFetes/Models/ExperienceLevel.cs +++ b/PyroFetes/Models/ExperienceLevel.cs @@ -5,5 +5,5 @@ namespace PyroFetes.Models; public class ExperienceLevel { [Key] public int Id { get; set; } - [Required] public string Label { get; set; } + [Required] public string? Label { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/HistoryOfApproval.cs b/PyroFetes/Models/HistoryOfApproval.cs index 4e05886..8c85ef8 100644 --- a/PyroFetes/Models/HistoryOfApproval.cs +++ b/PyroFetes/Models/HistoryOfApproval.cs @@ -5,6 +5,6 @@ namespace PyroFetes.Models; public class HistoryOfApproval { [Key] public int Id { get; set; } - [Required] public string ExpirationDate { get; set; } - [Required] public string DeliveryDate { get; set; } + [Required] public DateOnly ExpirationDate { get; set; } + [Required] public DateOnly DeliveryDate { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/Provider.cs b/PyroFetes/Models/Provider.cs index fdfc566..f48e2c3 100644 --- a/PyroFetes/Models/Provider.cs +++ b/PyroFetes/Models/Provider.cs @@ -9,6 +9,6 @@ public class Provider //Relations - public int ProviderID { get; set; } + public int ProviderId { get; set; } public ProviderType? ProviderType { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/ProviderType.cs b/PyroFetes/Models/ProviderType.cs index ac620c9..4c8f70c 100644 --- a/PyroFetes/Models/ProviderType.cs +++ b/PyroFetes/Models/ProviderType.cs @@ -5,5 +5,5 @@ namespace PyroFetes.Models; public class ProviderType { [Key] public int Id { get; set; } - [Required] public string Label { get; set; } + [Required] public string? Label { get; set; } } \ No newline at end of file diff --git a/PyroFetes/Models/Staff.cs b/PyroFetes/Models/Staff.cs index fef94d9..c405e21 100644 --- a/PyroFetes/Models/Staff.cs +++ b/PyroFetes/Models/Staff.cs @@ -1,10 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace PyroFetes.Models; public class Staff { [Key] public int Id { get; set; } - [Required] public string F4T2NumberApproval { get; set; } - [Required] public string F4T2ExpirationDate { get; set; } + [Required] public string? F4T2NumberApproval { get; set; } + [Required] public string? F4T2ExpirationDate { get; set; } } \ No newline at end of file