Correcting all type and relations in all entities
This commit is contained in:
@@ -5,8 +5,10 @@ namespace PyroFetes.Models;
|
|||||||
public class Availability
|
public class Availability
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
[Required] public string? AvailabilityDate { get; set; }
|
[Required] public DateOnly AvailabilityDate { get; set; }
|
||||||
[Required] public DateOnly DeliveryDate { get; set; }
|
[Required] public DateOnly DeliveryDate { get; set; }
|
||||||
[Required] public DateOnly ExpirationDate { get; set; }
|
[Required] public DateOnly ExpirationDate { get; set; }
|
||||||
[Required] public DateOnly RenewallDate { get; set; }
|
[Required] public DateOnly RenewallDate { get; set; }
|
||||||
|
|
||||||
|
public List<StaffAvailability>? StaffAvailabilities { get; set; }
|
||||||
}
|
}
|
@@ -18,4 +18,5 @@ public class Contact
|
|||||||
[Required] public int CustomerId { get; set; }
|
[Required] public int CustomerId { get; set; }
|
||||||
|
|
||||||
public List<Communication>? Communications { get; set; }
|
public List<Communication>? Communications { get; set; }
|
||||||
|
public List<StaffContact>? StaffContacts { get; set; }
|
||||||
}
|
}
|
@@ -5,7 +5,7 @@ namespace PyroFetes.Models;
|
|||||||
public class CustomerType
|
public class CustomerType
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
[Required] public decimal Price { get; set; }
|
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||||
|
|
||||||
public List<Customer>? Customers { get; set; }
|
public List<Customer>? Customers { get; set; }
|
||||||
}
|
}
|
@@ -5,5 +5,8 @@ namespace PyroFetes.Models;
|
|||||||
public class ExperienceLevel
|
public class ExperienceLevel
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
[Required] public string? Label { get; set; }
|
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||||
|
|
||||||
|
public Staff? Staff { get; set; }
|
||||||
|
[Required] public int StaffId { get; set; }
|
||||||
}
|
}
|
@@ -5,6 +5,8 @@ namespace PyroFetes.Models;
|
|||||||
public class HistoryOfApproval
|
public class HistoryOfApproval
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
[Required] public DateOnly ExpirationDate { get; set; }
|
|
||||||
[Required] public DateOnly DeliveryDate { get; set; }
|
[Required] public DateOnly DeliveryDate { get; set; }
|
||||||
|
[Required] public DateOnly ExpirationDate { get; set; }
|
||||||
|
|
||||||
|
public List<StaffHistoryOfApproval>? StaffHistoryOfApprovals { get; set; }
|
||||||
}
|
}
|
@@ -5,5 +5,7 @@ namespace PyroFetes.Models;
|
|||||||
public class ProviderType
|
public class ProviderType
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
[Required] public string? Label { get; set; }
|
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||||
|
|
||||||
|
public List<ServiceProvider>? ServiceProviders { get; set; }
|
||||||
}
|
}
|
@@ -8,6 +8,6 @@ public class ServiceProvider
|
|||||||
[Required] public decimal Price { get; set; }
|
[Required] public decimal Price { get; set; }
|
||||||
|
|
||||||
//Relations
|
//Relations
|
||||||
public int ProviderTypeId { get; set; }
|
[Required] public int ProviderTypeId { get; set; }
|
||||||
public ProviderType? ProviderType { get; set; }
|
public ProviderType? ProviderType { get; set; }
|
||||||
}
|
}
|
@@ -13,4 +13,8 @@ public class Staff
|
|||||||
[Required] public DateOnly F4T2ExpirationDate { get; set; }
|
[Required] public DateOnly F4T2ExpirationDate { get; set; }
|
||||||
|
|
||||||
public List<ShowStaff>? ShowStaffs { get; set; }
|
public List<ShowStaff>? ShowStaffs { get; set; }
|
||||||
|
public List<ExperienceLevel>? ExperienceLevels { get; set; }
|
||||||
|
public List<StaffAvailability>? StaffAvailabilities { get; set; }
|
||||||
|
public List<StaffHistoryOfApproval>? StaffHistoryOfApprovals { get; set; }
|
||||||
|
public List<StaffContact>? StaffContacts { get; set; }
|
||||||
}
|
}
|
@@ -1,3 +1,4 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace PyroFetes.Models;
|
namespace PyroFetes.Models;
|
||||||
@@ -5,8 +6,8 @@ namespace PyroFetes.Models;
|
|||||||
[PrimaryKey(nameof(ContactId), nameof(StaffId))]
|
[PrimaryKey(nameof(ContactId), nameof(StaffId))]
|
||||||
public class StaffContact
|
public class StaffContact
|
||||||
{
|
{
|
||||||
public int StaffId { get; set; }
|
[Required] public int StaffId { get; set; }
|
||||||
public Staff? Staff { get; set; }
|
public Staff? Staff { get; set; }
|
||||||
public int ContactId { get; set; }
|
[Required] public int ContactId { get; set; }
|
||||||
public Contact? Contact { get; set; }
|
public Contact? Contact { get; set; }
|
||||||
}
|
}
|
Reference in New Issue
Block a user