Skip to content

Commit

Permalink
VCST-206: Push messages (#1)
Browse files Browse the repository at this point in the history
feat: first release
  • Loading branch information
artem-dudarev authored Mar 25, 2024
1 parent a537b82 commit c1e907f
Show file tree
Hide file tree
Showing 145 changed files with 9,998 additions and 553 deletions.
8 changes: 7 additions & 1 deletion VirtoCommerce.PushMessages.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
Expand Down Expand Up @@ -32,6 +31,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
VirtoCommerce.PushMessages.sln.DotSettings = VirtoCommerce.PushMessages.sln.DotSettings
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtoCommerce.PushMessages.ExperienceApi", "src\VirtoCommerce.PushMessages.ExperienceApi\VirtoCommerce.PushMessages.ExperienceApi.csproj", "{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -66,6 +67,10 @@ Global
{2AA0CB53-41C4-4470-9957-04D9E7A2DA9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AA0CB53-41C4-4470-9957-04D9E7A2DA9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AA0CB53-41C4-4470-9957-04D9E7A2DA9D}.Release|Any CPU.Build.0 = Release|Any CPU
{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -78,6 +83,7 @@ Global
{0D05A182-F070-41AD-AF80-16C2C32D3FB6} = {992AC75C-0ADD-485F-A467-CB6019023867}
{05690526-7B91-4257-A49E-210B4719C33C} = {992AC75C-0ADD-485F-A467-CB6019023867}
{2AA0CB53-41C4-4470-9957-04D9E7A2DA9D} = {E5D2BDCE-2C91-490D-9549-763E2CBEF237}
{CB4ACA02-AB48-4BA0-B363-50C3FD6D7C9F} = {992AC75C-0ADD-485F-A467-CB6019023867}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {27AFA340-969C-462C-9288-803ED0C14A5B}
Expand Down
2 changes: 2 additions & 0 deletions VirtoCommerce.PushMessages.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=npgsql/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pomelo/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=postgre/@EntryIndexedValue">True</s:Boolean>
Expand Down
22 changes: 22 additions & 0 deletions module.ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
AutoMapper.dll
AutoMapper.Extensions.Microsoft.DependencyInjection.dll
GraphQL.Authorization.dll
GraphQL.DataLoader.dll
GraphQL.dll
GraphQL.NewtonsoftJson.dll
GraphQL.Relay.dll
GraphQL.Server.Core.dll
GraphQL.Server.Transports.AspNetCore.dll
GraphQL.Server.Transports.AspNetCore.NewtonsoftJson.dll
GraphQL.Server.Transports.Subscriptions.Abstractions.dll
GraphQL.SystemReactive.dll
GraphQL-Parser.dll
MediatR.dll
MediatR.Extensions.Microsoft.DependencyInjection.dll
Microsoft.Data.SqlClient.SNI.dll
Nager.Country.dll
PipelineNet.dll
System.Reactive.Core.dll
System.Reactive.dll
System.Reactive.Linq.dll
System.Reactive.xml
TimeZoneConverter.dll
VirtoCommerce.Tools.dll
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections.Generic;
using VirtoCommerce.Platform.Core.Events;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Events;

public class PushMessageChangedEvent : GenericChangedEntryEvent<PushMessage>
{
public PushMessageChangedEvent(IEnumerable<GenericChangedEntry<PushMessage>> changedEntries)
: base(changedEntries)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections.Generic;
using VirtoCommerce.Platform.Core.Events;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Events;

public class PushMessageChangingEvent : GenericChangedEntryEvent<PushMessage>
{
public PushMessageChangingEvent(IEnumerable<GenericChangedEntry<PushMessage>> changedEntries)
: base(changedEntries)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections.Generic;
using VirtoCommerce.Platform.Core.Events;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Events;

public class PushMessageRecipientChangedEvent : GenericChangedEntryEvent<PushMessageRecipient>
{
public PushMessageRecipientChangedEvent(IEnumerable<GenericChangedEntry<PushMessageRecipient>> changedEntries)
: base(changedEntries)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections.Generic;
using VirtoCommerce.Platform.Core.Events;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Events;

public class PushMessageRecipientChangingEvent : GenericChangedEntryEvent<PushMessageRecipient>
{
public PushMessageRecipientChangingEvent(IEnumerable<GenericChangedEntry<PushMessageRecipient>> changedEntries)
: base(changedEntries)
{
}
}
Empty file.
21 changes: 21 additions & 0 deletions src/VirtoCommerce.PushMessages.Core/Models/PushMessage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessage : AuditableEntity, ICloneable
{
public string ShortMessage { get; set; }

public IList<string> MemberIds { get; set; }

[JsonIgnore]
public IList<string> UserIds { get; set; }

public object Clone()
{
return MemberwiseClone();
}
}
10 changes: 10 additions & 0 deletions src/VirtoCommerce.PushMessages.Core/Models/PushMessageMember.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageMember : AuditableEntity
{
public string MemberId { get; set; }
public string MemberName { get; set; }
public string MemberType { get; set; }
}
22 changes: 22 additions & 0 deletions src/VirtoCommerce.PushMessages.Core/Models/PushMessageRecipient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageRecipient : AuditableEntity, ICloneable
{
public string MessageId { get; set; }
public string MemberId { get; set; }
public string MemberName { get; set; }
public string UserId { get; set; }
public string UserName { get; set; }
public bool IsRead { get; set; }
public bool IsHidden { get; set; }

public PushMessage Message { get; set; }

public object Clone()
{
return MemberwiseClone();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace VirtoCommerce.PushMessages.Core.Models;

[Flags]
public enum PushMessageRecipientResponseGroup
{
None = 0,
WithMessages = 1 << 0,
Full = WithMessages,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageRecipientSearchCriteria : SearchCriteriaBase
{
public string MessageId { get; set; }
public string UserId { get; set; }
public bool? IsRead { get; set; }
public bool WithHidden { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageRecipientSearchResult : GenericSearchResult<PushMessageRecipient>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace VirtoCommerce.PushMessages.Core.Models;

[Flags]
public enum PushMessageResponseGroup
{
None = 0,
WithMembers = 1 << 0,
Full = WithMembers,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageSearchCriteria : SearchCriteriaBase
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using VirtoCommerce.Platform.Core.Common;

namespace VirtoCommerce.PushMessages.Core.Models;

public class PushMessageSearchResult : GenericSearchResult<PushMessage>
{
}
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using VirtoCommerce.Platform.Core.GenericCrud;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Services;

public interface IPushMessageRecipientSearchService : ISearchService<PushMessageRecipientSearchCriteria, PushMessageRecipientSearchResult, PushMessageRecipient>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using VirtoCommerce.Platform.Core.GenericCrud;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Services;

public interface IPushMessageRecipientService : ICrudService<PushMessageRecipient>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using VirtoCommerce.Platform.Core.GenericCrud;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Services;

public interface IPushMessageSearchService : ISearchService<PushMessageSearchCriteria, PushMessageSearchResult, PushMessage>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using VirtoCommerce.Platform.Core.GenericCrud;
using VirtoCommerce.PushMessages.Core.Models;

namespace VirtoCommerce.PushMessages.Core.Services;

public interface IPushMessageService : ICrudService<PushMessage>
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.812.0" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.814.0" />
</ItemGroup>
</Project>
Empty file.
Loading

0 comments on commit c1e907f

Please sign in to comment.