initial load
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YouTubeViewers.Domain.Models;
|
||||
|
||||
namespace YouTubeViewers.Domain.Commands
|
||||
{
|
||||
public interface ICreateYouTubeViewerCommand
|
||||
{
|
||||
Task Execute(YouTubeViewer youTubeViewer);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace YouTubeViewers.Domain.Commands
|
||||
{
|
||||
public interface IDeleteYouTubeViewerCommand
|
||||
{
|
||||
Task Execute(Guid id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YouTubeViewers.Domain.Models;
|
||||
|
||||
namespace YouTubeViewers.Domain.Commands
|
||||
{
|
||||
public interface IUpdateYouTubeViewerCommand
|
||||
{
|
||||
Task Execute(YouTubeViewer youTubeViewer);
|
||||
}
|
||||
}
|
||||
24
YouTubeViewers.Domain/Models/YouTubeViewer.cs
Normal file
24
YouTubeViewers.Domain/Models/YouTubeViewer.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace YouTubeViewers.Domain.Models
|
||||
{
|
||||
public class YouTubeViewer
|
||||
{
|
||||
public YouTubeViewer(Guid id, string username, bool isSubscribed, bool isMember)
|
||||
{
|
||||
Id = id;
|
||||
Username = username;
|
||||
IsSubscribed = isSubscribed;
|
||||
IsMember = isMember;
|
||||
}
|
||||
|
||||
public Guid Id { get; }
|
||||
public string Username { get; }
|
||||
public bool IsSubscribed { get; }
|
||||
public bool IsMember { get; }
|
||||
}
|
||||
}
|
||||
14
YouTubeViewers.Domain/Queries/IGetAllYouTubeViewersQuery.cs
Normal file
14
YouTubeViewers.Domain/Queries/IGetAllYouTubeViewersQuery.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YouTubeViewers.Domain.Models;
|
||||
|
||||
namespace YouTubeViewers.Domain.Queries
|
||||
{
|
||||
public interface IGetAllYouTubeViewersQuery
|
||||
{
|
||||
Task<IEnumerable<YouTubeViewer>> Execute();
|
||||
}
|
||||
}
|
||||
9
YouTubeViewers.Domain/YouTubeViewers.Domain.csproj
Normal file
9
YouTubeViewers.Domain/YouTubeViewers.Domain.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user