forked from sanchezvem/PyroFetes
Correcting all errors of types, writed, and entities.
This commit is contained in:
@@ -19,4 +19,5 @@ public class Contact
|
||||
|
||||
public List<Communication>? Communications { get; set; }
|
||||
public List<StaffContact>? StaffContacts { get; set; }
|
||||
public List<ContactServiceProvider>? ContactServiceProviders { get; set; }
|
||||
}
|
14
PyroFetes/Models/ContactServiceProvider.cs
Normal file
14
PyroFetes/Models/ContactServiceProvider.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(ServiceProviderId))]
|
||||
public class ContactServiceProvider
|
||||
{
|
||||
[Required] public int ContactId { get; set; }
|
||||
[Required] public int ServiceProviderId { get; set; }
|
||||
|
||||
public Product? Contact { get; set; }
|
||||
public DeliveryNote? ServiceProvider { get; set; }
|
||||
}
|
15
PyroFetes/Models/Contract.cs
Normal file
15
PyroFetes/Models/Contract.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ShowId), nameof(ServiceProviderId))]
|
||||
public class Contract
|
||||
{
|
||||
[Required] public int ShowId { get; set; }
|
||||
[Required] public int ServiceProviderId { get; set; }
|
||||
[Required] public string? TermsAndConditions { get; set; }
|
||||
|
||||
public Show? Show { get; set; }
|
||||
public ServiceProvider? ServiceProvider { get; set; }
|
||||
}
|
@@ -12,4 +12,5 @@ public class Customer
|
||||
public CustomerType? CustomerType { get; set; }
|
||||
|
||||
public List<Contact>? Contacts { get; set; }
|
||||
public List<Quotation>? Quotations { get; set; }
|
||||
}
|
||||
|
@@ -9,5 +9,8 @@ public class Material
|
||||
[Required] public int Quantity {get; set;}
|
||||
|
||||
[Required] public int WarehouseId {get; set;}
|
||||
[Required] public Warehouse? Warehouse {get; set;}
|
||||
public Warehouse? Warehouse {get; set;}
|
||||
|
||||
public List<ShowMaterial>? ShowMaterials {get; set;}
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
}
|
12
PyroFetes/Models/MaterialWarehouse.cs
Normal file
12
PyroFetes/Models/MaterialWarehouse.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class MaterialWarehouse
|
||||
{
|
||||
[Required] public int MaterialId { get; set; }
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
|
||||
public Material? Material { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
}
|
@@ -36,6 +36,7 @@ namespace PyroFetes.Models
|
||||
public List<Price>? Prices { get; set; }
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
17
PyroFetes/Models/ProductTimecode.cs
Normal file
17
PyroFetes/Models/ProductTimecode.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(ShowId))]
|
||||
public class ProductTimecode
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
|
||||
[Required] public decimal Start { get; set; }
|
||||
[Required] public decimal End { get; set; }
|
||||
}
|
@@ -8,5 +8,8 @@ public class Quotation
|
||||
[Required, MaxLength(200)] public string? Message { get; set; }
|
||||
[Required, MaxLength(300)] public string? ConditionsSale { get; set; }
|
||||
|
||||
[Required] public int CustomerId { get; set; }
|
||||
public Customer? Customer { get; set; }
|
||||
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
}
|
@@ -10,4 +10,7 @@ public class ServiceProvider
|
||||
//Relations
|
||||
[Required] public int ProviderTypeId { get; set; }
|
||||
public ProviderType? ProviderType { get; set; }
|
||||
|
||||
public List<Contract>? Contracts { get; set; }
|
||||
public List<ContactServiceProvider>? ContactServiceProviders { get; set; }
|
||||
}
|
@@ -19,4 +19,7 @@ public class Show
|
||||
public List<ShowStaff>? ShowStaffs { get; set; }
|
||||
public List<ShowTruck>? ShowTrucks { get; set; }
|
||||
public List<SoundTimecode>? SoundTimecodes { get; set; }
|
||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||
public List<Contract>? Contracts { get; set; }
|
||||
public List<ShowMaterial>? ShowMaterials { get; set; }
|
||||
}
|
15
PyroFetes/Models/ShowMaterial.cs
Normal file
15
PyroFetes/Models/ShowMaterial.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ShowId), nameof(MaterialId))]
|
||||
public class ShowMaterial
|
||||
{
|
||||
[Required] public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
|
||||
public Material? Material { get; set; }
|
||||
[Required] public int MaterialId { get; set; }
|
||||
|
||||
}
|
@@ -15,8 +15,7 @@ public class Warehouse
|
||||
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
|
||||
|
||||
public List<Material>? Materials {get; set;}
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
public List<Movement>? MovementsSource { get; set; }
|
||||
public List<Movement>? MovementsDestination { get; set; }
|
||||
}
|
Reference in New Issue
Block a user