-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Repositories, working on background services
- Loading branch information
novru
authored and
novru
committed
May 18, 2024
1 parent
b577f6e
commit dacd385
Showing
12 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Core/Application/Repositories/BannedUserRepository/IReadBannedUserRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Application.Repositories.Repository; | ||
using Domain.Models; | ||
|
||
namespace Application.Repositories.BannedUserRepository; | ||
|
||
public interface IReadBannedUserRepository : IReadRepository<BannedUser> | ||
{ | ||
} |
8 changes: 8 additions & 0 deletions
8
Core/Application/Repositories/BannedUserRepository/IWriteBannedUserRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Application.Repositories.Repository; | ||
using Domain.Models; | ||
|
||
namespace Application.Repositories.BannedUserRepository; | ||
|
||
public interface IWriteBannedUserRepository : IWriteRepository<BannedUser> | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Domain.Models.Common; | ||
|
||
namespace Domain.Models; | ||
|
||
public class BannedUser : BaseEntity | ||
{ | ||
public string ReasonContent { get; set; } | ||
public DateTime BannedDate { get; set; } | ||
public DateTime UnbanDate { get; set; } | ||
} |
13 changes: 13 additions & 0 deletions
13
Infrastructure/Infrastructure/BackgroundServices/ForbiddenCommentChecker.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Application.Repositories; | ||
using Microsoft.Extensions.Hosting; | ||
using Serilog; | ||
|
||
namespace Infrastructure.BackgroundServices; | ||
|
||
public class ForbiddenCommentChecker : BackgroundService | ||
{ | ||
protected override async Task ExecuteAsync(CancellationToken stoppingToken) | ||
{ | ||
Log.Information("Forbidden Message Checker -- B Service started working."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Infrastructure/Persistence/Repositories/BannedUserRepository/ReadBannedUserRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Application.Repositories.BannedUserRepository; | ||
using Domain.Models; | ||
using Persistence.Context; | ||
using Persistence.Repositories.Repository; | ||
|
||
namespace Persistence.Repositories.BannedUserRepository; | ||
|
||
public class ReadBannedUserRepository : ReadRepository<BannedUser>, IReadBannedUserRepository | ||
{ | ||
public ReadBannedUserRepository(AppDbContext context) : base(context) | ||
{ | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Infrastructure/Persistence/Repositories/BannedUserRepository/WriteBannedUserRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Application.Repositories.BannedUserRepository; | ||
using Domain.Models; | ||
using Persistence.Context; | ||
using Persistence.Repositories.Repository; | ||
|
||
namespace Persistence.Repositories.BannedUserRepository; | ||
|
||
public class WriteBannedUserRepository : WriteRepository<BannedUser>, IWriteBannedUserRepository | ||
{ | ||
public WriteBannedUserRepository(AppDbContext context) : base(context) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters