Merge branch 'feature/subject4' into develop
This commit is contained in:
12
PyroFetes/Models/Availability.cs
Normal file
12
PyroFetes/Models/Availability.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Availability
|
||||
{
|
||||
[Key] public int Id { 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; }
|
||||
}
|
13
PyroFetes/Models/Communication.cs
Normal file
13
PyroFetes/Models/Communication.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
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; }
|
||||
|
||||
//REL
|
||||
}
|
20
PyroFetes/Models/Contact.cs
Normal file
20
PyroFetes/Models/Contact.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Contact
|
||||
{
|
||||
[Key] public int Id { 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 Communication? Communication { get; set; }
|
||||
}
|
16
PyroFetes/Models/Customer.cs
Normal file
16
PyroFetes/Models/Customer.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
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; }
|
||||
|
||||
public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
13
PyroFetes/Models/CustomerContact.cs
Normal file
13
PyroFetes/Models/CustomerContact.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(CustomerId))]
|
||||
public class CustomerContact
|
||||
{
|
||||
public int CustomerId { get; set; }
|
||||
public Customer? Customer { get; set; }
|
||||
public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
11
PyroFetes/Models/CustomerType.cs
Normal file
11
PyroFetes/Models/CustomerType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class CustomerType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public decimal Price { get; set; }
|
||||
|
||||
public List<Customer>? Customers { get; set; }
|
||||
}
|
9
PyroFetes/Models/ExperienceLevel.cs
Normal file
9
PyroFetes/Models/ExperienceLevel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ExperienceLevel
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public string? Label { get; set; }
|
||||
}
|
10
PyroFetes/Models/HistoryOfApproval.cs
Normal file
10
PyroFetes/Models/HistoryOfApproval.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class HistoryOfApproval
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
}
|
14
PyroFetes/Models/Provider.cs
Normal file
14
PyroFetes/Models/Provider.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Provider
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public decimal Price { get; set; }
|
||||
|
||||
//Relations
|
||||
|
||||
public int ProviderId { get; set; }
|
||||
public ProviderType? ProviderType { get; set; }
|
||||
}
|
12
PyroFetes/Models/ProviderContact.cs
Normal file
12
PyroFetes/Models/ProviderContact.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(ProviderId))]
|
||||
public class ProviderContact
|
||||
{
|
||||
public int ProviderId { get; set; }
|
||||
public Provider? Provider { get; set; }
|
||||
public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
9
PyroFetes/Models/ProviderType.cs
Normal file
9
PyroFetes/Models/ProviderType.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ProviderType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public string? Label { get; set; }
|
||||
}
|
12
PyroFetes/Models/StaffAvailability.cs
Normal file
12
PyroFetes/Models/StaffAvailability.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(AvailabilityId), nameof(StaffId))]
|
||||
public class StaffAvailability
|
||||
{
|
||||
public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
public int AvailabilityId { get; set; }
|
||||
public Availability? Availability { get; set; }
|
||||
}
|
12
PyroFetes/Models/StaffContact.cs
Normal file
12
PyroFetes/Models/StaffContact.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(StaffId))]
|
||||
public class StaffContact
|
||||
{
|
||||
public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
12
PyroFetes/Models/StaffHistoryOfApproval.cs
Normal file
12
PyroFetes/Models/StaffHistoryOfApproval.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(HistoryOfApprovalId), nameof(StaffId))]
|
||||
public class StaffHistoryOfApproval
|
||||
{
|
||||
public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
public int HistoryOfApprovalId { get; set; }
|
||||
public HistoryOfApproval? HistoryOfApproval { get; set; }
|
||||
}
|
Reference in New Issue
Block a user