CDN
This commit is contained in:
@@ -10,10 +10,14 @@ public abstract class Entity<T>
|
|||||||
{
|
{
|
||||||
IsDeleted = false;
|
IsDeleted = false;
|
||||||
IsActive = true;
|
IsActive = true;
|
||||||
|
CreateOn = DateTime.Now;
|
||||||
|
LastUpdate = DateTime.Now;
|
||||||
}
|
}
|
||||||
public T Id { get; protected set; }
|
public T Id { get; protected set; }
|
||||||
public bool IsDeleted { get; protected set; }
|
public bool IsDeleted { get; protected set; }
|
||||||
public bool IsActive { get; protected set; }
|
public bool IsActive { get; protected set; }
|
||||||
|
public DateTime CreateOn { get; set; }
|
||||||
|
public DateTime LastUpdate { get; set; }
|
||||||
|
|
||||||
private List<IDomainEvent> _domainEvents;
|
private List<IDomainEvent> _domainEvents;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -49,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VizhTalk.Gateway.Web.BFF",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vizhtalk.CDN.Presentation", "Vizhtalk.CDN.Presentation\Vizhtalk.CDN.Presentation.csproj", "{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vizhtalk.CDN.Presentation", "Vizhtalk.CDN.Presentation\Vizhtalk.CDN.Presentation.csproj", "{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VizhTalk.Grpc.CDN", "VizhTalk.Grpc.CDN\VizhTalk.Grpc.CDN.csproj", "{312291A0-6180-4F89-97C5-8D327BE5DE09}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -95,6 +97,10 @@ Global
|
|||||||
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{312291A0-6180-4F89-97C5-8D327BE5DE09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{312291A0-6180-4F89-97C5-8D327BE5DE09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{312291A0-6180-4F89-97C5-8D327BE5DE09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{312291A0-6180-4F89-97C5-8D327BE5DE09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -119,6 +125,7 @@ Global
|
|||||||
{8327C994-F1D5-493B-8EF7-B60EB888E92A} = {1305E6AB-69E5-47BD-B03C-694832C4D46A}
|
{8327C994-F1D5-493B-8EF7-B60EB888E92A} = {1305E6AB-69E5-47BD-B03C-694832C4D46A}
|
||||||
{21DDD623-E75A-4D16-894B-2DEA0CA5C073} = {FCA7DC48-FD9C-43FA-AC1B-464049337778}
|
{21DDD623-E75A-4D16-894B-2DEA0CA5C073} = {FCA7DC48-FD9C-43FA-AC1B-464049337778}
|
||||||
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158} = {9E64DF44-8256-40C8-8AFA-B841CE80DD0E}
|
{F6FDEF63-77D7-47AC-A5F5-2EB59D230158} = {9E64DF44-8256-40C8-8AFA-B841CE80DD0E}
|
||||||
|
{312291A0-6180-4F89-97C5-8D327BE5DE09} = {16D91427-4F51-48CD-A2F2-6CC1B9A9D8A5}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {9BD8917D-0A5E-401B-B153-400D610B23E4}
|
SolutionGuid = {9BD8917D-0A5E-401B-B153-400D610B23E4}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Vizhtalk.CDN.Presentation.TypeIds;
|
||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.Entities
|
||||||
|
{
|
||||||
|
public class Client : Entity<ClientId>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,9 @@ namespace Vizhtalk.CDN.Presentation.Entities
|
|||||||
{
|
{
|
||||||
public MediaName Name { get; set; }
|
public MediaName Name { get; set; }
|
||||||
public ContentType ContentType { get; private set; }
|
public ContentType ContentType { get; private set; }
|
||||||
|
public int Size { get; set; }
|
||||||
public string Path { get; private set; }
|
public string Path { get; private set; }
|
||||||
public string Hash { get; set; }
|
public string Hash { get; set; }
|
||||||
|
public List<MediaGroupMedia> MediaGroupMedias { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Vizhtalk.CDN.Presentation.TypeIds;
|
||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.Entities
|
||||||
|
{
|
||||||
|
public class MediaClient : Entity<MediaClientId>
|
||||||
|
{
|
||||||
|
public MediaId MediaId { get; set; }
|
||||||
|
public ClientId ClientId { get; set; }
|
||||||
|
public MediaGroupMediaId MediaGroup { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using Vizhtalk.CDN.Presentation.TypeIds;
|
||||||
|
using Vizhtalk.CDN.Presentation.ValueObjects;
|
||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.Entities
|
||||||
|
{
|
||||||
|
public class MediaGroup : Entity<MediaGroupId>
|
||||||
|
{
|
||||||
|
public bool IsSecure { get; set; }
|
||||||
|
public MediaGroupTitle Title { get; set; }
|
||||||
|
public string Key { get; set; }
|
||||||
|
public List<MediaGroupMedia> MediaGroupMedias { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Vizhtalk.CDN.Presentation.TypeIds;
|
||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.Entities
|
||||||
|
{
|
||||||
|
public class MediaGroupMedia : Entity<MediaGroupMediaId>
|
||||||
|
{
|
||||||
|
public MediaId MediaId { get; set; }
|
||||||
|
public MediaGroupId MediaGroupId { get; set; }
|
||||||
|
public List<MediaClient> MediaClients { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.TypeIds
|
||||||
|
{
|
||||||
|
public class ClientId : TypedIdValueBase<string>
|
||||||
|
{
|
||||||
|
public ClientId(string value) : base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.TypeIds
|
||||||
|
{
|
||||||
|
public class MediaClientId : TypedIdValueBase<long>
|
||||||
|
{
|
||||||
|
public MediaClientId(long value) : base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.TypeIds
|
||||||
|
{
|
||||||
|
public class MediaGroupId : TypedIdValueBase<long>
|
||||||
|
{
|
||||||
|
public MediaGroupId(long value) : base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.TypeIds
|
||||||
|
{
|
||||||
|
public class MediaGroupMediaId : TypedIdValueBase<Guid>
|
||||||
|
{
|
||||||
|
public MediaGroupMediaId(Guid value) : base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace Vizhtalk.CDN.Presentation.TypeIds
|
namespace Vizhtalk.CDN.Presentation.TypeIds
|
||||||
{
|
{
|
||||||
public class MediaId : TypedIdValueBase<Guid>
|
public class MediaId : TypedIdValueBase<long>
|
||||||
{
|
{
|
||||||
public MediaId(Guid value) : base(value)
|
public MediaId(long value) : base(value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using VizhTalk.BuildingBlocks.Domain;
|
||||||
|
using VizhTalk.BuildingBlocks.Domain.Guards;
|
||||||
|
|
||||||
|
namespace Vizhtalk.CDN.Presentation.ValueObjects;
|
||||||
|
|
||||||
|
public class MediaGroupTitle : ValueObject
|
||||||
|
{
|
||||||
|
public MediaGroupTitle(string value)
|
||||||
|
{
|
||||||
|
Guard.NullOrEmpty(value, nameof(MediaGroupTitle));
|
||||||
|
Guard.MaxLength(value, nameof(MediaGroupTitle),150);
|
||||||
|
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user