Skip to content

Commit

Permalink
T #98 cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
HueByte committed Nov 20, 2022
1 parent 7fc8511 commit de255e6
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 153 deletions.
3 changes: 2 additions & 1 deletion src/Huppy/Huppy.Core/Models/CommandLog.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Huppy.Kernel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Huppy.Kernel;

namespace Huppy.Core.Models
{
[Obsolete]
public class CommandLog : DbModel<int>
{
[Key]
Expand Down
3 changes: 2 additions & 1 deletion src/Huppy/Huppy.Core/Models/Reminder.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using Huppy.Kernel;
using System.ComponentModel.DataAnnotations.Schema;
using Huppy.Kernel;

namespace Huppy.Core.Models
{
[Obsolete]
public class Reminder : DbModel<int>
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
Expand Down
3 changes: 2 additions & 1 deletion src/Huppy/Huppy.Core/Models/Server.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Huppy.Kernel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Huppy.Kernel;

namespace Huppy.Core.Models
{
[Obsolete]
public class Server : DbModel<ulong>
{
[Key]
Expand Down
1 change: 1 addition & 0 deletions src/Huppy/Huppy.Core/Models/ServerRooms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Huppy.Core.Models
{
[Obsolete]
public class ServerRooms : DbModel<ulong>
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
Expand Down
3 changes: 2 additions & 1 deletion src/Huppy/Huppy.Core/Models/Ticket.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Huppy.Kernel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Huppy.Kernel;

namespace Huppy.Core.Models
{
[Obsolete]
public class Ticket : DbModel<string>
{
[Key]
Expand Down
18 changes: 9 additions & 9 deletions src/Huppy/Huppy.Infrastructure/HuppyDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<Server>()
.HasOne(e => e.Rooms)
.WithOne(e => e.Server)
.HasForeignKey<ServerRooms>(k => k.Id)
.OnDelete(DeleteBehavior.Cascade);
// builder.Entity<Server>()
// .HasOne(e => e.Rooms)
// .WithOne(e => e.Server)
// .HasForeignKey<ServerRooms>(k => k.Id)
// .OnDelete(DeleteBehavior.Cascade);
}

public DbSet<User> Users { get; set; }
public DbSet<CommandLog> CommandLogs { get; set; }
public DbSet<Server> Servers { get; set; }
public DbSet<Reminder> Reminders { get; set; }
public DbSet<Ticket> Tickets { get; set; }
// public DbSet<CommandLog> CommandLogs { get; set; }
// public DbSet<Server> Servers { get; set; }
// public DbSet<Reminder> Reminders { get; set; }
// public DbSet<Ticket> Tickets { get; set; }
}
}

This file was deleted.

29 changes: 0 additions & 29 deletions src/Huppy/Huppy.Infrastructure/Repositories/ReminderRepository.cs

This file was deleted.

59 changes: 0 additions & 59 deletions src/Huppy/Huppy.Infrastructure/Repositories/ServerRepository.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Huppy/Huppy.Infrastructure/Repositories/TicketRepository.cs

This file was deleted.

1 change: 1 addition & 0 deletions src/Huppy/Huppy.Kernel/Abstraction/BaseRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Huppy.Kernel.Abstraction;

[Obsolete]
public class BaseRepository<TKeyType, TEntity, TContext> : IRepository<TKeyType, TEntity>
where TKeyType : IConvertible
where TEntity : DbModel<TKeyType>, new()
Expand Down
2 changes: 1 addition & 1 deletion src/Huppy/Huppy.Kernel/Abstraction/DbModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Huppy.Kernel
{

[Obsolete]
public class DbModel<TKey> where TKey : IConvertible
{
public virtual TKey Id { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Huppy/Huppy.Kernel/Abstraction/IRepository.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Huppy.Kernel
{
[Obsolete]
public interface IRepository<Tkey, TEntity> where Tkey : IConvertible where TEntity : DbModel<Tkey>
{
Task<TEntity?> GetAsync(Tkey id);
Expand Down
1 change: 1 addition & 0 deletions src/Huppy/Huppy.Kernel/Constants/GPTEndpoints.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Huppy.Kernel.Constants
{
[Obsolete]
public class GPTEndpoints
{
public const string TextDavinciCompletions = "text-davinci-001/completions";
Expand Down
23 changes: 23 additions & 0 deletions src/Main.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HuppyService.Infrastructure
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HuppyService.Core", "HuppyService\HuppyService.Core\HuppyService.Core.csproj", "{E376D7A3-F2FE-4ABD-9FAD-9024E606AC29}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NetherNetAuth", "NetherNetAuth", "{703B8FE3-39E4-43E9-9F90-71F966D77365}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetherNet.Api", "NetherNetAuth\NetherNet.Api\NetherNet.Api.csproj", "{AB5A3C60-4FEB-4D4C-82D5-78132A41B597}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetherNet.Core", "NetherNetAuth\NetherNet.Core\NetherNet.Core.csproj", "{43FF5A94-F856-490E-B34F-2A6BCEC1096B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetherNet.Infrastructure", "NetherNetAuth\NetherNet.Infrastructure\NetherNet.Infrastructure.csproj", "{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -37,6 +45,18 @@ Global
{E376D7A3-F2FE-4ABD-9FAD-9024E606AC29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E376D7A3-F2FE-4ABD-9FAD-9024E606AC29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E376D7A3-F2FE-4ABD-9FAD-9024E606AC29}.Release|Any CPU.Build.0 = Release|Any CPU
{AB5A3C60-4FEB-4D4C-82D5-78132A41B597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB5A3C60-4FEB-4D4C-82D5-78132A41B597}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB5A3C60-4FEB-4D4C-82D5-78132A41B597}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB5A3C60-4FEB-4D4C-82D5-78132A41B597}.Release|Any CPU.Build.0 = Release|Any CPU
{43FF5A94-F856-490E-B34F-2A6BCEC1096B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43FF5A94-F856-490E-B34F-2A6BCEC1096B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43FF5A94-F856-490E-B34F-2A6BCEC1096B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43FF5A94-F856-490E-B34F-2A6BCEC1096B}.Release|Any CPU.Build.0 = Release|Any CPU
{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -46,6 +66,9 @@ Global
{0E63AA9F-116E-40DB-AC1F-21B51B322F94} = {478F934F-E2B9-4A07-A6AD-C482F174E80A}
{E330C21B-3443-4DD0-8313-34777CD4BD11} = {478F934F-E2B9-4A07-A6AD-C482F174E80A}
{E376D7A3-F2FE-4ABD-9FAD-9024E606AC29} = {478F934F-E2B9-4A07-A6AD-C482F174E80A}
{AB5A3C60-4FEB-4D4C-82D5-78132A41B597} = {703B8FE3-39E4-43E9-9F90-71F966D77365}
{43FF5A94-F856-490E-B34F-2A6BCEC1096B} = {703B8FE3-39E4-43E9-9F90-71F966D77365}
{3ABB0FD3-00A7-4CB7-B63E-F79533E4BBC8} = {703B8FE3-39E4-43E9-9F90-71F966D77365}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2FDA4D15-FE50-4802-8176-9F2101A52F15}
Expand Down

0 comments on commit de255e6

Please sign in to comment.