From bcee39942638f50be6c633c7eb84827c82eaafc8 Mon Sep 17 00:00:00 2001 From: Loretta Date: Fri, 5 Sep 2025 13:07:49 +0200 Subject: [PATCH] Implement FruitBank entities, interfaces; --- FruitBank.Common/Entities/IPartner.cs | 15 +++++++++++++++ FruitBank.Common/Entities/IShipping.cs | 11 +++++++++++ FruitBank.Common/Entities/IShippingItem.cs | 14 ++++++++++++++ FruitBank.Common/Entities/ISippingDocument.cs | 13 +++++++++++++ FruitBank.Common/Entities/Partner.cs | 14 ++++++++++++-- FruitBank.Common/Entities/Shipping.cs | 10 ++++++++-- FruitBank.Common/Entities/ShippingItem.cs | 13 +++++++++++-- FruitBank.Common/Entities/SippingDocument.cs | 12 ++++++++++-- 8 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 FruitBank.Common/Entities/IPartner.cs create mode 100644 FruitBank.Common/Entities/IShipping.cs create mode 100644 FruitBank.Common/Entities/IShippingItem.cs create mode 100644 FruitBank.Common/Entities/ISippingDocument.cs diff --git a/FruitBank.Common/Entities/IPartner.cs b/FruitBank.Common/Entities/IPartner.cs new file mode 100644 index 0000000..4cbd8f7 --- /dev/null +++ b/FruitBank.Common/Entities/IPartner.cs @@ -0,0 +1,15 @@ +using AyCode.Interfaces.Entities; +using AyCode.Interfaces.TimeStampInfo; + +namespace FruitBank.Common.Entities; + +public interface IPartner : IEntityInt, ITimeStampInfo +{ + string Name { get; set; } + string PostalCode { get; set; } + string Country { get; set; } + string State { get; set; } + string County { get; set; } + string City { get; set; } + string Street { get; set; } +} \ No newline at end of file diff --git a/FruitBank.Common/Entities/IShipping.cs b/FruitBank.Common/Entities/IShipping.cs new file mode 100644 index 0000000..fa555e8 --- /dev/null +++ b/FruitBank.Common/Entities/IShipping.cs @@ -0,0 +1,11 @@ +using AyCode.Interfaces.Entities; +using AyCode.Interfaces.TimeStampInfo; + +namespace FruitBank.Common.Entities; + +public interface IShipping : IEntityInt, ITimeStampInfo +{ + int PartnerId { get; set; } + DateTime ShippingDate { get; set; } + string LicencePlate { get; set; } +} \ No newline at end of file diff --git a/FruitBank.Common/Entities/IShippingItem.cs b/FruitBank.Common/Entities/IShippingItem.cs new file mode 100644 index 0000000..74f7507 --- /dev/null +++ b/FruitBank.Common/Entities/IShippingItem.cs @@ -0,0 +1,14 @@ +using AyCode.Interfaces.Entities; +using AyCode.Interfaces.TimeStampInfo; + +namespace FruitBank.Common.Entities; + +public interface IShippingItem : IEntityInt, ITimeStampInfo +{ + int ShippingDocumentId { get; set; } + string Name { get; set; } + double NetWeight { get; set; } + double GrossWeight { get; set; } + double MeasuredNetWeight { get; set; } + double MeasuredGrossWeight { get; set; } +} \ No newline at end of file diff --git a/FruitBank.Common/Entities/ISippingDocument.cs b/FruitBank.Common/Entities/ISippingDocument.cs new file mode 100644 index 0000000..824b93b --- /dev/null +++ b/FruitBank.Common/Entities/ISippingDocument.cs @@ -0,0 +1,13 @@ +using AyCode.Interfaces.Entities; +using AyCode.Interfaces.TimeStampInfo; + +namespace FruitBank.Common.Entities; + +public interface ISippingDocument: IEntityInt, ITimeStampInfo +{ + public int PartnerId { get; set; } + public int ShippingId { get; set; } + public int ShippingItemId { get; set; } + public DateTime ShippingDate { get; set; } + public string Country { get; set; } +} \ No newline at end of file diff --git a/FruitBank.Common/Entities/Partner.cs b/FruitBank.Common/Entities/Partner.cs index 711faad..06e0957 100644 --- a/FruitBank.Common/Entities/Partner.cs +++ b/FruitBank.Common/Entities/Partner.cs @@ -1,6 +1,16 @@ namespace FruitBank.Common.Entities; -public class Partner +public class Partner : IPartner { - + public int Id { get; set; } + public string Name { get; set; } + public string PostalCode { get; set; } + public string Country { get; set; } + public string State { get; set; } + public string County { get; set; } + public string City { get; set; } + public string Street { get; set; } + + public DateTime Created { get; set; } + public DateTime Modified { get; set; } } \ No newline at end of file diff --git a/FruitBank.Common/Entities/Shipping.cs b/FruitBank.Common/Entities/Shipping.cs index 85b828b..19ca0d2 100644 --- a/FruitBank.Common/Entities/Shipping.cs +++ b/FruitBank.Common/Entities/Shipping.cs @@ -1,6 +1,12 @@ namespace FruitBank.Common.Entities; -public class Shipping +public class Shipping : IShipping { - + public int Id { get; set; } + public int PartnerId { get; set; } + public DateTime ShippingDate { get; set; } + public string LicencePlate { get; set; } + + public DateTime Created { get; set; } + public DateTime Modified { get; set; } } \ No newline at end of file diff --git a/FruitBank.Common/Entities/ShippingItem.cs b/FruitBank.Common/Entities/ShippingItem.cs index c8ec638..543a052 100644 --- a/FruitBank.Common/Entities/ShippingItem.cs +++ b/FruitBank.Common/Entities/ShippingItem.cs @@ -1,6 +1,15 @@ namespace FruitBank.Common.Entities; -public class ShippingItem +public class ShippingItem : IShippingItem { - + public int Id { get; set; } + public int ShippingDocumentId { get; set; } + public string Name { get; set; } + public double NetWeight { get; set; } + public double GrossWeight { get; set; } + public double MeasuredNetWeight { get; set; } + public double MeasuredGrossWeight { get; set; } + + public DateTime Created { get; set; } + public DateTime Modified { get; set; } } \ No newline at end of file diff --git a/FruitBank.Common/Entities/SippingDocument.cs b/FruitBank.Common/Entities/SippingDocument.cs index 9c7358e..4e91881 100644 --- a/FruitBank.Common/Entities/SippingDocument.cs +++ b/FruitBank.Common/Entities/SippingDocument.cs @@ -1,6 +1,14 @@ namespace FruitBank.Common.Entities; -public class SippingDocument +public class SippingDocument : ISippingDocument { - + public int Id { get; set; } + public int PartnerId { get; set; } + public int ShippingId { get; set; } + public int ShippingItemId { get; set; } + public DateTime ShippingDate { get; set; } + public string Country { get; set; } + + public DateTime Created { get; set; } + public DateTime Modified { get; set; } } \ No newline at end of file