Add PartnerDepot and EkaerHistory entities, update tags
- Introduced PartnerDepot and EkaerHistory entity classes with serialization and DB mapping. - Made ICompanyInfoBase.TaxId nullable. - Added new DB table name constants for PartnerDepot and EkaerHistory. - Added SignalR tag constants for PartnerDepot and EkaerHistory operations. - Updated SQL schema compare connection strings and item order.
This commit is contained in:
parent
0a1287ce67
commit
0083a7bd6e
|
|
@ -0,0 +1,58 @@
|
||||||
|
using AyCode.Core.Serializers.Attributes;
|
||||||
|
using AyCode.Core.Serializers.Toons;
|
||||||
|
using AyCode.Interfaces.TimeStampInfo;
|
||||||
|
using LinqToDB.Mapping;
|
||||||
|
using Mango.Nop.Core.Entities;
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
[AcBinarySerializable(false, true, false, true, false, false)]
|
||||||
|
//[ToonDescription("Business partner with address and tax information", Purpose = "Represents an external legal entity, specifically a Supplier who provides goods or a business partner involved in the procurement chain")]
|
||||||
|
[Table(Name = FruitBankConstClient.EkaerHistoryDbTableName)]
|
||||||
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.EkaerHistoryDbTableName)]
|
||||||
|
|
||||||
|
public abstract class EkaerHistory: MgEntityBase, ITimeStampInfo
|
||||||
|
{
|
||||||
|
public int ForeignKey { get; set; }
|
||||||
|
public bool IsOutgoing { get; set; }
|
||||||
|
|
||||||
|
public DateTime Created { get; set; }
|
||||||
|
public DateTime Modified { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
//public sealed class EkaerHistoryShipping : EkaerHistoryBase
|
||||||
|
//{
|
||||||
|
// public int ShippingId
|
||||||
|
// {
|
||||||
|
// get => ForeignItemId;
|
||||||
|
// set => ForeignItemId = value;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)]
|
||||||
|
// public Shipping? Shipping { get; set; }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public sealed class EkaerHistoryOrder : EkaerHistoryBase
|
||||||
|
//{
|
||||||
|
// public int ShippingId
|
||||||
|
// {
|
||||||
|
// get => ForeignItemId;
|
||||||
|
// set => ForeignItemId = value;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)]
|
||||||
|
// public Shipping? Shipping { get; set; }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public abstract class EkaerHistoryBase : MgEntityBase, ITimeStampInfo
|
||||||
|
//{
|
||||||
|
// [NotColumn]
|
||||||
|
// protected int ForeignItemId;
|
||||||
|
|
||||||
|
// [NotColumn]
|
||||||
|
// [ToonDescription(BusinessRule = "get => ForeignItemId", Constraints = "[#SmartTypeConstraints]")]
|
||||||
|
// public int ForeignKey => ForeignItemId;
|
||||||
|
|
||||||
|
// public DateTime Created { get; set; }
|
||||||
|
// public DateTime Modified { get; set; }
|
||||||
|
//}
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
using AyCode.Core.Serializers.Toons;
|
using AyCode.Core.Serializers.Toons;
|
||||||
using FruitBank.Common.Interfaces;
|
using FruitBank.Common.Interfaces;
|
||||||
using LinqToDB.Mapping;
|
using LinqToDB.Mapping;
|
||||||
using Mango.Nop.Core.Entities;
|
|
||||||
|
|
||||||
namespace FruitBank.Common.Entities;
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
using AyCode.Core.Interfaces;
|
||||||
|
using AyCode.Core.Serializers.Attributes;
|
||||||
|
using AyCode.Interfaces.TimeStampInfo;
|
||||||
|
using LinqToDB.Mapping;
|
||||||
|
using Mango.Nop.Core.Entities;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
[AcBinarySerializable(false, true, false, true, false, false)]
|
||||||
|
//[ToonDescription("Business partner with address and tax information", Purpose = "Represents an external legal entity, specifically a Supplier who provides goods or a business partner involved in the procurement chain")]
|
||||||
|
[LinqToDB.Mapping.Table(Name = FruitBankConstClient.PartnerDepotDbTableName)]
|
||||||
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PartnerDepotDbTableName)]
|
||||||
|
public sealed class PartnerDepot : MgEntityBase, ITimeStampInfo, ICompanyInfoBase
|
||||||
|
{
|
||||||
|
public int PartnerId { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set;}
|
||||||
|
|
||||||
|
[NotColumn, NotMapped, Newtonsoft.Json.JsonIgnore, JsonIgnore]
|
||||||
|
public string? TaxId => Partner?.TaxId;
|
||||||
|
|
||||||
|
public string CountryCode { get; set; }
|
||||||
|
public string PostalCode { get; set;}
|
||||||
|
public string City { get; set;}
|
||||||
|
public string Street { get; set;}
|
||||||
|
|
||||||
|
[NotColumn, NotMapped, Newtonsoft.Json.JsonIgnore, JsonIgnore]
|
||||||
|
public string FullAddress => this.ComposeFullAddress() ?? string.Empty;
|
||||||
|
|
||||||
|
[Association(ThisKey = nameof(PartnerId), OtherKey = nameof(Partner.Id), CanBeNull = true)]
|
||||||
|
public Partner? Partner { get; set; }
|
||||||
|
|
||||||
|
[SkipValuesOnUpdate]
|
||||||
|
public DateTime Created { get; set; }
|
||||||
|
public DateTime Modified { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -30,6 +30,9 @@ public static class FruitBankConstClient
|
||||||
public const string PalletDbTableName = "fbPallet";
|
public const string PalletDbTableName = "fbPallet";
|
||||||
public const string FilesDbTableName = "fbFiles";
|
public const string FilesDbTableName = "fbFiles";
|
||||||
public const string PartnerDbTableName = "fbPartner";
|
public const string PartnerDbTableName = "fbPartner";
|
||||||
|
public const string PartnerDepotDbTableName = "fbPartnerDepot";
|
||||||
|
|
||||||
|
public const string EkaerHistoryDbTableName = "fbEkaerHistory";
|
||||||
|
|
||||||
public const string OrderItemPalletDbTableName = "fbOrderItemPallet";
|
public const string OrderItemPalletDbTableName = "fbOrderItemPallet";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,17 @@ public class SignalRTags : AcSignalRTags
|
||||||
public const int GetStockTakingItemsByStockTakingId = 178;
|
public const int GetStockTakingItemsByStockTakingId = 178;
|
||||||
public const int AddOrUpdateMeasuredStockTakingItemPallet = 179;
|
public const int AddOrUpdateMeasuredStockTakingItemPallet = 179;
|
||||||
|
|
||||||
|
public const int GetPartnerDepots = 180;
|
||||||
|
public const int GetPartnerDepotById = 181;
|
||||||
|
public const int GetPartnerDepotsByPartnerId = 182;
|
||||||
|
public const int AddPartnerDepot = 183;
|
||||||
|
public const int UpdatePartnerDepot = 184;
|
||||||
|
|
||||||
|
public const int GetEkaerHistories = 185;
|
||||||
|
public const int GetEkaerHistoryById = 186;
|
||||||
|
//public const int GetEkaerHistoriesByForeignKey = 187;
|
||||||
|
public const int AddEkaerHistory = 188;
|
||||||
|
public const int UpdateEkaerHistory = 189;
|
||||||
|
|
||||||
public const int AuthenticateUser = 195;
|
public const int AuthenticateUser = 195;
|
||||||
public const int RefreshToken = 200;
|
public const int RefreshToken = 200;
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
<Version>10</Version>
|
<Version>10</Version>
|
||||||
<SourceModelProvider>
|
<SourceModelProvider>
|
||||||
<ConnectionBasedModelProvider>
|
<ConnectionBasedModelProvider>
|
||||||
<ConnectionString>Data Source=195.26.231.218;Initial Catalog=FruitBank_DEV;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Multiple Active Result Sets=False;Trust Server Certificate=True</ConnectionString>
|
<ConnectionString>Data Source=100.73.220.50;Initial Catalog=FruitBank_DEV;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Trust Server Certificate=True</ConnectionString>
|
||||||
</ConnectionBasedModelProvider>
|
</ConnectionBasedModelProvider>
|
||||||
</SourceModelProvider>
|
</SourceModelProvider>
|
||||||
<TargetModelProvider>
|
<TargetModelProvider>
|
||||||
<ConnectionBasedModelProvider>
|
<ConnectionBasedModelProvider>
|
||||||
<ConnectionString>Data Source=195.26.231.218;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Multiple Active Result Sets=False;Trust Server Certificate=True</ConnectionString>
|
<ConnectionString>Data Source=100.73.220.50;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Trust Server Certificate=True</ConnectionString>
|
||||||
</ConnectionBasedModelProvider>
|
</ConnectionBasedModelProvider>
|
||||||
</TargetModelProvider>
|
</TargetModelProvider>
|
||||||
<SchemaCompareSettingsService>
|
<SchemaCompareSettingsService>
|
||||||
|
|
@ -357,7 +357,7 @@
|
||||||
</PropertyElementName>
|
</PropertyElementName>
|
||||||
<PropertyElementName>
|
<PropertyElementName>
|
||||||
<Name>TargetConnectionString</Name>
|
<Name>TargetConnectionString</Name>
|
||||||
<Value>Data Source=195.26.231.218;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Multiple Active Result Sets=False;Trust Server Certificate=True;Application Name="Microsoft SQL Server Data Tools, Schema Compare"</Value>
|
<Value>Data Source=100.73.220.50;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Multiple Active Result Sets=False;Trust Server Certificate=True;Application Name="Microsoft SQL Server Data Tools, Schema Compare"</Value>
|
||||||
</PropertyElementName>
|
</PropertyElementName>
|
||||||
<PropertyElementName>
|
<PropertyElementName>
|
||||||
<Name>TreatVerificationErrorsAsWarnings</Name>
|
<Name>TreatVerificationErrorsAsWarnings</Name>
|
||||||
|
|
@ -1002,17 +1002,13 @@
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>PK_AvalaraItemClassification</Name>
|
<Name>PK_AvalaraItemClassification</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
|
||||||
<Name>dbo</Name>
|
|
||||||
<Name>FacebookPixelConfiguration</Name>
|
|
||||||
</SelectedItem>
|
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>PK_FacebookPixelConfiguration</Name>
|
<Name>PK_FacebookPixelConfiguration</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>GoogleAuthenticatorRecord</Name>
|
<Name>FacebookPixelConfiguration</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
|
|
@ -1020,12 +1016,16 @@
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>TaxTransactionLog</Name>
|
<Name>GoogleAuthenticatorRecord</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlPrimaryKeyConstraint, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>PK_TaxTransactionLog</Name>
|
<Name>PK_TaxTransactionLog</Name>
|
||||||
</SelectedItem>
|
</SelectedItem>
|
||||||
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlTable, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
|
<Name>dbo</Name>
|
||||||
|
<Name>TaxTransactionLog</Name>
|
||||||
|
</SelectedItem>
|
||||||
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlView, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
<SelectedItem Type="Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlView, Microsoft.Data.Tools.Schema.Sql, Version=170.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
|
||||||
<Name>dbo</Name>
|
<Name>dbo</Name>
|
||||||
<Name>vOrder</Name>
|
<Name>vOrder</Name>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue