Merge pull request #362 from Moonlight-Panel/v2_RestructureTry2

Restructured whole v2 project to be easier to develop new features
This commit is contained in:
Marcel Baumgartner 2024-01-26 17:02:30 +01:00 committed by GitHub
commit 19001e5836
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
238 changed files with 1198 additions and 1070 deletions

View file

@ -1,7 +0,0 @@
namespace Moonlight.App.Database.Entities.Store;
public class ServiceShare
{
public int Id { get; set; }
public User User { get; set; }
}

View file

@ -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);
}

View file

@ -1,4 +1,4 @@
@using Moonlight.Shared.Layouts @using Moonlight.Core.UI.Layouts
<Router AppAssembly="@typeof(BlazorApp).Assembly"> <Router AppAssembly="@typeof(BlazorApp).Assembly">
<Found Context="routeData"> <Found Context="routeData">

View file

@ -1,8 +1,7 @@
using Moonlight.App.Database.Entities.Store; using Moonlight.Features.ServiceManagement.Entities;
using Moonlight.App.Models.Abstractions; using Moonlight.Features.ServiceManagement.Models.Abstractions;
using Moonlight.App.Models.Abstractions.Services;
namespace Moonlight.App.Actions.Dummy; namespace Moonlight.Core.Actions.Dummy;
public class DummyActions : ServiceActions public class DummyActions : ServiceActions
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel; using System.ComponentModel;
namespace Moonlight.App.Actions.Dummy; namespace Moonlight.Core.Actions.Dummy;
public class DummyConfig public class DummyConfig
{ {

View file

@ -1,9 +1,9 @@
using Moonlight.App.Actions.Dummy.Layouts; using Moonlight.Core.Actions.Dummy.Layouts;
using Moonlight.App.Actions.Dummy.Pages; using Moonlight.Core.Actions.Dummy.Pages;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Moonlight.App.Models.Abstractions.Services; using Moonlight.Features.ServiceManagement.Models.Abstractions;
namespace Moonlight.App.Actions.Dummy; namespace Moonlight.Core.Actions.Dummy;
public class DummyServiceDefinition : ServiceDefinition public class DummyServiceDefinition : ServiceDefinition
{ {

View file

@ -1,8 +1,11 @@
using System.ComponentModel; 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; using Newtonsoft.Json;
namespace Moonlight.App.Configuration; namespace Moonlight.Core.Configuration;
public class ConfigV1 public class ConfigV1
{ {
@ -19,24 +22,6 @@ public class ConfigV1
[JsonProperty("Theme")] public ThemeData Theme { get; set; } = new(); [JsonProperty("Theme")] public ThemeData Theme { get; set; } = new();
[JsonProperty("Advertisement")] public AdvertisementData Advertisement { 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 public class SecurityData
{ {
[JsonProperty("Token")] [JsonProperty("Token")]

View file

@ -1,11 +1,13 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Community; using Moonlight.Core.Services;
using Moonlight.App.Database.Entities.Store; using Moonlight.Features.Community.Entities;
using Moonlight.App.Database.Entities.Tickets; using Moonlight.Features.ServiceManagement.Entities;
using Moonlight.App.Services; 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 public class DataContext : DbContext
{ {

View file

@ -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 public class User
{ {

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231013200303_AddedUser")] [Migration("20231013200303_AddedUser")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedUser : Migration public partial class AddedUser : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231017075519_AddStoreModels")] [Migration("20231017075519_AddStoreModels")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -80,7 +81,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -101,7 +102,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -117,7 +118,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -203,7 +204,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -224,7 +225,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -266,9 +267,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -277,9 +278,9 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -288,24 +289,24 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId"); .HasForeignKey("CategoryId");
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -316,13 +317,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -331,7 +332,7 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); b.Navigation("User");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddStoreModels : Migration public partial class AddStoreModels : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231018203522_AddedUserStoreData")] [Migration("20231018203522_AddedUserStoreData")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -279,39 +280,39 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -320,15 +321,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -339,13 +340,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -354,12 +355,12 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); b.Navigation("User");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedUserStoreData : Migration public partial class AddedUserStoreData : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231018204737_AddedTransactions")] [Migration("20231018204737_AddedTransactions")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -257,7 +258,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -302,39 +303,39 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -343,15 +344,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -362,13 +363,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -377,19 +378,19 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedTransactions : Migration public partial class AddedTransactions : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231027105412_AddPostsModels")] [Migration("20231027105412_AddPostsModels")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -131,7 +132,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -152,7 +153,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -173,7 +174,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -194,7 +195,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -215,7 +216,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -265,7 +266,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -301,7 +302,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -322,7 +323,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -345,7 +346,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -390,9 +391,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -401,28 +402,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -431,39 +432,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -472,15 +473,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -491,13 +492,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -506,26 +507,26 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddPostsModels : Migration public partial class AddPostsModels : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231028214520_AddedWordFilter")] [Migration("20231028214520_AddedWordFilter")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("WordFilters"); b.ToTable("WordFilters");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -405,9 +406,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -416,28 +417,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -446,39 +447,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -487,15 +488,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -506,13 +507,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -521,26 +522,26 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedWordFilter : Migration public partial class AddedWordFilter : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231101161843_AddedTicketModels")] [Migration("20231101161843_AddedTicketModels")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("WordFilters"); b.ToTable("WordFilters");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -402,7 +403,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Tickets"); b.ToTable("Tickets");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -436,7 +437,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("TicketMessages"); b.ToTable("TicketMessages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -481,9 +482,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -492,28 +493,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -522,39 +523,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -563,15 +564,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -582,13 +583,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -597,22 +598,22 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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() .WithMany()
.HasForeignKey("CreatorId") .HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
.WithMany() .WithMany()
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
@ -621,37 +622,37 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Service"); 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() .WithMany()
.HasForeignKey("SenderId"); .HasForeignKey("SenderId");
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
.WithMany("Messages") .WithMany("Messages")
.HasForeignKey("TicketId"); .HasForeignKey("TicketId");
b.Navigation("Sender"); 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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Navigation("Messages"); b.Navigation("Messages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedTicketModels : Migration public partial class AddedTicketModels : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20231222100225_AddThemeModel")] [Migration("20231222100225_AddThemeModel")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("WordFilters"); b.ToTable("WordFilters");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Themes"); b.ToTable("Themes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Tickets"); b.ToTable("Tickets");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("TicketMessages"); b.ToTable("TicketMessages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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() .WithMany()
.HasForeignKey("CreatorId") .HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
.WithMany() .WithMany()
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Service"); 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() .WithMany()
.HasForeignKey("SenderId"); .HasForeignKey("SenderId");
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
.WithMany("Messages") .WithMany("Messages")
.HasForeignKey("TicketId"); .HasForeignKey("TicketId");
b.Navigation("Sender"); 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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Navigation("Messages"); b.Navigation("Messages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -2,7 +2,7 @@
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddThemeModel : Migration public partial class AddThemeModel : Migration

View file

@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20240119090835_AddedTransactionDate")] [Migration("20240119090835_AddedTransactionDate")]
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("WordFilters"); b.ToTable("WordFilters");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -363,7 +364,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -395,7 +396,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Themes"); b.ToTable("Themes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -437,7 +438,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Tickets"); b.ToTable("Tickets");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -471,7 +472,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("TicketMessages"); b.ToTable("TicketMessages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -516,9 +517,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -527,28 +528,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -557,39 +558,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -598,15 +599,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -617,13 +618,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -632,22 +633,22 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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() .WithMany()
.HasForeignKey("CreatorId") .HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
.WithMany() .WithMany()
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
@ -656,37 +657,37 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Service"); 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() .WithMany()
.HasForeignKey("SenderId"); .HasForeignKey("SenderId");
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
.WithMany("Messages") .WithMany("Messages")
.HasForeignKey("TicketId"); .HasForeignKey("TicketId");
b.Navigation("Sender"); 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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Navigation("Messages"); b.Navigation("Messages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddedTransactionDate : Migration public partial class AddedTransactionDate : Migration

View file

@ -3,11 +3,12 @@ using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Moonlight.App.Database; using Moonlight.Core.Database;
using Moonlight.Core.Database;
#nullable disable #nullable disable
namespace Moonlight.App.Database.Migrations namespace Moonlight.Core.Database.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
partial class DataContextModelSnapshot : ModelSnapshot partial class DataContextModelSnapshot : ModelSnapshot
@ -17,7 +18,7 @@ namespace Moonlight.App.Database.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); 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<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -50,7 +51,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Posts"); b.ToTable("Posts");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -81,7 +82,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostComments"); b.ToTable("PostComments");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -105,7 +106,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("PostLikes"); b.ToTable("PostLikes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -120,7 +121,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("WordFilters"); b.ToTable("WordFilters");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -143,7 +144,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Categories"); b.ToTable("Categories");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -164,7 +165,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Coupons"); b.ToTable("Coupons");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -185,7 +186,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("CouponUses"); b.ToTable("CouponUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -206,7 +207,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodes"); b.ToTable("GiftCodes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -227,7 +228,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("GiftCodeUses"); b.ToTable("GiftCodeUses");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -277,7 +278,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Products"); b.ToTable("Products");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -313,7 +314,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Services"); b.ToTable("Services");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -334,7 +335,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("ServiceShares"); b.ToTable("ServiceShares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Transaction"); b.ToTable("Transaction");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Themes"); b.ToTable("Themes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Tickets"); b.ToTable("Tickets");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("TicketMessages"); b.ToTable("TicketMessages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations
b.ToTable("Users"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Author"); 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() .WithMany()
.HasForeignKey("AuthorId") .HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
.WithMany("Comments") .WithMany("Comments")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.Navigation("Author"); 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") .WithMany("Likes")
.HasForeignKey("PostId"); .HasForeignKey("PostId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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() .WithMany()
.HasForeignKey("CouponId") .HasForeignKey("CouponId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("CouponUses") .WithMany("CouponUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("Coupon"); 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() .WithMany()
.HasForeignKey("GiftCodeId") .HasForeignKey("GiftCodeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.User", null) b.HasOne("Moonlight.Core.Database.Entities.User", null)
.WithMany("GiftCodeUses") .WithMany("GiftCodeUses")
.HasForeignKey("UserId"); .HasForeignKey("UserId");
b.Navigation("GiftCode"); 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() .WithMany()
.HasForeignKey("CategoryId") .HasForeignKey("CategoryId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Category"); 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() .WithMany()
.HasForeignKey("OwnerId") .HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
.WithMany() .WithMany()
.HasForeignKey("ProductId") .HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Product"); 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") .WithMany("Shares")
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
b.HasOne("Moonlight.App.Database.Entities.User", "User") b.HasOne("Moonlight.Core.Database.Entities.User", "User")
.WithMany() .WithMany()
.HasForeignKey("UserId") .HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("User"); 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") .WithMany("Transactions")
.HasForeignKey("UserId"); .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() .WithMany()
.HasForeignKey("CreatorId") .HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
.WithMany() .WithMany()
.HasForeignKey("ServiceId"); .HasForeignKey("ServiceId");
@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations
b.Navigation("Service"); 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() .WithMany()
.HasForeignKey("SenderId"); .HasForeignKey("SenderId");
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
.WithMany("Messages") .WithMany("Messages")
.HasForeignKey("TicketId"); .HasForeignKey("TicketId");
b.Navigation("Sender"); 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("Comments");
b.Navigation("Likes"); b.Navigation("Likes");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
{ {
b.Navigation("Shares"); b.Navigation("Shares");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
{ {
b.Navigation("Messages"); b.Navigation("Messages");
}); });
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
{ {
b.Navigation("CouponUses"); b.Navigation("CouponUses");

View file

@ -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 public class MailVerificationEventArgs
{ {

View file

@ -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 public class TicketMessageEventArgs
{ {

View file

@ -1,7 +1,7 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Store; using Moonlight.Features.StoreSystem.Entities;
namespace Moonlight.App.Event.Args; namespace Moonlight.Core.Event.Args;
public class TransactionCreatedEventArgs public class TransactionCreatedEventArgs
{ {

View file

@ -1,10 +1,10 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Community; using Moonlight.Core.Event.Args;
using Moonlight.App.Database.Entities.Store; using Moonlight.Features.Community.Entities;
using Moonlight.App.Database.Entities.Tickets; using Moonlight.Features.ServiceManagement.Entities;
using Moonlight.App.Event.Args; using Moonlight.Features.Ticketing.Entities;
namespace Moonlight.App.Event; namespace Moonlight.Core.Event;
public class Events public class Events
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Exceptions; namespace Moonlight.Core.Exceptions;
public class DisplayException : Exception public class DisplayException : Exception
{ {

View file

@ -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 public class RequirePermissionAttribute : Attribute
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Extensions.Attributes; namespace Moonlight.Core.Extensions.Attributes;
public class SelectorAttribute : Attribute public class SelectorAttribute : Attribute
{ {

View file

@ -1,6 +1,6 @@
using System.Text; using System.Text;
namespace Moonlight.App.Extensions; namespace Moonlight.Core.Extensions;
public static class ConfigurationBuilderExtensions public static class ConfigurationBuilderExtensions
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Extensions; namespace Moonlight.Core.Extensions;
public static class EventHandlerExtensions public static class EventHandlerExtensions
{ {

View file

@ -1,7 +1,7 @@
using System.IO.Compression; using System.IO.Compression;
using System.Text; using System.Text;
namespace Moonlight.App.Extensions; namespace Moonlight.Core.Extensions;
public static class ZipArchiveExtension public static class ZipArchiveExtension
{ {

View file

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace Moonlight.App.Helpers; namespace Moonlight.Core.Helpers;
public static class ComponentHelper public static class ComponentHelper
{ {

View file

@ -1,7 +1,7 @@
using System.Text; using System.Text;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
namespace Moonlight.App.Helpers; namespace Moonlight.Core.Helpers;
public static class Formatter public static class Formatter
{ {

View file

@ -1,7 +1,7 @@
using System.Security.Cryptography; using System.Security.Cryptography;
using Microsoft.AspNetCore.Cryptography.KeyDerivation; 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 // Src: https://codereview.stackexchange.com/questions/176697/net-core-mvc-future-proof-hashing-of-passwords
public static class HashHelper public static class HashHelper

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Helpers.LogMigrator; namespace Moonlight.Core.Helpers.LogMigrator;
public class LogMigrateProvider : ILoggerProvider public class LogMigrateProvider : ILoggerProvider
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Helpers.LogMigrator; namespace Moonlight.Core.Helpers.LogMigrator;
public class MigrateLogger : ILogger public class MigrateLogger : ILogger
{ {

View file

@ -2,7 +2,7 @@
using System.Reflection; using System.Reflection;
using Serilog; using Serilog;
namespace Moonlight.App.Helpers; namespace Moonlight.Core.Helpers;
public class Logger public class Logger
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Helpers; namespace Moonlight.Core.Helpers;
public static class PathBuilder public static class PathBuilder
{ {

View file

@ -1,6 +1,6 @@
using System.Reflection; using System.Reflection;
namespace Moonlight.App.Helpers; namespace Moonlight.Core.Helpers;
public class PropBinder<T> public class PropBinder<T>
{ {

View file

@ -1,17 +1,16 @@
using System.Text;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Moonlight.App.Services.Sys; using Moonlight.Features.Theming.Services;
namespace Moonlight.App.Http.Controllers.Api; namespace Moonlight.Core.Http.Controllers.Api;
[ApiController] [ApiController]
[Route("api/assetproxy")] [Route("api/assetproxy")]
public class AssetProxyController : Controller public class AssetProxyController : Controller
{ {
private readonly MoonlightThemeService ThemeService; private readonly ThemeService ThemeService;
public AssetProxyController(MoonlightThemeService themeService) public AssetProxyController(ThemeService themeService)
{ {
ThemeService = themeService; ThemeService = themeService;
} }

View file

@ -1,11 +1,11 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Models.Enums; using Moonlight.Core.Models.Enums;
using Moonlight.App.Repositories; using Moonlight.Core.Repositories;
using Moonlight.App.Services; using Moonlight.Core.Services;
using Moonlight.App.Services.Utils; using Moonlight.Core.Services.Utils;
namespace Moonlight.App.Http.Controllers.Api.Auth; namespace Moonlight.Core.Http.Controllers.Api.Auth;
[ApiController] [ApiController]
[Route("api/auth/reset")] [Route("api/auth/reset")]

View file

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Moonlight.App.Models.Enums; using Moonlight.Core.Models.Enums;
using Moonlight.App.Services; using Moonlight.Core.Services;
using Moonlight.App.Services.Utils; using Moonlight.Core.Services.Utils;
namespace Moonlight.App.Http.Controllers.Api.Auth; namespace Moonlight.Core.Http.Controllers.Api.Auth;
[ApiController] [ApiController]
[Route("api/auth/verify")] [Route("api/auth/verify")]

View file

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Moonlight.App.Services; using Moonlight.Core.Services;
namespace Moonlight.App.Http.Controllers.Api; namespace Moonlight.Core.Http.Controllers.Api;
[ApiController] [ApiController]
[Route("api/bucket")] [Route("api/bucket")]

View file

@ -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 public class FlagStorage
{ {

View file

@ -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 public class PermissionStorage
{ {

View file

@ -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 public class Session
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Models.Abstractions; namespace Moonlight.Core.Models.Abstractions;
public class Subscriber public class Subscriber
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Models.Enums; namespace Moonlight.Core.Models.Enums;
public enum Permission public enum Permission
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Models.Enums; namespace Moonlight.Core.Models.Enums;
public enum UserFlag public enum UserFlag
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Admin.Users; namespace Moonlight.Core.Models.Forms.Admin.Users;
public class UpdateUserForm public class UpdateUserForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Admin.Users; namespace Moonlight.Core.Models.Forms.Admin.Users;
public class UpdateUserPasswordForm public class UpdateUserPasswordForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class LoginForm public class LoginForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class RegisterForm public class RegisterForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class ResetPasswordForm public class ResetPasswordForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class TwoFactorCodeForm public class TwoFactorCodeForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class UpdateAccountForm public class UpdateAccountForm
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Moonlight.App.Models.Forms.Auth; namespace Moonlight.Core.Models.Forms.Auth;
public class UpdateAccountPasswordForm public class UpdateAccountPasswordForm
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Models.Templates; namespace Moonlight.Core.Models.Templates;
public class MailVerify public class MailVerify
{ {

View file

@ -1,4 +1,4 @@
namespace Moonlight.App.Models.Templates; namespace Moonlight.Core.Models.Templates;
public class ResetPassword public class ResetPassword
{ {

View file

@ -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 public class PluginContext
{ {

View file

@ -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 public abstract class MoonlightPlugin
{ {

View file

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Moonlight.App.Database; using Moonlight.Core.Database;
namespace Moonlight.App.Repositories; namespace Moonlight.Core.Repositories;
public class Repository<TEntity> where TEntity : class public class Repository<TEntity> where TEntity : class
{ {

View file

@ -1,9 +1,9 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Store; using Moonlight.Core.Event;
using Moonlight.App.Event; using Moonlight.Core.Event.Args;
using Moonlight.App.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 public class AutoMailSendService // This service is responsible for sending mails automatically
{ {

View file

@ -1,6 +1,6 @@
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
namespace Moonlight.App.Services; namespace Moonlight.Core.Services;
public class BucketService public class BucketService
{ {

View file

@ -1,8 +1,8 @@
using Moonlight.App.Configuration; using Moonlight.Core.Configuration;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Moonlight.App.Services; namespace Moonlight.Core.Services;
public class ConfigService public class ConfigService
{ {

View file

@ -1,15 +1,15 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Store; using Moonlight.Core.Exceptions;
using Moonlight.App.Exceptions; using Moonlight.Core.Helpers;
using Moonlight.App.Helpers; using Moonlight.Core.Models.Abstractions;
using Moonlight.App.Models.Abstractions; using Moonlight.Core.Models.Enums;
using Moonlight.App.Models.Enums; using Moonlight.Core.Repositories;
using Moonlight.App.Repositories; using Moonlight.Core.Services.Utils;
using Moonlight.App.Services.Utils; using Moonlight.Features.StoreSystem.Entities;
using OtpNet; using OtpNet;
namespace Moonlight.App.Services; namespace Moonlight.Core.Services;
// This service allows you to reauthenticate, login and force login // This service allows you to reauthenticate, login and force login
// It does also contain the permission system accessor for the current user // It does also contain the permission system accessor for the current user

View file

@ -1,6 +1,6 @@
using Microsoft.JSInterop; using Microsoft.JSInterop;
namespace Moonlight.App.Services.Interop; namespace Moonlight.Core.Services.Interop;
public class AlertService public class AlertService
{ {

View file

@ -1,7 +1,6 @@
using Microsoft.JSInterop; using Microsoft.JSInterop;
using Moonlight.App.Helpers;
namespace Moonlight.App.Services.Interop; namespace Moonlight.Core.Services.Interop;
public class CookieService public class CookieService
{ {

View file

@ -1,7 +1,7 @@
using System.Text; using System.Text;
using Microsoft.JSInterop; using Microsoft.JSInterop;
namespace Moonlight.App.Services.Interop; namespace Moonlight.Core.Services.Interop;
public class FileDownloadService public class FileDownloadService
{ {

View file

@ -1,6 +1,6 @@
using Microsoft.JSInterop; using Microsoft.JSInterop;
namespace Moonlight.App.Services.Interop; namespace Moonlight.Core.Services.Interop;
public class ModalService public class ModalService
{ {

View file

@ -1,6 +1,6 @@
using Microsoft.JSInterop; using Microsoft.JSInterop;
namespace Moonlight.App.Services.Interop; namespace Moonlight.Core.Services.Interop;
public class ToastService public class ToastService
{ {

View file

@ -1,9 +1,9 @@
using MailKit.Net.Smtp; using MailKit.Net.Smtp;
using MimeKit; using MimeKit;
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
namespace Moonlight.App.Services; namespace Moonlight.Core.Services;
public class MailService public class MailService
{ {

View file

@ -1,9 +1,10 @@
using System.IO.Compression; using System.IO.Compression;
using Moonlight.App.Event; using Moonlight.Core.Event;
using Moonlight.App.Extensions; using Moonlight.Core.Extensions;
using Moonlight.App.Helpers; 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 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 WebApplication Application { get; set; } // Do NOT modify using a plugin
public string LogPath { get; set; } // Do NOT modify using a plugin public string LogPath { get; set; } // Do NOT modify using a plugin
public MoonlightThemeService Theme => ServiceProvider.GetRequiredService<MoonlightThemeService>(); public ThemeService Theme => ServiceProvider.GetRequiredService<ThemeService>();
public MoonlightService(ConfigService configService, IServiceProvider serviceProvider) public MoonlightService(ConfigService configService, IServiceProvider serviceProvider)
{ {

View file

@ -1,13 +1,10 @@
using System.Reflection; using System.Reflection;
using Moonlight.App.Database.Entities; using Moonlight.Core.Helpers;
using Moonlight.App.Database.Entities.Store; using Moonlight.Core.Plugins;
using Moonlight.App.Helpers; using Moonlight.Core.Plugins.Contexts;
using Moonlight.App.Models.Abstractions; using Moonlight.Features.ServiceManagement.Models.Abstractions;
using Moonlight.App.Models.Abstractions.Services;
using Moonlight.App.Plugins;
using Moonlight.App.Plugins.Contexts;
namespace Moonlight.App.Services; namespace Moonlight.Core.Services;
public class PluginService public class PluginService
{ {

View file

@ -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 public class SessionService
{ {

View file

@ -1,16 +1,16 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Event; using Moonlight.Core.Event;
using Moonlight.App.Exceptions; using Moonlight.Core.Exceptions;
using Moonlight.App.Extensions; using Moonlight.Core.Extensions;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Moonlight.App.Models.Abstractions; using Moonlight.Core.Models.Abstractions;
using Moonlight.App.Models.Enums; using Moonlight.Core.Models.Enums;
using Moonlight.App.Models.Templates; using Moonlight.Core.Models.Templates;
using Moonlight.App.Repositories; using Moonlight.Core.Repositories;
using Moonlight.App.Services.Utils; using Moonlight.Core.Services.Utils;
using OtpNet; using OtpNet;
namespace Moonlight.App.Services.Users; namespace Moonlight.Core.Services.Users;
public class UserAuthService public class UserAuthService
{ {

View file

@ -1,13 +1,14 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Database.Entities.Community; using Moonlight.Core.Repositories;
using Moonlight.App.Database.Entities.Store; using Moonlight.Features.Community.Entities;
using Moonlight.App.Database.Entities.Tickets; using Moonlight.Features.Community.Services;
using Moonlight.App.Repositories; using Moonlight.Features.ServiceManagement.Entities;
using Moonlight.App.Services.Community; using Moonlight.Features.ServiceManagement.Services;
using Moonlight.App.Services.ServiceManage; using Moonlight.Features.StoreSystem.Entities;
using Moonlight.Features.Ticketing.Entities;
namespace Moonlight.App.Services.Users; namespace Moonlight.Core.Services.Users;
public class UserDeleteService public class UserDeleteService
{ {

View file

@ -1,7 +1,7 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Repositories; using Moonlight.Core.Repositories;
namespace Moonlight.App.Services.Users; namespace Moonlight.Core.Services.Users;
public class UserDetailsService public class UserDetailsService
{ {

View file

@ -1,8 +1,8 @@
using Moonlight.App.Database.Entities; using Moonlight.Core.Database.Entities;
using Moonlight.App.Exceptions; using Moonlight.Core.Exceptions;
using Moonlight.App.Repositories; using Moonlight.Core.Repositories;
namespace Moonlight.App.Services.Users; namespace Moonlight.Core.Services.Users;
public class UserService public class UserService
{ {

View file

@ -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 public class ConnectionService
{ {

View file

@ -1,9 +1,9 @@
using JWT.Algorithms; using JWT.Algorithms;
using JWT.Builder; using JWT.Builder;
using Moonlight.App.Helpers; using Moonlight.Core.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Moonlight.App.Services.Utils; namespace Moonlight.Core.Services.Utils;
public class JwtService public class JwtService
{ {

View file

@ -1,8 +1,9 @@
@using Moonlight.App.Services @using Moonlight.Core.Models.Forms
@using Moonlight.App.Services.Users @using Moonlight.Core.Exceptions
@using Moonlight.App.Models.Forms @using Moonlight.Core.Models.Enums
@using Moonlight.App.Models.Enums @using Moonlight.Core.Models.Forms.Auth
@using Moonlight.App.Models.Forms.Auth @using Moonlight.Core.Services
@using Moonlight.Core.Services.Users
@inject IdentityService IdentityService @inject IdentityService IdentityService
@inject UserService UserService @inject UserService UserService

View file

@ -1,9 +1,9 @@
@page "/login" @page "/login"
@* Virtual route to trick blazor *@ @* Virtual route to trick blazor *@
@using Moonlight.Core.Models.Forms
@using Moonlight.App.Services @using Moonlight.Core.Models.Forms.Auth
@using Moonlight.App.Models.Forms @using Moonlight.Core.Services
@using Moonlight.App.Models.Forms.Auth @using Moonlight.Core.Services.Interop
@inject IdentityService IdentityService @inject IdentityService IdentityService
@inject CookieService CookieService @inject CookieService CookieService

View file

@ -1,6 +1,5 @@
@using Moonlight.App.Services.Users @using Moonlight.Core.Services.Users
@using Moonlight.App.Services @using Moonlight.Core.Services
@inject UserService UserService @inject UserService UserService
@inject IdentityService IdentityService @inject IdentityService IdentityService

View file

@ -1,8 +1,7 @@
@page "/password-reset" @page "/password-reset"
@using Moonlight.Core.Models.Forms
@using Moonlight.App.Services.Users @using Moonlight.Core.Models.Forms.Auth
@using Moonlight.App.Models.Forms @using Moonlight.Core.Services.Users
@using Moonlight.App.Models.Forms.Auth
@inject UserService UserService @inject UserService UserService

View file

@ -1,11 +1,11 @@
@page "/register" @page "/register"
@* Virtual route to trick blazor *@ @* Virtual route to trick blazor *@
@using Moonlight.Core.Models.Forms
@using Moonlight.App.Services @using Moonlight.Core.Exceptions
@using Moonlight.App.Models.Forms @using Moonlight.Core.Models.Forms.Auth
@using Moonlight.App.Services.Users @using Moonlight.Core.Services
@using Moonlight.App.Exceptions @using Moonlight.Core.Services.Interop
@using Moonlight.App.Models.Forms.Auth @using Moonlight.Core.Services.Users
@inject IdentityService IdentityService @inject IdentityService IdentityService
@inject UserService UserService @inject UserService UserService

View file

@ -1,7 +1,8 @@
@using BlazorTable @using BlazorTable
@using Moonlight.App.Repositories
@using System.Linq.Expressions @using System.Linq.Expressions
@using Mappy.Net @using Mappy.Net
@using Moonlight.Core.Repositories
@using Moonlight.Core.Services.Interop
@typeparam TItem where TItem : class @typeparam TItem where TItem : class
@typeparam TCreateForm @typeparam TCreateForm

View file

@ -1,5 +1,4 @@
@using Moonlight.App.Extensions @using Moonlight.Core.Helpers
@typeparam TForm @typeparam TForm
@foreach (var prop in typeof(TForm).GetProperties()) @foreach (var prop in typeof(TForm).GetProperties())

Some files were not shown because too many files have changed in this diff Show more