After the first try literally gave me a head ace, there is the second try with a better way of structuring it and not divinding so much core components in individual features. Still not done though
This commit is contained in:
parent
bb53f1c40a
commit
63b2b40227
228 changed files with 1143 additions and 1049 deletions
|
@ -1,10 +0,0 @@
|
|||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
|
||||
namespace Moonlight.App.Event.Args;
|
||||
|
||||
public class TransactionCreatedEventArgs
|
||||
{
|
||||
public Transaction Transaction { get; set; }
|
||||
public User User { get; set; }
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
@using Moonlight.Shared.Layouts
|
||||
@using Moonlight.Core.UI.Layouts
|
||||
|
||||
<Router AppAssembly="@typeof(BlazorApp).Assembly">
|
||||
<Found Context="routeData">
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Models.Abstractions;
|
||||
using Moonlight.App.Models.Abstractions.Services;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
namespace Moonlight.App.Actions.Dummy;
|
||||
namespace Moonlight.Core.Actions.Dummy;
|
||||
|
||||
public class DummyActions : ServiceActions
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel;
|
||||
|
||||
namespace Moonlight.App.Actions.Dummy;
|
||||
namespace Moonlight.Core.Actions.Dummy;
|
||||
|
||||
public class DummyConfig
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using Moonlight.App.Actions.Dummy.Layouts;
|
||||
using Moonlight.App.Actions.Dummy.Pages;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Models.Abstractions.Services;
|
||||
using Moonlight.Core.Actions.Dummy.Layouts;
|
||||
using Moonlight.Core.Actions.Dummy.Pages;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
namespace Moonlight.App.Actions.Dummy;
|
||||
namespace Moonlight.Core.Actions.Dummy;
|
||||
|
||||
public class DummyServiceDefinition : ServiceDefinition
|
||||
{
|
|
@ -1,8 +1,9 @@
|
|||
using System.ComponentModel;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Features.StoreSystem.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Moonlight.App.Configuration;
|
||||
namespace Moonlight.Core.Configuration;
|
||||
|
||||
public class ConfigV1
|
||||
{
|
||||
|
@ -30,13 +31,6 @@ public class ConfigV1
|
|||
[JsonProperty("EnableDefault")] public bool EnableDefault { get; set; } = true;
|
||||
}
|
||||
|
||||
public class StoreData
|
||||
{
|
||||
[JsonProperty("Currency")]
|
||||
[Description("A string value representing the currency which will be shown to a user")]
|
||||
public string Currency { get; set; } = "€";
|
||||
}
|
||||
|
||||
public class SecurityData
|
||||
{
|
||||
[JsonProperty("Token")]
|
|
@ -1,11 +1,12 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Community;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Database.Entities.Tickets;
|
||||
using Moonlight.App.Services;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Services;
|
||||
using Moonlight.Features.Community.Entities;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
using Moonlight.Features.Ticketing.Entities;
|
||||
|
||||
namespace Moonlight.App.Database;
|
||||
namespace Moonlight.Core.Database;
|
||||
|
||||
public class DataContext : DbContext
|
||||
{
|
|
@ -1,4 +1,6 @@
|
|||
namespace Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.Core.Database.Entities.Store;
|
||||
|
||||
public class Service
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Database.Entities.Store;
|
||||
namespace Moonlight.Core.Database.Entities.Store;
|
||||
|
||||
public class ServiceShare
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Database.Entities;
|
||||
namespace Moonlight.Core.Database.Entities;
|
||||
|
||||
public class Theme
|
||||
{
|
|
@ -1,6 +1,7 @@
|
|||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.App.Database.Entities;
|
||||
namespace Moonlight.Core.Database.Entities;
|
||||
|
||||
public class User
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Database.Enums;
|
||||
namespace Moonlight.Core.Database.Enums;
|
||||
|
||||
public enum ServiceType
|
||||
{
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231013200303_AddedUser")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedUser : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231017075519_AddStoreModels")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -80,7 +81,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -101,7 +102,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -117,7 +118,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -203,7 +204,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -224,7 +225,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -266,9 +267,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -277,9 +278,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -288,24 +289,24 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId");
|
||||
|
||||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -316,13 +317,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -331,7 +332,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddStoreModels : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231018203522_AddedUserStoreData")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -279,39 +280,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -320,15 +321,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -339,13 +340,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -354,12 +355,12 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedUserStoreData : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231018204737_AddedTransactions")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -257,7 +258,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -302,39 +303,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -343,15 +344,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -362,13 +363,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -377,19 +378,19 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedTransactions : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231027105412_AddPostsModels")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -131,7 +132,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -152,7 +153,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -173,7 +174,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -194,7 +195,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -215,7 +216,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -265,7 +266,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -301,7 +302,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -322,7 +323,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -345,7 +346,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -390,9 +391,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -401,28 +402,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -431,39 +432,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -472,15 +473,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -491,13 +492,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -506,26 +507,26 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddPostsModels : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231028214520_AddedWordFilter")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("WordFilters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -405,9 +406,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -416,28 +417,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -446,39 +447,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -487,15 +488,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -506,13 +507,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -521,26 +522,26 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedWordFilter : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231101161843_AddedTicketModels")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("WordFilters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -402,7 +403,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Tickets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -436,7 +437,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("TicketMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -481,9 +482,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -492,28 +493,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -522,39 +523,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -563,15 +564,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -582,13 +583,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -597,22 +598,22 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Creator")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
|
@ -621,37 +622,37 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Sender")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Sender")
|
||||
.WithMany()
|
||||
.HasForeignKey("SenderId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("TicketId");
|
||||
|
||||
b.Navigation("Sender");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedTicketModels : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20231222100225_AddThemeModel")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("WordFilters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Themes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Tickets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("TicketMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Creator")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
|
@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Sender")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Sender")
|
||||
.WithMany()
|
||||
.HasForeignKey("SenderId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("TicketId");
|
||||
|
||||
b.Navigation("Sender");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddThemeModel : Migration
|
|
@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore;
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20240119090835_AddedTransactionDate")]
|
||||
|
@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("WordFilters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -363,7 +364,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -395,7 +396,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Themes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -437,7 +438,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Tickets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -471,7 +472,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("TicketMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -516,9 +517,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -527,28 +528,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -557,39 +558,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -598,15 +599,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -617,13 +618,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -632,22 +633,22 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Creator")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
|
@ -656,37 +657,37 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Sender")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Sender")
|
||||
.WithMany()
|
||||
.HasForeignKey("SenderId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("TicketId");
|
||||
|
||||
b.Navigation("Sender");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedTransactionDate : Migration
|
|
@ -3,11 +3,12 @@ using System;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
namespace Moonlight.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
partial class DataContextModelSnapshot : ModelSnapshot
|
||||
|
@ -17,7 +18,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -50,7 +51,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Posts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -81,7 +82,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -105,7 +106,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("PostLikes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -120,7 +121,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("WordFilters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -143,7 +144,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Categories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -164,7 +165,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Coupons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -185,7 +186,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("CouponUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -206,7 +207,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -227,7 +228,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("GiftCodeUses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -277,7 +278,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -313,7 +314,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Services");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -334,7 +335,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("ServiceShares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Transaction");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Themes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Tickets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("TicketMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Author")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Author")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.Navigation("Author");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Community.Post", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null)
|
||||
.WithMany("Likes")
|
||||
.HasForeignKey("PostId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon")
|
||||
.WithMany()
|
||||
.HasForeignKey("CouponId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("CouponUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode")
|
||||
.WithMany()
|
||||
.HasForeignKey("GiftCodeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("GiftCodeUses")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("GiftCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category")
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Owner")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null)
|
||||
.WithMany("Shares")
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "User")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
|
@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", null)
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Creator")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId");
|
||||
|
||||
|
@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations
|
|||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b =>
|
||||
{
|
||||
b.HasOne("Moonlight.App.Database.Entities.User", "Sender")
|
||||
b.HasOne("Moonlight.Core.Database.Entities.User", "Sender")
|
||||
.WithMany()
|
||||
.HasForeignKey("SenderId");
|
||||
|
||||
b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null)
|
||||
b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null)
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("TicketId");
|
||||
|
||||
b.Navigation("Sender");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Likes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b =>
|
||||
{
|
||||
b.Navigation("Shares");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Moonlight.App.Database.Entities.User", b =>
|
||||
modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("CouponUses");
|
||||
|
|
@ -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
|
||||
{
|
|
@ -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
|
||||
{
|
11
Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs
Normal file
11
Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.Core.Event.Args;
|
||||
|
||||
public class TransactionCreatedEventArgs
|
||||
{
|
||||
public Transaction Transaction { get; set; }
|
||||
public User User { get; set; }
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Community;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Database.Entities.Tickets;
|
||||
using Moonlight.App.Event.Args;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Event.Args;
|
||||
using Moonlight.Features.Community.Entities;
|
||||
using Moonlight.Features.Ticketing.Entities;
|
||||
|
||||
namespace Moonlight.App.Event;
|
||||
namespace Moonlight.Core.Event;
|
||||
|
||||
public class Events
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Exceptions;
|
||||
namespace Moonlight.Core.Exceptions;
|
||||
|
||||
public class DisplayException : Exception
|
||||
{
|
|
@ -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
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Extensions.Attributes;
|
||||
namespace Moonlight.Core.Extensions.Attributes;
|
||||
|
||||
public class SelectorAttribute : Attribute
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Text;
|
||||
|
||||
namespace Moonlight.App.Extensions;
|
||||
namespace Moonlight.Core.Extensions;
|
||||
|
||||
public static class ConfigurationBuilderExtensions
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Extensions;
|
||||
namespace Moonlight.Core.Extensions;
|
||||
|
||||
public static class EventHandlerExtensions
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
namespace Moonlight.App.Extensions;
|
||||
namespace Moonlight.Core.Extensions;
|
||||
|
||||
public static class ZipArchiveExtension
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
public static class ComponentHelper
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.Text;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
public static class Formatter
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.Security.Cryptography;
|
||||
using Microsoft.AspNetCore.Cryptography.KeyDerivation;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
// Src: https://codereview.stackexchange.com/questions/176697/net-core-mvc-future-proof-hashing-of-passwords
|
||||
public static class HashHelper
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Helpers.LogMigrator;
|
||||
namespace Moonlight.Core.Helpers.LogMigrator;
|
||||
|
||||
public class LogMigrateProvider : ILoggerProvider
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Helpers.LogMigrator;
|
||||
namespace Moonlight.Core.Helpers.LogMigrator;
|
||||
|
||||
public class MigrateLogger : ILogger
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
using System.Reflection;
|
||||
using Serilog;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
public class Logger
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
public static class PathBuilder
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace Moonlight.App.Helpers;
|
||||
namespace Moonlight.Core.Helpers;
|
||||
|
||||
public class PropBinder<T>
|
||||
{
|
|
@ -1,9 +1,8 @@
|
|||
using System.Text;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Services.Sys;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Services.Sys;
|
||||
|
||||
namespace Moonlight.App.Http.Controllers.Api;
|
||||
namespace Moonlight.Core.Http.Controllers.Api;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/assetproxy")]
|
|
@ -1,11 +1,11 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Models.Enums;
|
||||
using Moonlight.App.Repositories;
|
||||
using Moonlight.App.Services;
|
||||
using Moonlight.App.Services.Utils;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Models.Enums;
|
||||
using Moonlight.Core.Repositories;
|
||||
using Moonlight.Core.Services;
|
||||
using Moonlight.Core.Services.Utils;
|
||||
|
||||
namespace Moonlight.App.Http.Controllers.Api.Auth;
|
||||
namespace Moonlight.Core.Http.Controllers.Api.Auth;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/auth/reset")]
|
|
@ -1,10 +1,10 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Models.Enums;
|
||||
using Moonlight.App.Services;
|
||||
using Moonlight.App.Services.Utils;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Models.Enums;
|
||||
using Moonlight.Core.Services;
|
||||
using Moonlight.Core.Services.Utils;
|
||||
|
||||
namespace Moonlight.App.Http.Controllers.Api.Auth;
|
||||
namespace Moonlight.Core.Http.Controllers.Api.Auth;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/auth/verify")]
|
|
@ -1,8 +1,8 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Services;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Services;
|
||||
|
||||
namespace Moonlight.App.Http.Controllers.Api;
|
||||
namespace Moonlight.Core.Http.Controllers.Api;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/bucket")]
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Abstractions;
|
||||
namespace Moonlight.Core.Models.Abstractions;
|
||||
|
||||
public class ApplicationTheme
|
||||
{
|
|
@ -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
|
||||
{
|
|
@ -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
|
||||
{
|
|
@ -0,0 +1,10 @@
|
|||
using Moonlight.Core.Database.Entities.Store;
|
||||
|
||||
namespace Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
public abstract class ServiceActions
|
||||
{
|
||||
public abstract Task Create(IServiceProvider provider, Service service);
|
||||
public abstract Task Update(IServiceProvider provider, Service service);
|
||||
public abstract Task Delete(IServiceProvider provider, Service service);
|
||||
}
|
|
@ -1,7 +1,4 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using Moonlight.App.Database.Entities;
|
||||
|
||||
namespace Moonlight.App.Models.Abstractions.Services;
|
||||
namespace Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
public abstract class ServiceDefinition
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Moonlight.App.Models.Abstractions.Services;
|
||||
namespace Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
public class ServiceUiPage
|
||||
{
|
|
@ -1,9 +1,10 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.App.Models.Abstractions.Services;
|
||||
namespace Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
public class ServiceViewContext
|
||||
{
|
|
@ -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
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Abstractions;
|
||||
namespace Moonlight.Core.Models.Abstractions;
|
||||
|
||||
public class Subscriber
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Enums;
|
||||
namespace Moonlight.Core.Models.Enums;
|
||||
|
||||
public enum Permission
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Enums;
|
||||
namespace Moonlight.Core.Models.Enums;
|
||||
|
||||
public enum UserFlag
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Admin.Sys.Themes;
|
||||
namespace Moonlight.Core.Models.Forms.Admin.Sys.Themes;
|
||||
|
||||
public class AddThemeForm
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Admin.Sys.Themes;
|
||||
namespace Moonlight.Core.Models.Forms.Admin.Sys.Themes;
|
||||
|
||||
public class EditThemeForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Admin.Users;
|
||||
namespace Moonlight.Core.Models.Forms.Admin.Users;
|
||||
|
||||
public class UpdateUserForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Admin.Users;
|
||||
namespace Moonlight.Core.Models.Forms.Admin.Users;
|
||||
|
||||
public class UpdateUserPasswordForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class LoginForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class RegisterForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class ResetPasswordForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class TwoFactorCodeForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class UpdateAccountForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Auth;
|
||||
namespace Moonlight.Core.Models.Forms.Auth;
|
||||
|
||||
public class UpdateAccountPasswordForm
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.App.Models.Forms.Services;
|
||||
namespace Moonlight.Core.Models.Forms.Services;
|
||||
|
||||
public class AddUserToServiceForm
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Json.Theme;
|
||||
namespace Moonlight.Core.Models.Json.Theme;
|
||||
|
||||
public class ThemeExport
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Json.Theme;
|
||||
namespace Moonlight.Core.Models.Json.Theme;
|
||||
|
||||
public class ThemeImport
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Templates;
|
||||
namespace Moonlight.Core.Models.Templates;
|
||||
|
||||
public class MailVerify
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Moonlight.App.Models.Templates;
|
||||
namespace Moonlight.Core.Models.Templates;
|
||||
|
||||
public class ResetPassword
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Moonlight.App.Models.Abstractions.Services;
|
||||
using Moonlight.Core.Models.Abstractions.Services;
|
||||
|
||||
namespace Moonlight.App.Plugins.Contexts;
|
||||
namespace Moonlight.Core.Plugins.Contexts;
|
||||
|
||||
public class PluginContext
|
||||
{
|
|
@ -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
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.Core.Database;
|
||||
|
||||
namespace Moonlight.App.Repositories;
|
||||
namespace Moonlight.Core.Repositories;
|
||||
|
||||
public class Repository<TEntity> where TEntity : class
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Event;
|
||||
using Moonlight.App.Event.Args;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Event;
|
||||
using Moonlight.Core.Event.Args;
|
||||
|
||||
namespace Moonlight.App.Services.Background;
|
||||
namespace Moonlight.Core.Services.Background;
|
||||
|
||||
public class AutoMailSendService // This service is responsible for sending mails automatically
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Helpers;
|
||||
|
||||
namespace Moonlight.App.Services;
|
||||
namespace Moonlight.Core.Services;
|
||||
|
||||
public class BucketService
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
using Moonlight.App.Configuration;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Configuration;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Moonlight.App.Services;
|
||||
namespace Moonlight.Core.Services;
|
||||
|
||||
public class ConfigService
|
||||
{
|
|
@ -1,15 +1,16 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Exceptions;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Models.Abstractions;
|
||||
using Moonlight.App.Models.Enums;
|
||||
using Moonlight.App.Repositories;
|
||||
using Moonlight.App.Services.Utils;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Exceptions;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Models.Abstractions;
|
||||
using Moonlight.Core.Models.Enums;
|
||||
using Moonlight.Core.Repositories;
|
||||
using Moonlight.Core.Services.Utils;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
using OtpNet;
|
||||
|
||||
namespace Moonlight.App.Services;
|
||||
namespace Moonlight.Core.Services;
|
||||
|
||||
// This service allows you to reauthenticate, login and force login
|
||||
// It does also contain the permission system accessor for the current user
|
|
@ -1,7 +1,7 @@
|
|||
using Microsoft.JSInterop;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Helpers;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class AdBlockService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.JSInterop;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class AlertService
|
||||
{
|
|
@ -1,7 +1,6 @@
|
|||
using Microsoft.JSInterop;
|
||||
using Moonlight.App.Helpers;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class CookieService
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.Text;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class FileDownloadService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.JSInterop;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class ModalService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.JSInterop;
|
||||
|
||||
namespace Moonlight.App.Services.Interop;
|
||||
namespace Moonlight.Core.Services.Interop;
|
||||
|
||||
public class ToastService
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using MailKit.Net.Smtp;
|
||||
using MimeKit;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Helpers;
|
||||
|
||||
namespace Moonlight.App.Services;
|
||||
namespace Moonlight.Core.Services;
|
||||
|
||||
public class MailService
|
||||
{
|
|
@ -1,13 +1,10 @@
|
|||
using System.Reflection;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Models.Abstractions;
|
||||
using Moonlight.App.Models.Abstractions.Services;
|
||||
using Moonlight.App.Plugins;
|
||||
using Moonlight.App.Plugins.Contexts;
|
||||
using Moonlight.Core.Helpers;
|
||||
using Moonlight.Core.Models.Abstractions.Services;
|
||||
using Moonlight.Core.Plugins;
|
||||
using Moonlight.Core.Plugins.Contexts;
|
||||
|
||||
namespace Moonlight.App.Services;
|
||||
namespace Moonlight.Core.Services;
|
||||
|
||||
public class PluginService
|
||||
{
|
|
@ -1,10 +1,11 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Moonlight.App.Database.Entities;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Exceptions;
|
||||
using Moonlight.App.Repositories;
|
||||
using Moonlight.Core.Database.Entities;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Exceptions;
|
||||
using Moonlight.Core.Repositories;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.App.Services.ServiceManage;
|
||||
namespace Moonlight.Core.Services.ServiceManage;
|
||||
|
||||
public class ServiceAdminService
|
||||
{
|
|
@ -1,11 +1,11 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Moonlight.App.Database.Entities.Store;
|
||||
using Moonlight.App.Database.Enums;
|
||||
using Moonlight.App.Models.Abstractions;
|
||||
using Moonlight.App.Models.Abstractions.Services;
|
||||
using Moonlight.App.Repositories;
|
||||
using Moonlight.Core.Database.Entities.Store;
|
||||
using Moonlight.Core.Database.Enums;
|
||||
using Moonlight.Core.Models.Abstractions.Services;
|
||||
using Moonlight.Core.Repositories;
|
||||
using Moonlight.Features.StoreSystem.Entities;
|
||||
|
||||
namespace Moonlight.App.Services.ServiceManage;
|
||||
namespace Moonlight.Core.Services.ServiceManage;
|
||||
|
||||
public class ServiceDefinitionService
|
||||
{
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue