diff --git a/Moonlight/App/Database/Entities/Store/ServiceShare.cs b/Moonlight/App/Database/Entities/Store/ServiceShare.cs deleted file mode 100644 index 4cbcca2..0000000 --- a/Moonlight/App/Database/Entities/Store/ServiceShare.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Moonlight.App.Database.Entities.Store; - -public class ServiceShare -{ - public int Id { get; set; } - public User User { get; set; } -} \ No newline at end of file diff --git a/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs b/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs deleted file mode 100644 index dfc010e..0000000 --- a/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Moonlight.App.Models.Abstractions.Services; - -public abstract class ServiceActions -{ - public abstract Task Create(IServiceProvider provider, Database.Entities.Store.Service service); - public abstract Task Update(IServiceProvider provider, Database.Entities.Store.Service service); - public abstract Task Delete(IServiceProvider provider, Database.Entities.Store.Service service); -} \ No newline at end of file diff --git a/Moonlight/BlazorApp.razor b/Moonlight/BlazorApp.razor index 5830296..abf100d 100644 --- a/Moonlight/BlazorApp.razor +++ b/Moonlight/BlazorApp.razor @@ -1,4 +1,4 @@ -@using Moonlight.Shared.Layouts +@using Moonlight.Core.UI.Layouts diff --git a/Moonlight/App/Actions/Dummy/DummyActions.cs b/Moonlight/Core/Actions/Dummy/DummyActions.cs similarity index 70% rename from Moonlight/App/Actions/Dummy/DummyActions.cs rename to Moonlight/Core/Actions/Dummy/DummyActions.cs index ba00b19..4f11be2 100644 --- a/Moonlight/App/Actions/Dummy/DummyActions.cs +++ b/Moonlight/Core/Actions/Dummy/DummyActions.cs @@ -1,8 +1,7 @@ -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Features.ServiceManagement.Entities; +using Moonlight.Features.ServiceManagement.Models.Abstractions; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyActions : ServiceActions { diff --git a/Moonlight/App/Actions/Dummy/DummyConfig.cs b/Moonlight/Core/Actions/Dummy/DummyConfig.cs similarity index 84% rename from Moonlight/App/Actions/Dummy/DummyConfig.cs rename to Moonlight/Core/Actions/Dummy/DummyConfig.cs index 6076d0b..f9d7bfa 100644 --- a/Moonlight/App/Actions/Dummy/DummyConfig.cs +++ b/Moonlight/Core/Actions/Dummy/DummyConfig.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyConfig { diff --git a/Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs b/Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs similarity index 72% rename from Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs rename to Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs index 1d386a1..72f0c84 100644 --- a/Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs +++ b/Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs @@ -1,9 +1,9 @@ -using Moonlight.App.Actions.Dummy.Layouts; -using Moonlight.App.Actions.Dummy.Pages; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Core.Actions.Dummy.Layouts; +using Moonlight.Core.Actions.Dummy.Pages; +using Moonlight.Core.Helpers; +using Moonlight.Features.ServiceManagement.Models.Abstractions; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyServiceDefinition : ServiceDefinition { diff --git a/Moonlight/App/Actions/Dummy/Layouts/DummyAdmin.razor b/Moonlight/Core/Actions/Dummy/Layouts/DummyAdmin.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Layouts/DummyAdmin.razor rename to Moonlight/Core/Actions/Dummy/Layouts/DummyAdmin.razor diff --git a/Moonlight/App/Actions/Dummy/Layouts/DummyUser.razor b/Moonlight/Core/Actions/Dummy/Layouts/DummyUser.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Layouts/DummyUser.razor rename to Moonlight/Core/Actions/Dummy/Layouts/DummyUser.razor diff --git a/Moonlight/App/Actions/Dummy/Pages/DummyPage.razor b/Moonlight/Core/Actions/Dummy/Pages/DummyPage.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Pages/DummyPage.razor rename to Moonlight/Core/Actions/Dummy/Pages/DummyPage.razor diff --git a/Moonlight/App/Configuration/ConfigV1.cs b/Moonlight/Core/Configuration/ConfigV1.cs similarity index 81% rename from Moonlight/App/Configuration/ConfigV1.cs rename to Moonlight/Core/Configuration/ConfigV1.cs index 62aab2e..251f5f8 100644 --- a/Moonlight/App/Configuration/ConfigV1.cs +++ b/Moonlight/Core/Configuration/ConfigV1.cs @@ -1,8 +1,11 @@ using System.ComponentModel; -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; +using Moonlight.Features.Advertisement.Configuration; +using Moonlight.Features.StoreSystem.Configuration; +using Moonlight.Features.Theming.Configuration; using Newtonsoft.Json; -namespace Moonlight.App.Configuration; +namespace Moonlight.Core.Configuration; public class ConfigV1 { @@ -19,24 +22,6 @@ public class ConfigV1 [JsonProperty("Theme")] public ThemeData Theme { get; set; } = new(); [JsonProperty("Advertisement")] public AdvertisementData Advertisement { get; set; } = new(); - public class AdvertisementData - { - [JsonProperty("PreventAdBlockers")] - [Description("This prevents users from using ad blockers while using moonlight. (Note: The detection might not always work)")] - public bool PreventAdBlockers { get; set; } - } - public class ThemeData - { - [JsonProperty("EnableDefault")] public bool EnableDefault { get; set; } = true; - } - - public class StoreData - { - [JsonProperty("Currency")] - [Description("A string value representing the currency which will be shown to a user")] - public string Currency { get; set; } = "€"; - } - public class SecurityData { [JsonProperty("Token")] diff --git a/Moonlight/App/Database/DataContext.cs b/Moonlight/Core/Database/DataContext.cs similarity index 85% rename from Moonlight/App/Database/DataContext.cs rename to Moonlight/Core/Database/DataContext.cs index de9bf50..6667857 100644 --- a/Moonlight/App/Database/DataContext.cs +++ b/Moonlight/Core/Database/DataContext.cs @@ -1,11 +1,13 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Community; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Database.Entities.Tickets; -using Moonlight.App.Services; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Services; +using Moonlight.Features.Community.Entities; +using Moonlight.Features.ServiceManagement.Entities; +using Moonlight.Features.StoreSystem.Entities; +using Moonlight.Features.Theming.Entities; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Database; +namespace Moonlight.Core.Database; public class DataContext : DbContext { diff --git a/Moonlight/App/Database/Entities/User.cs b/Moonlight/Core/Database/Entities/User.cs similarity index 89% rename from Moonlight/App/Database/Entities/User.cs rename to Moonlight/Core/Database/Entities/User.cs index 78bedeb..1c83022 100644 --- a/Moonlight/App/Database/Entities/User.cs +++ b/Moonlight/Core/Database/Entities/User.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities.Store; +using Moonlight.Features.StoreSystem.Entities; -namespace Moonlight.App.Database.Entities; +namespace Moonlight.Core.Database.Entities; public class User { diff --git a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs similarity index 91% rename from Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs rename to Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs index 00811bc..7eed2ec 100644 --- a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231013200303_AddedUser")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs similarity index 97% rename from Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs rename to Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs index ef03bad..a187145 100644 --- a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs +++ b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedUser : Migration diff --git a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs similarity index 82% rename from Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs index cd17712..3c90fdb 100644 --- a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231017075519_AddStoreModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -80,7 +81,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -101,7 +102,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -117,7 +118,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -203,7 +204,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -224,7 +225,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -266,9 +267,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) @@ -277,9 +278,9 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) @@ -288,24 +289,24 @@ namespace Moonlight.App.Database.Migrations b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId"); b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -316,13 +317,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -331,7 +332,7 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); diff --git a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs similarity index 99% rename from Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs rename to Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs index 41b821e..dcaefe9 100644 --- a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs +++ b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddStoreModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs similarity index 81% rename from Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs rename to Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs index b584d5f..4249659 100644 --- a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231018203522_AddedUserStoreData")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -279,39 +280,39 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -320,15 +321,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -339,13 +340,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -354,12 +355,12 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs similarity index 98% rename from Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs rename to Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs index 13c6ea2..a22bb9e 100644 --- a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs +++ b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedUserStoreData : Migration diff --git a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs similarity index 81% rename from Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs rename to Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs index 4a54145..caabb9e 100644 --- a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231018204737_AddedTransactions")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -257,7 +258,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -302,39 +303,39 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -343,15 +344,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -362,13 +363,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -377,19 +378,19 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs similarity index 97% rename from Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs rename to Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs index b8581b5..72a6a61 100644 --- a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs +++ b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTransactions : Migration diff --git a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs index b1a2f6e..7b500b5 100644 --- a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231027105412_AddPostsModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -131,7 +132,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -152,7 +153,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -173,7 +174,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -194,7 +195,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -215,7 +216,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -265,7 +266,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -301,7 +302,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -322,7 +323,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -345,7 +346,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -390,9 +391,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -401,28 +402,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -431,39 +432,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -472,15 +473,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -491,13 +492,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -506,26 +507,26 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs similarity index 99% rename from Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs rename to Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs index 7910ab2..9083ba8 100644 --- a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs +++ b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddPostsModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs rename to Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs index 7f0deef..5492762 100644 --- a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231028214520_AddedWordFilter")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -405,9 +406,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -416,28 +417,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -446,39 +447,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -487,15 +488,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -506,13 +507,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -521,26 +522,26 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs similarity index 95% rename from Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs rename to Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs index 4ff13e1..a43b859 100644 --- a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs +++ b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedWordFilter : Migration diff --git a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs index 1419a13..9772bff 100644 --- a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231101161843_AddedTicketModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -402,7 +403,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -436,7 +437,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -481,9 +482,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -492,28 +493,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -522,39 +523,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -563,15 +564,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -582,13 +583,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -597,22 +598,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -621,37 +622,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs similarity index 98% rename from Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs rename to Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs index f76fc0d..ac2ad43 100644 --- a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs +++ b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTicketModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs rename to Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs index 33208aa..4a8c9da 100644 --- a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231222100225_AddThemeModel")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs similarity index 96% rename from Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs rename to Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs index 9aadbbb..aa5fb5d 100644 --- a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs +++ b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddThemeModel : Migration diff --git a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs rename to Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs index e25d18d..40b8d57 100644 --- a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20240119090835_AddedTransactionDate")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -363,7 +364,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -395,7 +396,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -437,7 +438,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -471,7 +472,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -516,9 +517,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -527,28 +528,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -557,39 +558,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -598,15 +599,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -617,13 +618,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -632,22 +633,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -656,37 +657,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs similarity index 94% rename from Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs rename to Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs index bb3d3e9..806e2ec 100644 --- a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs +++ b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTransactionDate : Migration diff --git a/Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs b/Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs similarity index 80% rename from Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs rename to Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs index debff26..0e1f2dc 100644 --- a/Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs +++ b/Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs @@ -3,11 +3,12 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] partial class DataContextModelSnapshot : ModelSnapshot @@ -17,7 +18,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -50,7 +51,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -81,7 +82,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -105,7 +106,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -120,7 +121,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -143,7 +144,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -164,7 +165,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -185,7 +186,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -206,7 +207,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -227,7 +228,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -277,7 +278,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -313,7 +314,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -334,7 +335,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Event/Args/MailVerificationEventArgs.cs b/Moonlight/Core/Event/Args/MailVerificationEventArgs.cs similarity index 58% rename from Moonlight/App/Event/Args/MailVerificationEventArgs.cs rename to Moonlight/Core/Event/Args/MailVerificationEventArgs.cs index a1f3160..69b4450 100644 --- a/Moonlight/App/Event/Args/MailVerificationEventArgs.cs +++ b/Moonlight/Core/Event/Args/MailVerificationEventArgs.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities; +using Moonlight.Core.Database.Entities; -namespace Moonlight.App.Event.Args; +namespace Moonlight.Core.Event.Args; public class MailVerificationEventArgs { diff --git a/Moonlight/App/Event/Args/TicketMessageEventArgs.cs b/Moonlight/Core/Event/Args/TicketMessageEventArgs.cs similarity index 60% rename from Moonlight/App/Event/Args/TicketMessageEventArgs.cs rename to Moonlight/Core/Event/Args/TicketMessageEventArgs.cs index 900be64..715d3a7 100644 --- a/Moonlight/App/Event/Args/TicketMessageEventArgs.cs +++ b/Moonlight/Core/Event/Args/TicketMessageEventArgs.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities.Tickets; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Event.Args; +namespace Moonlight.Core.Event.Args; public class TicketMessageEventArgs { diff --git a/Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs b/Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs similarity index 50% rename from Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs rename to Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs index 585791c..a04e258 100644 --- a/Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs +++ b/Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs @@ -1,7 +1,7 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; +using Moonlight.Core.Database.Entities; +using Moonlight.Features.StoreSystem.Entities; -namespace Moonlight.App.Event.Args; +namespace Moonlight.Core.Event.Args; public class TransactionCreatedEventArgs { diff --git a/Moonlight/App/Event/Events.cs b/Moonlight/Core/Event/Events.cs similarity index 79% rename from Moonlight/App/Event/Events.cs rename to Moonlight/Core/Event/Events.cs index 7ee34f8..9f3f38a 100644 --- a/Moonlight/App/Event/Events.cs +++ b/Moonlight/Core/Event/Events.cs @@ -1,10 +1,10 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Community; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Database.Entities.Tickets; -using Moonlight.App.Event.Args; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Event.Args; +using Moonlight.Features.Community.Entities; +using Moonlight.Features.ServiceManagement.Entities; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Event; +namespace Moonlight.Core.Event; public class Events { diff --git a/Moonlight/App/Exceptions/DisplayException.cs b/Moonlight/Core/Exceptions/DisplayException.cs similarity index 86% rename from Moonlight/App/Exceptions/DisplayException.cs rename to Moonlight/Core/Exceptions/DisplayException.cs index 5f2df09..cc8c04a 100644 --- a/Moonlight/App/Exceptions/DisplayException.cs +++ b/Moonlight/Core/Exceptions/DisplayException.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Exceptions; +namespace Moonlight.Core.Exceptions; public class DisplayException : Exception { diff --git a/Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs b/Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs similarity index 80% rename from Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs rename to Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs index e6d6db4..e409c43 100644 --- a/Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs +++ b/Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Extensions.Attributes; +namespace Moonlight.Core.Extensions.Attributes; public class RequirePermissionAttribute : Attribute { diff --git a/Moonlight/App/Extensions/Attributes/SelectorAttribute.cs b/Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs similarity index 79% rename from Moonlight/App/Extensions/Attributes/SelectorAttribute.cs rename to Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs index 308bfa8..4caf59a 100644 --- a/Moonlight/App/Extensions/Attributes/SelectorAttribute.cs +++ b/Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Extensions.Attributes; +namespace Moonlight.Core.Extensions.Attributes; public class SelectorAttribute : Attribute { diff --git a/Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs b/Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs similarity index 90% rename from Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs rename to Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs index 2ade456..89c69a6 100644 --- a/Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs +++ b/Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class ConfigurationBuilderExtensions { diff --git a/Moonlight/App/Extensions/EventHandlerExtensions.cs b/Moonlight/Core/Extensions/EventHandlerExtensions.cs similarity index 95% rename from Moonlight/App/Extensions/EventHandlerExtensions.cs rename to Moonlight/Core/Extensions/EventHandlerExtensions.cs index 31f5393..a070432 100644 --- a/Moonlight/App/Extensions/EventHandlerExtensions.cs +++ b/Moonlight/Core/Extensions/EventHandlerExtensions.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class EventHandlerExtensions { diff --git a/Moonlight/App/Extensions/ZipArchiveExtension.cs b/Moonlight/Core/Extensions/ZipArchiveExtension.cs similarity index 95% rename from Moonlight/App/Extensions/ZipArchiveExtension.cs rename to Moonlight/Core/Extensions/ZipArchiveExtension.cs index 9937e55..14be580 100644 --- a/Moonlight/App/Extensions/ZipArchiveExtension.cs +++ b/Moonlight/Core/Extensions/ZipArchiveExtension.cs @@ -1,7 +1,7 @@ using System.IO.Compression; using System.Text; -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class ZipArchiveExtension { diff --git a/Moonlight/App/Helpers/ComponentHelper.cs b/Moonlight/Core/Helpers/ComponentHelper.cs similarity index 95% rename from Moonlight/App/Helpers/ComponentHelper.cs rename to Moonlight/Core/Helpers/ComponentHelper.cs index 754bd6b..a8296d9 100644 --- a/Moonlight/App/Helpers/ComponentHelper.cs +++ b/Moonlight/Core/Helpers/ComponentHelper.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class ComponentHelper { diff --git a/Moonlight/App/Helpers/Formatter.cs b/Moonlight/Core/Helpers/Formatter.cs similarity index 99% rename from Moonlight/App/Helpers/Formatter.cs rename to Moonlight/Core/Helpers/Formatter.cs index dadf049..ce8c343 100644 --- a/Moonlight/App/Helpers/Formatter.cs +++ b/Moonlight/Core/Helpers/Formatter.cs @@ -1,7 +1,7 @@ using System.Text; using Microsoft.AspNetCore.Components; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class Formatter { diff --git a/Moonlight/App/Helpers/HashHelper.cs b/Moonlight/Core/Helpers/HashHelper.cs similarity index 99% rename from Moonlight/App/Helpers/HashHelper.cs rename to Moonlight/Core/Helpers/HashHelper.cs index 97458b8..9e5b46c 100644 --- a/Moonlight/App/Helpers/HashHelper.cs +++ b/Moonlight/Core/Helpers/HashHelper.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography; using Microsoft.AspNetCore.Cryptography.KeyDerivation; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; // Src: https://codereview.stackexchange.com/questions/176697/net-core-mvc-future-proof-hashing-of-passwords public static class HashHelper diff --git a/Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs b/Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs similarity index 78% rename from Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs rename to Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs index 5c2469f..9d7d4de 100644 --- a/Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs +++ b/Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers.LogMigrator; +namespace Moonlight.Core.Helpers.LogMigrator; public class LogMigrateProvider : ILoggerProvider { diff --git a/Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs b/Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs similarity index 96% rename from Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs rename to Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs index fb9100d..a0de98e 100644 --- a/Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs +++ b/Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers.LogMigrator; +namespace Moonlight.Core.Helpers.LogMigrator; public class MigrateLogger : ILogger { diff --git a/Moonlight/App/Helpers/Logger.cs b/Moonlight/Core/Helpers/Logger.cs similarity index 98% rename from Moonlight/App/Helpers/Logger.cs rename to Moonlight/Core/Helpers/Logger.cs index efce9e9..068ed3c 100644 --- a/Moonlight/App/Helpers/Logger.cs +++ b/Moonlight/Core/Helpers/Logger.cs @@ -2,7 +2,7 @@ using System.Reflection; using Serilog; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public class Logger { diff --git a/Moonlight/App/Helpers/PathBuilder.cs b/Moonlight/Core/Helpers/PathBuilder.cs similarity index 95% rename from Moonlight/App/Helpers/PathBuilder.cs rename to Moonlight/Core/Helpers/PathBuilder.cs index 8d1054c..5388208 100644 --- a/Moonlight/App/Helpers/PathBuilder.cs +++ b/Moonlight/Core/Helpers/PathBuilder.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class PathBuilder { diff --git a/Moonlight/App/Helpers/PropBinder.cs b/Moonlight/Core/Helpers/PropBinder.cs similarity index 97% rename from Moonlight/App/Helpers/PropBinder.cs rename to Moonlight/Core/Helpers/PropBinder.cs index 9d3d986..39b0c6d 100644 --- a/Moonlight/App/Helpers/PropBinder.cs +++ b/Moonlight/Core/Helpers/PropBinder.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public class PropBinder { diff --git a/Moonlight/App/Http/Controllers/Api/AssetProxyController.cs b/Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs similarity index 86% rename from Moonlight/App/Http/Controllers/Api/AssetProxyController.cs rename to Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs index a8650a3..e38b5a4 100644 --- a/Moonlight/App/Http/Controllers/Api/AssetProxyController.cs +++ b/Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs @@ -1,17 +1,16 @@ -using System.Text; using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Helpers; -using Moonlight.App.Services.Sys; +using Moonlight.Core.Helpers; +using Moonlight.Features.Theming.Services; -namespace Moonlight.App.Http.Controllers.Api; +namespace Moonlight.Core.Http.Controllers.Api; [ApiController] [Route("api/assetproxy")] public class AssetProxyController : Controller { - private readonly MoonlightThemeService ThemeService; + private readonly ThemeService ThemeService; - public AssetProxyController(MoonlightThemeService themeService) + public AssetProxyController(ThemeService themeService) { ThemeService = themeService; } diff --git a/Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs b/Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs similarity index 89% rename from Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs rename to Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs index 482da17..4905a55 100644 --- a/Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs +++ b/Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs @@ -1,11 +1,11 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Database.Entities; -using Moonlight.App.Models.Enums; -using Moonlight.App.Repositories; -using Moonlight.App.Services; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services; +using Moonlight.Core.Services.Utils; -namespace Moonlight.App.Http.Controllers.Api.Auth; +namespace Moonlight.Core.Http.Controllers.Api.Auth; [ApiController] [Route("api/auth/reset")] diff --git a/Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs b/Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs similarity index 87% rename from Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs rename to Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs index e2b19e2..518fb72 100644 --- a/Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs +++ b/Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs @@ -1,10 +1,10 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Enums; -using Moonlight.App.Services; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Services; +using Moonlight.Core.Services.Utils; -namespace Moonlight.App.Http.Controllers.Api.Auth; +namespace Moonlight.Core.Http.Controllers.Api.Auth; [ApiController] [Route("api/auth/verify")] diff --git a/Moonlight/App/Http/Controllers/Api/BucketController.cs b/Moonlight/Core/Http/Controllers/Api/BucketController.cs similarity index 89% rename from Moonlight/App/Http/Controllers/Api/BucketController.cs rename to Moonlight/Core/Http/Controllers/Api/BucketController.cs index ea38470..5525d4e 100644 --- a/Moonlight/App/Http/Controllers/Api/BucketController.cs +++ b/Moonlight/Core/Http/Controllers/Api/BucketController.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Helpers; -using Moonlight.App.Services; +using Moonlight.Core.Helpers; +using Moonlight.Core.Services; -namespace Moonlight.App.Http.Controllers.Api; +namespace Moonlight.Core.Http.Controllers.Api; [ApiController] [Route("api/bucket")] diff --git a/Moonlight/App/Models/Abstractions/FlagStorage.cs b/Moonlight/Core/Models/Abstractions/FlagStorage.cs similarity index 92% rename from Moonlight/App/Models/Abstractions/FlagStorage.cs rename to Moonlight/Core/Models/Abstractions/FlagStorage.cs index 7ec57b9..829dedf 100644 --- a/Moonlight/App/Models/Abstractions/FlagStorage.cs +++ b/Moonlight/Core/Models/Abstractions/FlagStorage.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class FlagStorage { diff --git a/Moonlight/App/Models/Abstractions/PermissionStorage.cs b/Moonlight/Core/Models/Abstractions/PermissionStorage.cs similarity index 89% rename from Moonlight/App/Models/Abstractions/PermissionStorage.cs rename to Moonlight/Core/Models/Abstractions/PermissionStorage.cs index 8a85b6f..78cf17f 100644 --- a/Moonlight/App/Models/Abstractions/PermissionStorage.cs +++ b/Moonlight/Core/Models/Abstractions/PermissionStorage.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class PermissionStorage { diff --git a/Moonlight/App/Models/Abstractions/Session.cs b/Moonlight/Core/Models/Abstractions/Session.cs similarity index 77% rename from Moonlight/App/Models/Abstractions/Session.cs rename to Moonlight/Core/Models/Abstractions/Session.cs index e076266..d4b6d93 100644 --- a/Moonlight/App/Models/Abstractions/Session.cs +++ b/Moonlight/Core/Models/Abstractions/Session.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities; +using Moonlight.Core.Database.Entities; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class Session { diff --git a/Moonlight/App/Models/Abstractions/Subscriber.cs b/Moonlight/Core/Models/Abstractions/Subscriber.cs similarity index 73% rename from Moonlight/App/Models/Abstractions/Subscriber.cs rename to Moonlight/Core/Models/Abstractions/Subscriber.cs index 97d4944..f752f33 100644 --- a/Moonlight/App/Models/Abstractions/Subscriber.cs +++ b/Moonlight/Core/Models/Abstractions/Subscriber.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class Subscriber { diff --git a/Moonlight/App/Models/Enums/Permission.cs b/Moonlight/Core/Models/Enums/Permission.cs similarity index 88% rename from Moonlight/App/Models/Enums/Permission.cs rename to Moonlight/Core/Models/Enums/Permission.cs index d342dde..11a0c4f 100644 --- a/Moonlight/App/Models/Enums/Permission.cs +++ b/Moonlight/Core/Models/Enums/Permission.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Enums; +namespace Moonlight.Core.Models.Enums; public enum Permission { diff --git a/Moonlight/App/Models/Enums/UserFlag.cs b/Moonlight/Core/Models/Enums/UserFlag.cs similarity index 64% rename from Moonlight/App/Models/Enums/UserFlag.cs rename to Moonlight/Core/Models/Enums/UserFlag.cs index d6fcd35..ef613a6 100644 --- a/Moonlight/App/Models/Enums/UserFlag.cs +++ b/Moonlight/Core/Models/Enums/UserFlag.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Enums; +namespace Moonlight.Core.Models.Enums; public enum UserFlag { diff --git a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs similarity index 92% rename from Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs rename to Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs index c8f092a..8682efe 100644 --- a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Admin.Users; +namespace Moonlight.Core.Models.Forms.Admin.Users; public class UpdateUserForm { diff --git a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs similarity index 87% rename from Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs rename to Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs index e6bfb7e..9136579 100644 --- a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Admin.Users; +namespace Moonlight.Core.Models.Forms.Admin.Users; public class UpdateUserPasswordForm { diff --git a/Moonlight/App/Models/Forms/Auth/LoginForm.cs b/Moonlight/Core/Models/Forms/Auth/LoginForm.cs similarity index 89% rename from Moonlight/App/Models/Forms/Auth/LoginForm.cs rename to Moonlight/Core/Models/Forms/Auth/LoginForm.cs index 32cd2be..7b414a4 100644 --- a/Moonlight/App/Models/Forms/Auth/LoginForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/LoginForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class LoginForm { diff --git a/Moonlight/App/Models/Forms/Auth/RegisterForm.cs b/Moonlight/Core/Models/Forms/Auth/RegisterForm.cs similarity index 96% rename from Moonlight/App/Models/Forms/Auth/RegisterForm.cs rename to Moonlight/Core/Models/Forms/Auth/RegisterForm.cs index b07fed6..6ebbde4 100644 --- a/Moonlight/App/Models/Forms/Auth/RegisterForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/RegisterForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class RegisterForm { diff --git a/Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs b/Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs similarity index 85% rename from Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs rename to Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs index 8bcca4a..6816728 100644 --- a/Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class ResetPasswordForm { diff --git a/Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs b/Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs similarity index 81% rename from Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs rename to Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs index ed84da3..88c7521 100644 --- a/Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class TwoFactorCodeForm { diff --git a/Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs b/Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs similarity index 93% rename from Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs rename to Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs index 09ec62d..9796e02 100644 --- a/Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class UpdateAccountForm { diff --git a/Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs b/Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs similarity index 93% rename from Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs rename to Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs index ed2b187..f8f6120 100644 --- a/Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class UpdateAccountPasswordForm { diff --git a/Moonlight/App/Models/Templates/MailVerify.cs b/Moonlight/Core/Models/Templates/MailVerify.cs similarity index 59% rename from Moonlight/App/Models/Templates/MailVerify.cs rename to Moonlight/Core/Models/Templates/MailVerify.cs index 9254253..7d90436 100644 --- a/Moonlight/App/Models/Templates/MailVerify.cs +++ b/Moonlight/Core/Models/Templates/MailVerify.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Templates; +namespace Moonlight.Core.Models.Templates; public class MailVerify { diff --git a/Moonlight/App/Models/Templates/ResetPassword.cs b/Moonlight/Core/Models/Templates/ResetPassword.cs similarity index 60% rename from Moonlight/App/Models/Templates/ResetPassword.cs rename to Moonlight/Core/Models/Templates/ResetPassword.cs index 46f0cd3..d06356b 100644 --- a/Moonlight/App/Models/Templates/ResetPassword.cs +++ b/Moonlight/Core/Models/Templates/ResetPassword.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Templates; +namespace Moonlight.Core.Models.Templates; public class ResetPassword { diff --git a/Moonlight/App/Plugins/Contexts/PluginContext.cs b/Moonlight/Core/Plugins/Contexts/PluginContext.cs similarity index 83% rename from Moonlight/App/Plugins/Contexts/PluginContext.cs rename to Moonlight/Core/Plugins/Contexts/PluginContext.cs index afdf874..f16b8d1 100644 --- a/Moonlight/App/Plugins/Contexts/PluginContext.cs +++ b/Moonlight/Core/Plugins/Contexts/PluginContext.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Features.ServiceManagement.Models.Abstractions; -namespace Moonlight.App.Plugins.Contexts; +namespace Moonlight.Core.Plugins.Contexts; public class PluginContext { diff --git a/Moonlight/App/Plugins/MoonlightPlugin.cs b/Moonlight/Core/Plugins/MoonlightPlugin.cs similarity index 67% rename from Moonlight/App/Plugins/MoonlightPlugin.cs rename to Moonlight/Core/Plugins/MoonlightPlugin.cs index b7d413e..b6f71c1 100644 --- a/Moonlight/App/Plugins/MoonlightPlugin.cs +++ b/Moonlight/Core/Plugins/MoonlightPlugin.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Plugins.Contexts; +using Moonlight.Core.Plugins.Contexts; -namespace Moonlight.App.Plugins; +namespace Moonlight.Core.Plugins; public abstract class MoonlightPlugin { diff --git a/Moonlight/App/Repositories/Repository.cs b/Moonlight/Core/Repositories/Repository.cs similarity index 92% rename from Moonlight/App/Repositories/Repository.cs rename to Moonlight/Core/Repositories/Repository.cs index 1c46f6a..874ea06 100644 --- a/Moonlight/App/Repositories/Repository.cs +++ b/Moonlight/Core/Repositories/Repository.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database; +using Moonlight.Core.Database; -namespace Moonlight.App.Repositories; +namespace Moonlight.Core.Repositories; public class Repository where TEntity : class { diff --git a/Moonlight/App/Services/Background/AutoMailSendService.cs b/Moonlight/Core/Services/Background/AutoMailSendService.cs similarity index 85% rename from Moonlight/App/Services/Background/AutoMailSendService.cs rename to Moonlight/Core/Services/Background/AutoMailSendService.cs index 12a3f4c..3cbff63 100644 --- a/Moonlight/App/Services/Background/AutoMailSendService.cs +++ b/Moonlight/Core/Services/Background/AutoMailSendService.cs @@ -1,9 +1,9 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Event; -using Moonlight.App.Event.Args; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Event; +using Moonlight.Core.Event.Args; +using Moonlight.Features.ServiceManagement.Entities; -namespace Moonlight.App.Services.Background; +namespace Moonlight.Core.Services.Background; public class AutoMailSendService // This service is responsible for sending mails automatically { diff --git a/Moonlight/App/Services/BucketService.cs b/Moonlight/Core/Services/BucketService.cs similarity index 97% rename from Moonlight/App/Services/BucketService.cs rename to Moonlight/Core/Services/BucketService.cs index ced7ccd..260d7e8 100644 --- a/Moonlight/App/Services/BucketService.cs +++ b/Moonlight/Core/Services/BucketService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class BucketService { diff --git a/Moonlight/App/Services/ConfigService.cs b/Moonlight/Core/Services/ConfigService.cs similarity index 96% rename from Moonlight/App/Services/ConfigService.cs rename to Moonlight/Core/Services/ConfigService.cs index e10553c..c8d0f67 100644 --- a/Moonlight/App/Services/ConfigService.cs +++ b/Moonlight/Core/Services/ConfigService.cs @@ -1,8 +1,8 @@ -using Moonlight.App.Configuration; -using Moonlight.App.Helpers; +using Moonlight.Core.Configuration; +using Moonlight.Core.Helpers; using Newtonsoft.Json; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class ConfigService { diff --git a/Moonlight/App/Services/IdentityService.cs b/Moonlight/Core/Services/IdentityService.cs similarity index 94% rename from Moonlight/App/Services/IdentityService.cs rename to Moonlight/Core/Services/IdentityService.cs index c31b303..7f21769 100644 --- a/Moonlight/App/Services/IdentityService.cs +++ b/Moonlight/Core/Services/IdentityService.cs @@ -1,15 +1,15 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Exceptions; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Enums; -using Moonlight.App.Repositories; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Exceptions; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Abstractions; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services.Utils; +using Moonlight.Features.StoreSystem.Entities; using OtpNet; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; // This service allows you to reauthenticate, login and force login // It does also contain the permission system accessor for the current user diff --git a/Moonlight/App/Services/Interop/AlertService.cs b/Moonlight/Core/Services/Interop/AlertService.cs similarity index 96% rename from Moonlight/App/Services/Interop/AlertService.cs rename to Moonlight/Core/Services/Interop/AlertService.cs index ee1f9f9..c66a221 100644 --- a/Moonlight/App/Services/Interop/AlertService.cs +++ b/Moonlight/Core/Services/Interop/AlertService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class AlertService { diff --git a/Moonlight/App/Services/Interop/CookieService.cs b/Moonlight/Core/Services/Interop/CookieService.cs similarity index 95% rename from Moonlight/App/Services/Interop/CookieService.cs rename to Moonlight/Core/Services/Interop/CookieService.cs index 2aa0ce0..d171174 100644 --- a/Moonlight/App/Services/Interop/CookieService.cs +++ b/Moonlight/Core/Services/Interop/CookieService.cs @@ -1,7 +1,6 @@ using Microsoft.JSInterop; -using Moonlight.App.Helpers; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class CookieService { diff --git a/Moonlight/App/Services/Interop/FileDownloadService.cs b/Moonlight/Core/Services/Interop/FileDownloadService.cs similarity index 95% rename from Moonlight/App/Services/Interop/FileDownloadService.cs rename to Moonlight/Core/Services/Interop/FileDownloadService.cs index 572417e..7b9b598 100644 --- a/Moonlight/App/Services/Interop/FileDownloadService.cs +++ b/Moonlight/Core/Services/Interop/FileDownloadService.cs @@ -1,7 +1,7 @@ using System.Text; using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class FileDownloadService { diff --git a/Moonlight/App/Services/Interop/ModalService.cs b/Moonlight/Core/Services/Interop/ModalService.cs similarity index 94% rename from Moonlight/App/Services/Interop/ModalService.cs rename to Moonlight/Core/Services/Interop/ModalService.cs index fcff73e..c9f8819 100644 --- a/Moonlight/App/Services/Interop/ModalService.cs +++ b/Moonlight/Core/Services/Interop/ModalService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class ModalService { diff --git a/Moonlight/App/Services/Interop/ToastService.cs b/Moonlight/Core/Services/Interop/ToastService.cs similarity index 97% rename from Moonlight/App/Services/Interop/ToastService.cs rename to Moonlight/Core/Services/Interop/ToastService.cs index 1128cc9..3e83dac 100644 --- a/Moonlight/App/Services/Interop/ToastService.cs +++ b/Moonlight/Core/Services/Interop/ToastService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class ToastService { diff --git a/Moonlight/App/Services/MailService.cs b/Moonlight/Core/Services/MailService.cs similarity index 96% rename from Moonlight/App/Services/MailService.cs rename to Moonlight/Core/Services/MailService.cs index b04c7fb..c025d27 100644 --- a/Moonlight/App/Services/MailService.cs +++ b/Moonlight/Core/Services/MailService.cs @@ -1,9 +1,9 @@ using MailKit.Net.Smtp; using MimeKit; -using Moonlight.App.Database.Entities; -using Moonlight.App.Helpers; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class MailService { diff --git a/Moonlight/App/Services/Sys/MoonlightService.cs b/Moonlight/Core/Services/MoonlightService.cs similarity index 90% rename from Moonlight/App/Services/Sys/MoonlightService.cs rename to Moonlight/Core/Services/MoonlightService.cs index f6fb628..44e6521 100644 --- a/Moonlight/App/Services/Sys/MoonlightService.cs +++ b/Moonlight/Core/Services/MoonlightService.cs @@ -1,9 +1,10 @@ using System.IO.Compression; -using Moonlight.App.Event; -using Moonlight.App.Extensions; -using Moonlight.App.Helpers; +using Moonlight.Core.Event; +using Moonlight.Core.Extensions; +using Moonlight.Core.Helpers; +using Moonlight.Features.Theming.Services; -namespace Moonlight.App.Services.Sys; +namespace Moonlight.Core.Services; public class MoonlightService // This service can be used to perform strictly panel specific actions { @@ -12,7 +13,7 @@ public class MoonlightService // This service can be used to perform strictly pa public WebApplication Application { get; set; } // Do NOT modify using a plugin public string LogPath { get; set; } // Do NOT modify using a plugin - public MoonlightThemeService Theme => ServiceProvider.GetRequiredService(); + public ThemeService Theme => ServiceProvider.GetRequiredService(); public MoonlightService(ConfigService configService, IServiceProvider serviceProvider) { diff --git a/Moonlight/App/Services/PluginService.cs b/Moonlight/Core/Services/PluginService.cs similarity index 93% rename from Moonlight/App/Services/PluginService.cs rename to Moonlight/Core/Services/PluginService.cs index 6cd608f..74f70a3 100644 --- a/Moonlight/App/Services/PluginService.cs +++ b/Moonlight/Core/Services/PluginService.cs @@ -1,13 +1,10 @@ using System.Reflection; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Abstractions.Services; -using Moonlight.App.Plugins; -using Moonlight.App.Plugins.Contexts; +using Moonlight.Core.Helpers; +using Moonlight.Core.Plugins; +using Moonlight.Core.Plugins.Contexts; +using Moonlight.Features.ServiceManagement.Models.Abstractions; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class PluginService { diff --git a/Moonlight/App/Services/SessionService.cs b/Moonlight/Core/Services/SessionService.cs similarity index 88% rename from Moonlight/App/Services/SessionService.cs rename to Moonlight/Core/Services/SessionService.cs index e013c3f..61c7adf 100644 --- a/Moonlight/App/Services/SessionService.cs +++ b/Moonlight/Core/Services/SessionService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Abstractions; +using Moonlight.Core.Models.Abstractions; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class SessionService { diff --git a/Moonlight/App/Services/Users/UserAuthService.cs b/Moonlight/Core/Services/Users/UserAuthService.cs similarity index 89% rename from Moonlight/App/Services/Users/UserAuthService.cs rename to Moonlight/Core/Services/Users/UserAuthService.cs index 4dd055d..78217cc 100644 --- a/Moonlight/App/Services/Users/UserAuthService.cs +++ b/Moonlight/Core/Services/Users/UserAuthService.cs @@ -1,16 +1,16 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Event; -using Moonlight.App.Exceptions; -using Moonlight.App.Extensions; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Enums; -using Moonlight.App.Models.Templates; -using Moonlight.App.Repositories; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Event; +using Moonlight.Core.Exceptions; +using Moonlight.Core.Extensions; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Abstractions; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Models.Templates; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services.Utils; using OtpNet; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserAuthService { diff --git a/Moonlight/App/Services/Users/UserDeleteService.cs b/Moonlight/Core/Services/Users/UserDeleteService.cs similarity index 93% rename from Moonlight/App/Services/Users/UserDeleteService.cs rename to Moonlight/Core/Services/Users/UserDeleteService.cs index 6280c16..07a31ac 100644 --- a/Moonlight/App/Services/Users/UserDeleteService.cs +++ b/Moonlight/Core/Services/Users/UserDeleteService.cs @@ -1,13 +1,14 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Community; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Database.Entities.Tickets; -using Moonlight.App.Repositories; -using Moonlight.App.Services.Community; -using Moonlight.App.Services.ServiceManage; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Repositories; +using Moonlight.Features.Community.Entities; +using Moonlight.Features.Community.Services; +using Moonlight.Features.ServiceManagement.Entities; +using Moonlight.Features.ServiceManagement.Services; +using Moonlight.Features.StoreSystem.Entities; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserDeleteService { diff --git a/Moonlight/App/Services/Users/UserDetailsService.cs b/Moonlight/Core/Services/Users/UserDetailsService.cs similarity index 89% rename from Moonlight/App/Services/Users/UserDetailsService.cs rename to Moonlight/Core/Services/Users/UserDetailsService.cs index f1070ff..96b3178 100644 --- a/Moonlight/App/Services/Users/UserDetailsService.cs +++ b/Moonlight/Core/Services/Users/UserDetailsService.cs @@ -1,7 +1,7 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserDetailsService { diff --git a/Moonlight/App/Services/Users/UserService.cs b/Moonlight/Core/Services/Users/UserService.cs similarity index 90% rename from Moonlight/App/Services/Users/UserService.cs rename to Moonlight/Core/Services/Users/UserService.cs index 4770545..798e849 100644 --- a/Moonlight/App/Services/Users/UserService.cs +++ b/Moonlight/Core/Services/Users/UserService.cs @@ -1,8 +1,8 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Exceptions; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Exceptions; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserService { diff --git a/Moonlight/App/Services/Utils/ConnectionService.cs b/Moonlight/Core/Services/Utils/ConnectionService.cs similarity index 94% rename from Moonlight/App/Services/Utils/ConnectionService.cs rename to Moonlight/Core/Services/Utils/ConnectionService.cs index 9f50591..e79e10b 100644 --- a/Moonlight/App/Services/Utils/ConnectionService.cs +++ b/Moonlight/Core/Services/Utils/ConnectionService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services.Utils; +namespace Moonlight.Core.Services.Utils; public class ConnectionService { diff --git a/Moonlight/App/Services/Utils/JwtService.cs b/Moonlight/Core/Services/Utils/JwtService.cs similarity index 96% rename from Moonlight/App/Services/Utils/JwtService.cs rename to Moonlight/Core/Services/Utils/JwtService.cs index 3021c1c..2712ea1 100644 --- a/Moonlight/App/Services/Utils/JwtService.cs +++ b/Moonlight/Core/Services/Utils/JwtService.cs @@ -1,9 +1,9 @@ using JWT.Algorithms; using JWT.Builder; -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; using Newtonsoft.Json; -namespace Moonlight.App.Services.Utils; +namespace Moonlight.Core.Services.Utils; public class JwtService { diff --git a/Moonlight/Shared/Components/Alerts/NotFoundAlert.razor b/Moonlight/Core/UI/Components/Alerts/NotFoundAlert.razor similarity index 100% rename from Moonlight/Shared/Components/Alerts/NotFoundAlert.razor rename to Moonlight/Core/UI/Components/Alerts/NotFoundAlert.razor diff --git a/Moonlight/Shared/Components/Alerts/RestartAlert.razor b/Moonlight/Core/UI/Components/Alerts/RestartAlert.razor similarity index 100% rename from Moonlight/Shared/Components/Alerts/RestartAlert.razor rename to Moonlight/Core/UI/Components/Alerts/RestartAlert.razor diff --git a/Moonlight/Shared/Components/Auth/ChangePassword.razor b/Moonlight/Core/UI/Components/Auth/ChangePassword.razor similarity index 90% rename from Moonlight/Shared/Components/Auth/ChangePassword.razor rename to Moonlight/Core/UI/Components/Auth/ChangePassword.razor index a509d08..58c8769 100644 --- a/Moonlight/Shared/Components/Auth/ChangePassword.razor +++ b/Moonlight/Core/UI/Components/Auth/ChangePassword.razor @@ -1,8 +1,9 @@ -@using Moonlight.App.Services -@using Moonlight.App.Services.Users -@using Moonlight.App.Models.Forms -@using Moonlight.App.Models.Enums -@using Moonlight.App.Models.Forms.Auth +@using Moonlight.Core.Models.Forms +@using Moonlight.Core.Exceptions +@using Moonlight.Core.Models.Enums +@using Moonlight.Core.Models.Forms.Auth +@using Moonlight.Core.Services +@using Moonlight.Core.Services.Users @inject IdentityService IdentityService @inject UserService UserService diff --git a/Moonlight/Shared/Components/Auth/Login.razor b/Moonlight/Core/UI/Components/Auth/Login.razor similarity index 94% rename from Moonlight/Shared/Components/Auth/Login.razor rename to Moonlight/Core/UI/Components/Auth/Login.razor index 41c4b4b..a4520e2 100644 --- a/Moonlight/Shared/Components/Auth/Login.razor +++ b/Moonlight/Core/UI/Components/Auth/Login.razor @@ -1,9 +1,9 @@ @page "/login" @* Virtual route to trick blazor *@ - -@using Moonlight.App.Services -@using Moonlight.App.Models.Forms -@using Moonlight.App.Models.Forms.Auth +@using Moonlight.Core.Models.Forms +@using Moonlight.Core.Models.Forms.Auth +@using Moonlight.Core.Services +@using Moonlight.Core.Services.Interop @inject IdentityService IdentityService @inject CookieService CookieService diff --git a/Moonlight/Shared/Components/Auth/MailVerify.razor b/Moonlight/Core/UI/Components/Auth/MailVerify.razor similarity index 94% rename from Moonlight/Shared/Components/Auth/MailVerify.razor rename to Moonlight/Core/UI/Components/Auth/MailVerify.razor index b80bca7..cf5ddf6 100644 --- a/Moonlight/Shared/Components/Auth/MailVerify.razor +++ b/Moonlight/Core/UI/Components/Auth/MailVerify.razor @@ -1,6 +1,5 @@ -@using Moonlight.App.Services.Users -@using Moonlight.App.Services - +@using Moonlight.Core.Services.Users +@using Moonlight.Core.Services @inject UserService UserService @inject IdentityService IdentityService diff --git a/Moonlight/Shared/Components/Auth/PasswordReset.razor b/Moonlight/Core/UI/Components/Auth/PasswordReset.razor similarity index 93% rename from Moonlight/Shared/Components/Auth/PasswordReset.razor rename to Moonlight/Core/UI/Components/Auth/PasswordReset.razor index 946dd39..f842c47 100644 --- a/Moonlight/Shared/Components/Auth/PasswordReset.razor +++ b/Moonlight/Core/UI/Components/Auth/PasswordReset.razor @@ -1,8 +1,7 @@ @page "/password-reset" - -@using Moonlight.App.Services.Users -@using Moonlight.App.Models.Forms -@using Moonlight.App.Models.Forms.Auth +@using Moonlight.Core.Models.Forms +@using Moonlight.Core.Models.Forms.Auth +@using Moonlight.Core.Services.Users @inject UserService UserService diff --git a/Moonlight/Shared/Components/Auth/Register.razor b/Moonlight/Core/UI/Components/Auth/Register.razor similarity index 92% rename from Moonlight/Shared/Components/Auth/Register.razor rename to Moonlight/Core/UI/Components/Auth/Register.razor index a685ca1..6999763 100644 --- a/Moonlight/Shared/Components/Auth/Register.razor +++ b/Moonlight/Core/UI/Components/Auth/Register.razor @@ -1,11 +1,11 @@ @page "/register" @* Virtual route to trick blazor *@ - -@using Moonlight.App.Services -@using Moonlight.App.Models.Forms -@using Moonlight.App.Services.Users -@using Moonlight.App.Exceptions -@using Moonlight.App.Models.Forms.Auth +@using Moonlight.Core.Models.Forms +@using Moonlight.Core.Exceptions +@using Moonlight.Core.Models.Forms.Auth +@using Moonlight.Core.Services +@using Moonlight.Core.Services.Interop +@using Moonlight.Core.Services.Users @inject IdentityService IdentityService @inject UserService UserService diff --git a/Moonlight/Shared/Components/Forms/AutoCrud.razor b/Moonlight/Core/UI/Components/Forms/AutoCrud.razor similarity index 99% rename from Moonlight/Shared/Components/Forms/AutoCrud.razor rename to Moonlight/Core/UI/Components/Forms/AutoCrud.razor index dfad589..0cdd39c 100644 --- a/Moonlight/Shared/Components/Forms/AutoCrud.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoCrud.razor @@ -1,7 +1,8 @@ @using BlazorTable -@using Moonlight.App.Repositories @using System.Linq.Expressions @using Mappy.Net +@using Moonlight.Core.Repositories +@using Moonlight.Core.Services.Interop @typeparam TItem where TItem : class @typeparam TCreateForm diff --git a/Moonlight/Shared/Components/Forms/AutoForm.razor b/Moonlight/Core/UI/Components/Forms/AutoForm.razor similarity index 93% rename from Moonlight/Shared/Components/Forms/AutoForm.razor rename to Moonlight/Core/UI/Components/Forms/AutoForm.razor index 3135cf1..b3d248e 100644 --- a/Moonlight/Shared/Components/Forms/AutoForm.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoForm.razor @@ -1,5 +1,4 @@ -@using Moonlight.App.Extensions - +@using Moonlight.Core.Helpers @typeparam TForm @foreach (var prop in typeof(TForm).GetProperties()) diff --git a/Moonlight/Shared/Components/Forms/AutoProperty.razor b/Moonlight/Core/UI/Components/Forms/AutoProperty.razor similarity index 97% rename from Moonlight/Shared/Components/Forms/AutoProperty.razor rename to Moonlight/Core/UI/Components/Forms/AutoProperty.razor index 202b542..71afe7e 100644 --- a/Moonlight/Shared/Components/Forms/AutoProperty.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoProperty.razor @@ -1,8 +1,9 @@ @using System.Reflection @using System.ComponentModel @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Extensions.Attributes -@using Moonlight.App.Repositories +@using Moonlight.Core.Extensions.Attributes +@using Moonlight.Core.Helpers +@using Moonlight.Core.Repositories @typeparam TProp @inject IServiceProvider ServiceProvider diff --git a/Moonlight/Shared/Components/Forms/ConfirmButton.razor b/Moonlight/Core/UI/Components/Forms/ConfirmButton.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/ConfirmButton.razor rename to Moonlight/Core/UI/Components/Forms/ConfirmButton.razor diff --git a/Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor b/Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor similarity index 90% rename from Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor rename to Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor index 2504763..cd91812 100644 --- a/Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor +++ b/Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor @@ -1,4 +1,5 @@ -@{ +@using Moonlight.Core.Helpers +@{ var typeToCreate = typeof(AutoForm<>).MakeGenericType(Model.GetType()); var rf = ComponentHelper.FromType(typeToCreate, parameter => { diff --git a/Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor similarity index 95% rename from Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor index 1cb6a67..0897bba 100644 --- a/Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor @@ -1,4 +1,6 @@ @using Microsoft.AspNetCore.Components.Forms +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services.Interop @inject ToastService ToastService diff --git a/Moonlight/Shared/Components/Forms/SmartDropdown.razor b/Moonlight/Core/UI/Components/Forms/SmartDropdown.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartDropdown.razor rename to Moonlight/Core/UI/Components/Forms/SmartDropdown.razor diff --git a/Moonlight/Shared/Components/Forms/SmartEnumSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartEnumSelect.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartEnumSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartEnumSelect.razor diff --git a/Moonlight/Shared/Components/Forms/SmartFileSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor similarity index 95% rename from Moonlight/Shared/Components/Forms/SmartFileSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor index f084821..a78f288 100644 --- a/Moonlight/Shared/Components/Forms/SmartFileSelect.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor @@ -1,4 +1,6 @@ @using Microsoft.AspNetCore.Components.Forms +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services.Interop @inject ToastService ToastService diff --git a/Moonlight/Shared/Components/Forms/SmartForm.razor b/Moonlight/Core/UI/Components/Forms/SmartForm.razor similarity index 98% rename from Moonlight/Shared/Components/Forms/SmartForm.razor rename to Moonlight/Core/UI/Components/Forms/SmartForm.razor index f78d4fa..f022818 100644 --- a/Moonlight/Shared/Components/Forms/SmartForm.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartForm.razor @@ -1,5 +1,5 @@ @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Exceptions +@using Moonlight.Core.Exceptions
diff --git a/Moonlight/Shared/Components/Forms/SmartSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartSelect.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartSelect.razor diff --git a/Moonlight/Shared/Components/Forms/TextEditor.razor b/Moonlight/Core/UI/Components/Forms/TextEditor.razor similarity index 99% rename from Moonlight/Shared/Components/Forms/TextEditor.razor rename to Moonlight/Core/UI/Components/Forms/TextEditor.razor index 54e1f59..1496278 100644 --- a/Moonlight/Shared/Components/Forms/TextEditor.razor +++ b/Moonlight/Core/UI/Components/Forms/TextEditor.razor @@ -1,7 +1,8 @@ @inject IJSRuntime JsRuntime @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Services @using Ganss.Xss +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services @inherits InputBase @inject IdentityService IdentityService diff --git a/Moonlight/Shared/Components/Forms/WButton.razor b/Moonlight/Core/UI/Components/Forms/WButton.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/WButton.razor rename to Moonlight/Core/UI/Components/Forms/WButton.razor diff --git a/Moonlight/Shared/Components/Navigations/AccountNavigation.razor b/Moonlight/Core/UI/Components/Navigations/AccountNavigation.razor similarity index 100% rename from Moonlight/Shared/Components/Navigations/AccountNavigation.razor rename to Moonlight/Core/UI/Components/Navigations/AccountNavigation.razor diff --git a/Moonlight/Shared/Components/Navigations/AdminSysNavigation.razor b/Moonlight/Core/UI/Components/Navigations/AdminSysNavigation.razor similarity index 100% rename from Moonlight/Shared/Components/Navigations/AdminSysNavigation.razor rename to Moonlight/Core/UI/Components/Navigations/AdminSysNavigation.razor diff --git a/Moonlight/Shared/Components/Navigations/AdminUsersNavigation.razor b/Moonlight/Core/UI/Components/Navigations/AdminUsersNavigation.razor similarity index 100% rename from Moonlight/Shared/Components/Navigations/AdminUsersNavigation.razor rename to Moonlight/Core/UI/Components/Navigations/AdminUsersNavigation.razor diff --git a/Moonlight/Shared/Components/Partials/ConnectionIndicator.razor b/Moonlight/Core/UI/Components/Partials/ConnectionIndicator.razor similarity index 100% rename from Moonlight/Shared/Components/Partials/ConnectionIndicator.razor rename to Moonlight/Core/UI/Components/Partials/ConnectionIndicator.razor diff --git a/Moonlight/Shared/Components/Partials/LazyLoader.razor b/Moonlight/Core/UI/Components/Partials/LazyLoader.razor similarity index 100% rename from Moonlight/Shared/Components/Partials/LazyLoader.razor rename to Moonlight/Core/UI/Components/Partials/LazyLoader.razor diff --git a/Moonlight/Shared/Components/Partials/PageHeader.razor b/Moonlight/Core/UI/Components/Partials/PageHeader.razor similarity index 97% rename from Moonlight/Shared/Components/Partials/PageHeader.razor rename to Moonlight/Core/UI/Components/Partials/PageHeader.razor index d688771..fd99072 100644 --- a/Moonlight/Shared/Components/Partials/PageHeader.razor +++ b/Moonlight/Core/UI/Components/Partials/PageHeader.razor @@ -1,5 +1,6 @@ -@using Moonlight.Shared.Layouts -@using Moonlight.App.Services +@using Moonlight.Core.Services +@using Moonlight.Core.Services.Interop +@using Moonlight.Core.UI.Layouts @inject IdentityService IdentityService @inject ConfigService ConfigService diff --git a/Moonlight/Shared/Components/Partials/PermissionChecker.razor b/Moonlight/Core/UI/Components/Partials/PermissionChecker.razor similarity index 92% rename from Moonlight/Shared/Components/Partials/PermissionChecker.razor rename to Moonlight/Core/UI/Components/Partials/PermissionChecker.razor index 227be23..7b366f6 100644 --- a/Moonlight/Shared/Components/Partials/PermissionChecker.razor +++ b/Moonlight/Core/UI/Components/Partials/PermissionChecker.razor @@ -1,7 +1,6 @@ -@using Moonlight.App.Extensions.Attributes -@using Moonlight.App.Models.Abstractions -@using Moonlight.App.Services - +@using Moonlight.Core.Extensions.Attributes +@using Moonlight.Core.Models.Abstractions +@using Moonlight.Core.Services @inject IdentityService IdentityService @if (Allowed) diff --git a/Moonlight/Shared/Components/Partials/Sidebar.razor b/Moonlight/Core/UI/Components/Partials/Sidebar.razor similarity index 96% rename from Moonlight/Shared/Components/Partials/Sidebar.razor rename to Moonlight/Core/UI/Components/Partials/Sidebar.razor index e21c3e9..f03f3b4 100644 --- a/Moonlight/Shared/Components/Partials/Sidebar.razor +++ b/Moonlight/Core/UI/Components/Partials/Sidebar.razor @@ -1,6 +1,6 @@ -@using Moonlight.Shared.Layouts -@using Moonlight.App.Services -@using Moonlight.App.Models.Enums +@using Moonlight.Core.Services +@using Moonlight.Core.Models.Enums +@using Moonlight.Core.UI.Layouts @inject IdentityService IdentityService @@ -11,7 +11,7 @@
-
+