From 63b2b402277ce81c3017b6ba52f6088f4b88f661 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Thu, 25 Jan 2024 21:40:23 +0100 Subject: [PATCH] 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 --- .../Event/Args/TransactionCreatedEventArgs.cs | 10 -- .../Abstractions/Services/ServiceActions.cs | 8 -- Moonlight/BlazorApp.razor | 2 +- .../Actions/Dummy/DummyActions.cs | 7 +- .../Actions/Dummy/DummyConfig.cs | 2 +- .../Actions/Dummy/DummyServiceDefinition.cs | 10 +- .../Actions/Dummy/Layouts/DummyAdmin.razor | 0 .../Actions/Dummy/Layouts/DummyUser.razor | 0 .../Actions/Dummy/Pages/DummyPage.razor | 0 .../{App => Core}/Configuration/ConfigV1.cs | 12 +- .../{App => Core}/Database/DataContext.cs | 13 ++- .../Database/Entities/Store/Service.cs | 4 +- .../Database/Entities/Store/ServiceShare.cs | 2 +- .../{App => Core}/Database/Entities/Theme.cs | 2 +- .../{App => Core}/Database/Entities/User.cs | 5 +- .../Database/Enums/ServiceType.cs | 2 +- .../20231013200303_AddedUser.Designer.cs | 7 +- .../Migrations/20231013200303_AddedUser.cs | 2 +- .../20231017075519_AddStoreModels.Designer.cs | 49 ++++---- .../20231017075519_AddStoreModels.cs | 2 +- ...31018203522_AddedUserStoreData.Designer.cs | 55 ++++----- .../20231018203522_AddedUserStoreData.cs | 2 +- ...231018204737_AddedTransactions.Designer.cs | 61 +++++----- .../20231018204737_AddedTransactions.cs | 2 +- .../20231027105412_AddPostsModels.Designer.cs | 85 +++++++------- .../20231027105412_AddPostsModels.cs | 2 +- ...20231028214520_AddedWordFilter.Designer.cs | 87 +++++++------- .../20231028214520_AddedWordFilter.cs | 2 +- ...231101161843_AddedTicketModels.Designer.cs | 105 ++++++++--------- .../20231101161843_AddedTicketModels.cs | 2 +- .../20231222100225_AddThemeModel.Designer.cs | 107 +++++++++--------- .../20231222100225_AddThemeModel.cs | 2 +- ...119090835_AddedTransactionDate.Designer.cs | 107 +++++++++--------- .../20240119090835_AddedTransactionDate.cs | 2 +- .../Migrations/DataContextModelSnapshot.cs | 107 +++++++++--------- .../Event/Args/MailVerificationEventArgs.cs | 4 +- .../Event/Args/TicketMessageEventArgs.cs | 4 +- .../Event/Args/TransactionCreatedEventArgs.cs | 11 ++ Moonlight/{App => Core}/Event/Events.cs | 12 +- .../Exceptions/DisplayException.cs | 2 +- .../Attributes/RequirePermissionAttribute.cs | 4 +- .../Attributes/SelectorAttribute.cs | 2 +- .../ConfigurationBuilderExtensions.cs | 2 +- .../Extensions/EventHandlerExtensions.cs | 2 +- .../Extensions/ZipArchiveExtension.cs | 2 +- .../{App => Core}/Helpers/ComponentHelper.cs | 2 +- Moonlight/{App => Core}/Helpers/Formatter.cs | 2 +- Moonlight/{App => Core}/Helpers/HashHelper.cs | 2 +- .../Helpers/LogMigrator/LogMigrateProvider.cs | 2 +- .../Helpers/LogMigrator/MigrateLogger.cs | 2 +- Moonlight/{App => Core}/Helpers/Logger.cs | 2 +- .../{App => Core}/Helpers/PathBuilder.cs | 2 +- Moonlight/{App => Core}/Helpers/PropBinder.cs | 2 +- .../Controllers/Api/AssetProxyController.cs | 7 +- .../Controllers/Api/Auth/ResetController.cs | 12 +- .../Controllers/Api/Auth/VerifyController.cs | 10 +- .../Http/Controllers/Api/BucketController.cs | 6 +- .../Models/Abstractions/ApplicationTheme.cs | 2 +- .../Models/Abstractions/FlagStorage.cs | 4 +- .../Models/Abstractions/PermissionStorage.cs | 4 +- .../Abstractions/Services/ServiceActions.cs | 10 ++ .../Services/ServiceDefinition.cs | 5 +- .../Abstractions/Services/ServiceUiPage.cs | 2 +- .../Services/ServiceViewContext.cs | 9 +- .../Models/Abstractions/Session.cs | 4 +- .../Models/Abstractions/Subscriber.cs | 2 +- .../{App => Core}/Models/Enums/Permission.cs | 2 +- .../{App => Core}/Models/Enums/UserFlag.cs | 2 +- .../Forms/Admin/Sys/Themes/AddThemeForm.cs | 2 +- .../Forms/Admin/Sys/Themes/EditThemeForm.cs | 2 +- .../Forms/Admin/Users/UpdateUserForm.cs | 2 +- .../Admin/Users/UpdateUserPasswordForm.cs | 2 +- .../Models/Forms/Auth/LoginForm.cs | 2 +- .../Models/Forms/Auth/RegisterForm.cs | 2 +- .../Models/Forms/Auth/ResetPasswordForm.cs | 2 +- .../Models/Forms/Auth/TwoFactorCodeForm.cs | 2 +- .../Models/Forms/Auth/UpdateAccountForm.cs | 2 +- .../Forms/Auth/UpdateAccountPasswordForm.cs | 2 +- .../Forms/Services/AddUserToServiceForm.cs | 2 +- .../Models/Json/Theme/ThemeExport.cs | 2 +- .../Models/Json/Theme/ThemeImport.cs | 2 +- .../Models/Templates/MailVerify.cs | 2 +- .../Models/Templates/ResetPassword.cs | 2 +- .../Plugins/Contexts/PluginContext.cs | 4 +- .../{App => Core}/Plugins/MoonlightPlugin.cs | 4 +- .../{App => Core}/Repositories/Repository.cs | 4 +- .../Background/AutoMailSendService.cs | 10 +- .../{App => Core}/Services/BucketService.cs | 4 +- .../{App => Core}/Services/ConfigService.cs | 6 +- .../{App => Core}/Services/IdentityService.cs | 19 ++-- .../Services/Interop/AdBlockService.cs | 4 +- .../Services/Interop/AlertService.cs | 2 +- .../Services/Interop/CookieService.cs | 3 +- .../Services/Interop/FileDownloadService.cs | 2 +- .../Services/Interop/ModalService.cs | 2 +- .../Services/Interop/ToastService.cs | 2 +- .../{App => Core}/Services/MailService.cs | 6 +- .../{App => Core}/Services/PluginService.cs | 13 +-- .../ServiceManage/ServiceAdminService.cs | 11 +- .../ServiceManage/ServiceDefinitionService.cs | 12 +- .../ServiceManage/ServiceManageService.cs | 12 +- .../Services/ServiceManage/ServiceService.cs | 10 +- .../{App => Core}/Services/SessionService.cs | 4 +- .../Services/Sys/MoonlightService.cs | 8 +- .../Services/Sys/MoonlightThemeService.cs | 8 +- .../Services/Users/UserAuthService.cs | 22 ++-- .../Services/Users/UserDeleteService.cs | 17 +-- .../Services/Users/UserDetailsService.cs | 6 +- .../Services/Users/UserService.cs | 8 +- .../Services/Utils/ConnectionService.cs | 4 +- .../Services/Utils/JwtService.cs | 4 +- .../UI}/Components/Forms/AutoCrud.razor | 3 +- .../UI}/Components/Forms/AutoForm.razor | 3 +- .../UI}/Components/Forms/AutoProperty.razor | 5 +- .../UI}/Components/Forms/ChatFileSelect.razor | 2 + .../UI}/Components/Forms/ConfirmButton.razor | 0 .../Forms/DynamicTypedAutoForm.razor | 3 +- .../Forms/SmartCustomFileSelect.razor | 2 + .../UI}/Components/Forms/SmartDropdown.razor | 0 .../Components/Forms/SmartEnumSelect.razor | 0 .../Components/Forms/SmartFileSelect.razor | 2 + .../UI}/Components/Forms/SmartForm.razor | 2 +- .../UI}/Components/Forms/SmartSelect.razor | 0 .../UI}/Components/Forms/TextEditor.razor | 3 +- .../UI}/Components/Forms/WButton.razor | 0 .../Partials/ConnectionIndicator.razor | 0 .../UI}/Components/Partials/LazyLoader.razor | 0 .../UI}/Components/Partials/PageHeader.razor | 5 +- .../Partials/PermissionChecker.razor | 7 +- .../UI}/Components/Partials/Sidebar.razor | 8 +- .../UI}/Components/Partials/SmartModal.razor | 3 +- .../Partials/SoftErrorHandler.razor | 7 +- .../UI}/Components/Partials/Tooltip.razor | 0 .../UI}/Layouts/DefaultLayout.razor | 2 +- .../UI}/Layouts/MainLayout.razor | 13 ++- .../UI}/Layouts/OverlayLayout.razor | 0 .../Community/Entities}/Enums/PostType.cs | 2 +- .../Community/Entities}/Post.cs | 5 +- .../Community/Entities}/PostComment.cs | 4 +- .../Community/Entities}/PostLike.cs | 4 +- .../Community/Entities}/WordFilter.cs | 2 +- .../Community/Models/Forms}/AddPostForm.cs | 2 +- .../Models/Forms/Admin}/AddWordFilter.cs | 2 +- .../Models/Forms/Admin}/EditWordFilter.cs | 2 +- .../Community/Services}/PostService.cs | 17 +-- .../AdminCommunityNavigation.razor | 0 .../UI/Components}/CommunityNavigation.razor | 0 .../UI/Components}/CreatePostModal.razor | 10 +- .../Community/UI/Components}/PostView.razor | 14 ++- .../Community/UI/Views/Admin}/Filter.razor | 11 +- .../Community/UI/Views/Admin/Index.razor | 9 ++ .../Community/UI/Views}/Events.razor | 13 +-- .../Community/UI/Views}/Index.razor | 13 +-- .../Community/UI/Views}/Projects.razor | 10 +- .../StoreSystem/Configuration/StoreData.cs | 11 ++ .../StoreSystem/Entities}/Category.cs | 2 +- .../StoreSystem/Entities}/Coupon.cs | 2 +- .../StoreSystem/Entities}/CouponUse.cs | 2 +- .../StoreSystem/Entities}/GiftCode.cs | 2 +- .../StoreSystem/Entities}/GiftCodeUse.cs | 2 +- .../StoreSystem/Entities}/Product.cs | 4 +- .../StoreSystem/Entities}/Transaction.cs | 2 +- .../Models/Abstractions/PaymentGateway.cs | 2 +- .../Models/Forms}/AddCategoryForm.cs | 2 +- .../Models/Forms}/AddCouponForm.cs | 2 +- .../Models/Forms}/AddGiftCodeForm.cs | 2 +- .../Models/Forms}/AddProductForm.cs | 9 +- .../Models/Forms}/EditCategoryForm.cs | 2 +- .../Models/Forms}/EditCouponForm.cs | 2 +- .../Models/Forms}/EditGiftCodeForm.cs | 2 +- .../Models/Forms}/EditProductForm.cs | 7 +- .../Services}/StoreAdminService.cs | 13 ++- .../StoreSystem/Services}/StoreGiftService.cs | 11 +- .../Services}/StoreOrderService.cs | 17 +-- .../Services}/StorePaymentService.cs | 5 +- .../StoreSystem/Services}/StoreService.cs | 4 +- .../Services}/TransactionService.cs | 14 +-- .../UI/Components}/AdminStoreNavigation.razor | 0 .../UI/Components}/StoreModals.razor | 14 ++- .../StoreSystem/UI/Views/Admin}/Coupons.razor | 12 +- .../StoreSystem/UI/Views/Admin}/Expired.razor | 10 +- .../StoreSystem/UI/Views/Admin}/Gifts.razor | 12 +- .../StoreSystem/UI/Views/Admin/Index.razor | 9 ++ .../StoreSystem/UI/Views}/Index.razor | 14 ++- .../StoreSystem/UI/Views}/Order.razor | 11 +- .../Entities}/Enums/TicketPriority.cs | 2 +- .../Ticketing/Entities}/Ticket.cs | 7 +- .../Ticketing/Entities}/TicketMessage.cs | 4 +- .../Models/Forms}/CreateTicketForm.cs | 4 +- .../Ticketing/Services}/TicketChatService.cs | 15 +-- .../Services}/TicketCreateService.cs | 15 +-- .../Ticketing/Services}/TicketService.cs | 2 +- .../UI/Components}/TicketPopupCreate.razor | 11 +- .../UI/Components}/TicketPopupMain.razor | 2 +- .../UI/Components}/TicketPopupOverview.razor | 11 +- .../UI/Components}/TicketPopupView.razor | 5 +- .../Ticketing/UI/Views/Admin}/Index.razor | 16 +-- .../Ticketing/UI/Views/Admin}/View.razor | 15 ++- Moonlight/Moonlight.csproj | 89 ++++++++++++++- Moonlight/Pages/_Host.cshtml | 2 +- Moonlight/Program.cs | 35 +++--- .../Components/Auth/ChangePassword.razor | 11 +- Moonlight/Shared/Components/Auth/Login.razor | 8 +- .../Shared/Components/Auth/MailVerify.razor | 5 +- .../Components/Auth/PasswordReset.razor | 7 +- .../Shared/Components/Auth/Register.razor | 12 +- .../Modals/ManageServiceShareModal.razor | 9 +- .../Modals/Store/AddCouponModal.razor | 60 ---------- .../Components/Service/ServiceItem.razor | 13 ++- Moonlight/Shared/Views/Account/Index.razor | 11 +- Moonlight/Shared/Views/Account/Payments.razor | 14 ++- Moonlight/Shared/Views/Account/Security.razor | 11 +- .../Shared/Views/Admin/Community/Index.razor | 8 -- Moonlight/Shared/Views/Admin/Index.razor | 5 +- .../Shared/Views/Admin/Services/Index.razor | 9 +- .../Shared/Views/Admin/Services/View.razor | 15 ++- .../Shared/Views/Admin/Store/Index.razor | 8 -- .../Shared/Views/Admin/Sys/Diagnose.razor | 7 +- Moonlight/Shared/Views/Admin/Sys/Index.razor | 8 +- .../Shared/Views/Admin/Sys/Settings.razor | 8 +- Moonlight/Shared/Views/Admin/Sys/Themes.razor | 14 ++- .../Shared/Views/Admin/Users/Index.razor | 9 +- .../Shared/Views/Admin/Users/Sessions.razor | 10 +- Moonlight/Shared/Views/Admin/Users/View.razor | 19 ++-- Moonlight/Shared/Views/Index.razor | 3 +- Moonlight/Shared/Views/Service/Index.razor | 13 +-- Moonlight/Shared/Views/Services/Index.razor | 8 +- Moonlight/_Imports.razor | 9 +- 228 files changed, 1143 insertions(+), 1049 deletions(-) delete mode 100644 Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs delete mode 100644 Moonlight/App/Models/Abstractions/Services/ServiceActions.cs rename Moonlight/{App => Core}/Actions/Dummy/DummyActions.cs (70%) rename Moonlight/{App => Core}/Actions/Dummy/DummyConfig.cs (84%) rename Moonlight/{App => Core}/Actions/Dummy/DummyServiceDefinition.cs (73%) rename Moonlight/{App => Core}/Actions/Dummy/Layouts/DummyAdmin.razor (100%) rename Moonlight/{App => Core}/Actions/Dummy/Layouts/DummyUser.razor (100%) rename Moonlight/{App => Core}/Actions/Dummy/Pages/DummyPage.razor (100%) rename Moonlight/{App => Core}/Configuration/ConfigV1.cs (92%) rename Moonlight/{App => Core}/Database/DataContext.cs (87%) rename Moonlight/{App => Core}/Database/Entities/Store/Service.cs (82%) rename Moonlight/{App => Core}/Database/Entities/Store/ServiceShare.cs (64%) rename Moonlight/{App => Core}/Database/Entities/Theme.cs (87%) rename Moonlight/{App => Core}/Database/Entities/User.cs (85%) rename Moonlight/{App => Core}/Database/Enums/ServiceType.cs (64%) rename Moonlight/{App => Core}/Database/Migrations/20231013200303_AddedUser.Designer.cs (91%) rename Moonlight/{App => Core}/Database/Migrations/20231013200303_AddedUser.cs (97%) rename Moonlight/{App => Core}/Database/Migrations/20231017075519_AddStoreModels.Designer.cs (82%) rename Moonlight/{App => Core}/Database/Migrations/20231017075519_AddStoreModels.cs (99%) rename Moonlight/{App => Core}/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs (81%) rename Moonlight/{App => Core}/Database/Migrations/20231018203522_AddedUserStoreData.cs (98%) rename Moonlight/{App => Core}/Database/Migrations/20231018204737_AddedTransactions.Designer.cs (81%) rename Moonlight/{App => Core}/Database/Migrations/20231018204737_AddedTransactions.cs (97%) rename Moonlight/{App => Core}/Database/Migrations/20231027105412_AddPostsModels.Designer.cs (80%) rename Moonlight/{App => Core}/Database/Migrations/20231027105412_AddPostsModels.cs (99%) rename Moonlight/{App => Core}/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs (80%) rename Moonlight/{App => Core}/Database/Migrations/20231028214520_AddedWordFilter.cs (95%) rename Moonlight/{App => Core}/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs (80%) rename Moonlight/{App => Core}/Database/Migrations/20231101161843_AddedTicketModels.cs (98%) rename Moonlight/{App => Core}/Database/Migrations/20231222100225_AddThemeModel.Designer.cs (80%) rename Moonlight/{App => Core}/Database/Migrations/20231222100225_AddThemeModel.cs (96%) rename Moonlight/{App => Core}/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs (80%) rename Moonlight/{App => Core}/Database/Migrations/20240119090835_AddedTransactionDate.cs (94%) rename Moonlight/{App => Core}/Database/Migrations/DataContextModelSnapshot.cs (80%) rename Moonlight/{App => Core}/Event/Args/MailVerificationEventArgs.cs (58%) rename Moonlight/{App => Core}/Event/Args/TicketMessageEventArgs.cs (60%) create mode 100644 Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs rename Moonlight/{App => Core}/Event/Events.cs (79%) rename Moonlight/{App => Core}/Exceptions/DisplayException.cs (86%) rename Moonlight/{App => Core}/Extensions/Attributes/RequirePermissionAttribute.cs (80%) rename Moonlight/{App => Core}/Extensions/Attributes/SelectorAttribute.cs (79%) rename Moonlight/{App => Core}/Extensions/ConfigurationBuilderExtensions.cs (90%) rename Moonlight/{App => Core}/Extensions/EventHandlerExtensions.cs (95%) rename Moonlight/{App => Core}/Extensions/ZipArchiveExtension.cs (95%) rename Moonlight/{App => Core}/Helpers/ComponentHelper.cs (95%) rename Moonlight/{App => Core}/Helpers/Formatter.cs (99%) rename Moonlight/{App => Core}/Helpers/HashHelper.cs (99%) rename Moonlight/{App => Core}/Helpers/LogMigrator/LogMigrateProvider.cs (79%) rename Moonlight/{App => Core}/Helpers/LogMigrator/MigrateLogger.cs (96%) rename Moonlight/{App => Core}/Helpers/Logger.cs (98%) rename Moonlight/{App => Core}/Helpers/PathBuilder.cs (95%) rename Moonlight/{App => Core}/Helpers/PropBinder.cs (97%) rename Moonlight/{App => Core}/Http/Controllers/Api/AssetProxyController.cs (92%) rename Moonlight/{App => Core}/Http/Controllers/Api/Auth/ResetController.cs (89%) rename Moonlight/{App => Core}/Http/Controllers/Api/Auth/VerifyController.cs (87%) rename Moonlight/{App => Core}/Http/Controllers/Api/BucketController.cs (89%) rename Moonlight/{App => Core}/Models/Abstractions/ApplicationTheme.cs (87%) rename Moonlight/{App => Core}/Models/Abstractions/FlagStorage.cs (92%) rename Moonlight/{App => Core}/Models/Abstractions/PermissionStorage.cs (89%) create mode 100644 Moonlight/Core/Models/Abstractions/Services/ServiceActions.cs rename Moonlight/{App => Core}/Models/Abstractions/Services/ServiceDefinition.cs (69%) rename Moonlight/{App => Core}/Models/Abstractions/Services/ServiceUiPage.cs (81%) rename Moonlight/{App => Core}/Models/Abstractions/Services/ServiceViewContext.cs (75%) rename Moonlight/{App => Core}/Models/Abstractions/Session.cs (77%) rename Moonlight/{App => Core}/Models/Abstractions/Subscriber.cs (74%) rename Moonlight/{App => Core}/Models/Enums/Permission.cs (88%) rename Moonlight/{App => Core}/Models/Enums/UserFlag.cs (65%) rename Moonlight/{App => Core}/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs (93%) rename Moonlight/{App => Core}/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs (94%) rename Moonlight/{App => Core}/Models/Forms/Admin/Users/UpdateUserForm.cs (92%) rename Moonlight/{App => Core}/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs (88%) rename Moonlight/{App => Core}/Models/Forms/Auth/LoginForm.cs (89%) rename Moonlight/{App => Core}/Models/Forms/Auth/RegisterForm.cs (96%) rename Moonlight/{App => Core}/Models/Forms/Auth/ResetPasswordForm.cs (86%) rename Moonlight/{App => Core}/Models/Forms/Auth/TwoFactorCodeForm.cs (81%) rename Moonlight/{App => Core}/Models/Forms/Auth/UpdateAccountForm.cs (93%) rename Moonlight/{App => Core}/Models/Forms/Auth/UpdateAccountPasswordForm.cs (93%) rename Moonlight/{App => Core}/Models/Forms/Services/AddUserToServiceForm.cs (90%) rename Moonlight/{App => Core}/Models/Json/Theme/ThemeExport.cs (85%) rename Moonlight/{App => Core}/Models/Json/Theme/ThemeImport.cs (85%) rename Moonlight/{App => Core}/Models/Templates/MailVerify.cs (60%) rename Moonlight/{App => Core}/Models/Templates/ResetPassword.cs (61%) rename Moonlight/{App => Core}/Plugins/Contexts/PluginContext.cs (85%) rename Moonlight/{App => Core}/Plugins/MoonlightPlugin.cs (67%) rename Moonlight/{App => Core}/Repositories/Repository.cs (92%) rename Moonlight/{App => Core}/Services/Background/AutoMailSendService.cs (86%) rename Moonlight/{App => Core}/Services/BucketService.cs (97%) rename Moonlight/{App => Core}/Services/ConfigService.cs (96%) rename Moonlight/{App => Core}/Services/IdentityService.cs (93%) rename Moonlight/{App => Core}/Services/Interop/AdBlockService.cs (89%) rename Moonlight/{App => Core}/Services/Interop/AlertService.cs (96%) rename Moonlight/{App => Core}/Services/Interop/CookieService.cs (95%) rename Moonlight/{App => Core}/Services/Interop/FileDownloadService.cs (95%) rename Moonlight/{App => Core}/Services/Interop/ModalService.cs (94%) rename Moonlight/{App => Core}/Services/Interop/ToastService.cs (97%) rename Moonlight/{App => Core}/Services/MailService.cs (96%) rename Moonlight/{App => Core}/Services/PluginService.cs (93%) rename Moonlight/{App => Core}/Services/ServiceManage/ServiceAdminService.cs (91%) rename Moonlight/{App => Core}/Services/ServiceManage/ServiceDefinitionService.cs (85%) rename Moonlight/{App => Core}/Services/ServiceManage/ServiceManageService.cs (87%) rename Moonlight/{App => Core}/Services/ServiceManage/ServiceService.cs (94%) rename Moonlight/{App => Core}/Services/SessionService.cs (89%) rename Moonlight/{App => Core}/Services/Sys/MoonlightService.cs (95%) rename Moonlight/{App => Core}/Services/Sys/MoonlightThemeService.cs (89%) rename Moonlight/{App => Core}/Services/Users/UserAuthService.cs (89%) rename Moonlight/{App => Core}/Services/Users/UserDeleteService.cs (93%) rename Moonlight/{App => Core}/Services/Users/UserDetailsService.cs (89%) rename Moonlight/{App => Core}/Services/Users/UserService.cs (90%) rename Moonlight/{App => Core}/Services/Utils/ConnectionService.cs (94%) rename Moonlight/{App => Core}/Services/Utils/JwtService.cs (96%) rename Moonlight/{Shared => Core/UI}/Components/Forms/AutoCrud.razor (99%) rename Moonlight/{Shared => Core/UI}/Components/Forms/AutoForm.razor (94%) rename Moonlight/{Shared => Core/UI}/Components/Forms/AutoProperty.razor (97%) rename Moonlight/{Shared => Core/UI}/Components/Forms/ChatFileSelect.razor (95%) rename Moonlight/{Shared => Core/UI}/Components/Forms/ConfirmButton.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Forms/DynamicTypedAutoForm.razor (91%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartCustomFileSelect.razor (95%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartDropdown.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartEnumSelect.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartFileSelect.razor (95%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartForm.razor (99%) rename Moonlight/{Shared => Core/UI}/Components/Forms/SmartSelect.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Forms/TextEditor.razor (99%) rename Moonlight/{Shared => Core/UI}/Components/Forms/WButton.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Partials/ConnectionIndicator.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Partials/LazyLoader.razor (100%) rename Moonlight/{Shared => Core/UI}/Components/Partials/PageHeader.razor (97%) rename Moonlight/{Shared => Core/UI}/Components/Partials/PermissionChecker.razor (92%) rename Moonlight/{Shared => Core/UI}/Components/Partials/Sidebar.razor (96%) rename Moonlight/{Shared => Core/UI}/Components/Partials/SmartModal.razor (92%) rename Moonlight/{Shared => Core/UI}/Components/Partials/SoftErrorHandler.razor (94%) rename Moonlight/{Shared => Core/UI}/Components/Partials/Tooltip.razor (100%) rename Moonlight/{Shared => Core/UI}/Layouts/DefaultLayout.razor (95%) rename Moonlight/{Shared => Core/UI}/Layouts/MainLayout.razor (94%) rename Moonlight/{Shared => Core/UI}/Layouts/OverlayLayout.razor (100%) rename Moonlight/{App/Database => Features/Community/Entities}/Enums/PostType.cs (57%) rename Moonlight/{App/Database/Entities/Community => Features/Community/Entities}/Post.cs (76%) rename Moonlight/{App/Database/Entities/Community => Features/Community/Entities}/PostComment.cs (74%) rename Moonlight/{App/Database/Entities/Community => Features/Community/Entities}/PostLike.cs (62%) rename Moonlight/{App/Database/Entities/Community => Features/Community/Entities}/WordFilter.cs (65%) rename Moonlight/{App/Models/Forms/Community => Features/Community/Models/Forms}/AddPostForm.cs (92%) rename Moonlight/{App/Models/Forms/Admin/Community => Features/Community/Models/Forms/Admin}/AddWordFilter.cs (85%) rename Moonlight/{App/Models/Forms/Admin/Community => Features/Community/Models/Forms/Admin}/EditWordFilter.cs (85%) rename Moonlight/{App/Services/Community => Features/Community/Services}/PostService.cs (94%) rename Moonlight/{Shared/Components/Navigations => Features/Community/UI/Components}/AdminCommunityNavigation.razor (100%) rename Moonlight/{Shared/Components/Navigations => Features/Community/UI/Components}/CommunityNavigation.razor (100%) rename Moonlight/{Shared/Components/Modals/Community => Features/Community/UI/Components}/CreatePostModal.razor (88%) rename Moonlight/{Shared/Components/Community => Features/Community/UI/Components}/PostView.razor (97%) rename Moonlight/{Shared/Views/Admin/Community => Features/Community/UI/Views/Admin}/Filter.razor (79%) create mode 100644 Moonlight/Features/Community/UI/Views/Admin/Index.razor rename Moonlight/{Shared/Views/Community => Features/Community/UI/Views}/Events.razor (86%) rename Moonlight/{Shared/Views/Community => Features/Community/UI/Views}/Index.razor (86%) rename Moonlight/{Shared/Views/Community => Features/Community/UI/Views}/Projects.razor (87%) create mode 100644 Moonlight/Features/StoreSystem/Configuration/StoreData.cs rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/Category.cs (78%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/Coupon.cs (76%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/CouponUse.cs (64%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/GiftCode.cs (76%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/GiftCodeUse.cs (65%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/Product.cs (86%) rename Moonlight/{App/Database/Entities/Store => Features/StoreSystem/Entities}/Transaction.cs (79%) rename Moonlight/{App => Features/StoreSystem}/Models/Abstractions/PaymentGateway.cs (73%) rename Moonlight/{App/Models/Forms/Store => Features/StoreSystem/Models/Forms}/AddCategoryForm.cs (89%) rename Moonlight/{App/Models/Forms/Admin/Store => Features/StoreSystem/Models/Forms}/AddCouponForm.cs (90%) rename Moonlight/{App/Models/Forms/Admin/Store => Features/StoreSystem/Models/Forms}/AddGiftCodeForm.cs (91%) rename Moonlight/{App/Models/Forms/Store => Features/StoreSystem/Models/Forms}/AddProductForm.cs (86%) rename Moonlight/{App/Models/Forms/Store => Features/StoreSystem/Models/Forms}/EditCategoryForm.cs (89%) rename Moonlight/{App/Models/Forms/Admin/Store => Features/StoreSystem/Models/Forms}/EditCouponForm.cs (90%) rename Moonlight/{App/Models/Forms/Admin/Store => Features/StoreSystem/Models/Forms}/EditGiftCodeForm.cs (91%) rename Moonlight/{App/Models/Forms/Store => Features/StoreSystem/Models/Forms}/EditProductForm.cs (87%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/StoreAdminService.cs (93%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/StoreGiftService.cs (88%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/StoreOrderService.cs (95%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/StorePaymentService.cs (60%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/StoreService.cs (87%) rename Moonlight/{App/Services/Store => Features/StoreSystem/Services}/TransactionService.cs (77%) rename Moonlight/{Shared/Components/Navigations => Features/StoreSystem/UI/Components}/AdminStoreNavigation.razor (100%) rename Moonlight/{Shared/Components/Store => Features/StoreSystem/UI/Components}/StoreModals.razor (97%) rename Moonlight/{Shared/Views/Admin/Store => Features/StoreSystem/UI/Views/Admin}/Coupons.razor (83%) rename Moonlight/{Shared/Views/Admin/Store => Features/StoreSystem/UI/Views/Admin}/Expired.razor (92%) rename Moonlight/{Shared/Views/Admin/Store => Features/StoreSystem/UI/Views/Admin}/Gifts.razor (82%) create mode 100644 Moonlight/Features/StoreSystem/UI/Views/Admin/Index.razor rename Moonlight/{Shared/Views/Store => Features/StoreSystem/UI/Views}/Index.razor (96%) rename Moonlight/{Shared/Views/Store => Features/StoreSystem/UI/Views}/Order.razor (97%) rename Moonlight/{App/Database => Features/Ticketing/Entities}/Enums/TicketPriority.cs (56%) rename Moonlight/{App/Database/Entities/Tickets => Features/Ticketing/Entities}/Ticket.cs (73%) rename Moonlight/{App/Database/Entities/Tickets => Features/Ticketing/Entities}/TicketMessage.cs (74%) rename Moonlight/{App/Models/Forms/Ticketing => Features/Ticketing/Models/Forms}/CreateTicketForm.cs (91%) rename Moonlight/{App/Services/Ticketing => Features/Ticketing/Services}/TicketChatService.cs (94%) rename Moonlight/{App/Services/Ticketing => Features/Ticketing/Services}/TicketCreateService.cs (74%) rename Moonlight/{App/Services/Ticketing => Features/Ticketing/Services}/TicketService.cs (88%) rename Moonlight/{Shared/Components/TicketPopup => Features/Ticketing/UI/Components}/TicketPopupCreate.razor (91%) rename Moonlight/{Shared/Components/TicketPopup => Features/Ticketing/UI/Components}/TicketPopupMain.razor (96%) rename Moonlight/{Shared/Components/TicketPopup => Features/Ticketing/UI/Components}/TicketPopupOverview.razor (93%) rename Moonlight/{Shared/Components/TicketPopup => Features/Ticketing/UI/Components}/TicketPopupView.razor (98%) rename Moonlight/{Shared/Views/Admin/Tickets => Features/Ticketing/UI/Views/Admin}/Index.razor (96%) rename Moonlight/{Shared/Views/Admin/Tickets => Features/Ticketing/UI/Views/Admin}/View.razor (97%) delete mode 100644 Moonlight/Shared/Components/Modals/Store/AddCouponModal.razor delete mode 100644 Moonlight/Shared/Views/Admin/Community/Index.razor delete mode 100644 Moonlight/Shared/Views/Admin/Store/Index.razor diff --git a/Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs b/Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs deleted file mode 100644 index 585791c7..00000000 --- a/Moonlight/App/Event/Args/TransactionCreatedEventArgs.cs +++ /dev/null @@ -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; } -} \ No newline at end of file diff --git a/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs b/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs deleted file mode 100644 index dfc010ed..00000000 --- a/Moonlight/App/Models/Abstractions/Services/ServiceActions.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Moonlight.App.Models.Abstractions.Services; - -public abstract class ServiceActions -{ - public abstract Task Create(IServiceProvider provider, Database.Entities.Store.Service service); - public abstract Task Update(IServiceProvider provider, Database.Entities.Store.Service service); - public abstract Task Delete(IServiceProvider provider, Database.Entities.Store.Service service); -} \ No newline at end of file diff --git a/Moonlight/BlazorApp.razor b/Moonlight/BlazorApp.razor index 58302966..abf100d1 100644 --- a/Moonlight/BlazorApp.razor +++ b/Moonlight/BlazorApp.razor @@ -1,4 +1,4 @@ -@using Moonlight.Shared.Layouts +@using Moonlight.Core.UI.Layouts diff --git a/Moonlight/App/Actions/Dummy/DummyActions.cs b/Moonlight/Core/Actions/Dummy/DummyActions.cs similarity index 70% rename from Moonlight/App/Actions/Dummy/DummyActions.cs rename to Moonlight/Core/Actions/Dummy/DummyActions.cs index ba00b190..dfc76c4e 100644 --- a/Moonlight/App/Actions/Dummy/DummyActions.cs +++ b/Moonlight/Core/Actions/Dummy/DummyActions.cs @@ -1,8 +1,7 @@ -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Core.Database.Entities.Store; +using Moonlight.Core.Models.Abstractions.Services; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyActions : ServiceActions { diff --git a/Moonlight/App/Actions/Dummy/DummyConfig.cs b/Moonlight/Core/Actions/Dummy/DummyConfig.cs similarity index 84% rename from Moonlight/App/Actions/Dummy/DummyConfig.cs rename to Moonlight/Core/Actions/Dummy/DummyConfig.cs index 6076d0b9..f9d7bfaa 100644 --- a/Moonlight/App/Actions/Dummy/DummyConfig.cs +++ b/Moonlight/Core/Actions/Dummy/DummyConfig.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyConfig { diff --git a/Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs b/Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs similarity index 73% rename from Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs rename to Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs index 1d386a10..d6a647bb 100644 --- a/Moonlight/App/Actions/Dummy/DummyServiceDefinition.cs +++ b/Moonlight/Core/Actions/Dummy/DummyServiceDefinition.cs @@ -1,9 +1,9 @@ -using Moonlight.App.Actions.Dummy.Layouts; -using Moonlight.App.Actions.Dummy.Pages; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Core.Actions.Dummy.Layouts; +using Moonlight.Core.Actions.Dummy.Pages; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Abstractions.Services; -namespace Moonlight.App.Actions.Dummy; +namespace Moonlight.Core.Actions.Dummy; public class DummyServiceDefinition : ServiceDefinition { diff --git a/Moonlight/App/Actions/Dummy/Layouts/DummyAdmin.razor b/Moonlight/Core/Actions/Dummy/Layouts/DummyAdmin.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Layouts/DummyAdmin.razor rename to Moonlight/Core/Actions/Dummy/Layouts/DummyAdmin.razor diff --git a/Moonlight/App/Actions/Dummy/Layouts/DummyUser.razor b/Moonlight/Core/Actions/Dummy/Layouts/DummyUser.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Layouts/DummyUser.razor rename to Moonlight/Core/Actions/Dummy/Layouts/DummyUser.razor diff --git a/Moonlight/App/Actions/Dummy/Pages/DummyPage.razor b/Moonlight/Core/Actions/Dummy/Pages/DummyPage.razor similarity index 100% rename from Moonlight/App/Actions/Dummy/Pages/DummyPage.razor rename to Moonlight/Core/Actions/Dummy/Pages/DummyPage.razor diff --git a/Moonlight/App/Configuration/ConfigV1.cs b/Moonlight/Core/Configuration/ConfigV1.cs similarity index 92% rename from Moonlight/App/Configuration/ConfigV1.cs rename to Moonlight/Core/Configuration/ConfigV1.cs index 62aab2e2..a1dce9cd 100644 --- a/Moonlight/App/Configuration/ConfigV1.cs +++ b/Moonlight/Core/Configuration/ConfigV1.cs @@ -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")] diff --git a/Moonlight/App/Database/DataContext.cs b/Moonlight/Core/Database/DataContext.cs similarity index 87% rename from Moonlight/App/Database/DataContext.cs rename to Moonlight/Core/Database/DataContext.cs index de9bf50c..12c93df4 100644 --- a/Moonlight/App/Database/DataContext.cs +++ b/Moonlight/Core/Database/DataContext.cs @@ -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 { diff --git a/Moonlight/App/Database/Entities/Store/Service.cs b/Moonlight/Core/Database/Entities/Store/Service.cs similarity index 82% rename from Moonlight/App/Database/Entities/Store/Service.cs rename to Moonlight/Core/Database/Entities/Store/Service.cs index 8f659967..475d2ad4 100644 --- a/Moonlight/App/Database/Entities/Store/Service.cs +++ b/Moonlight/Core/Database/Entities/Store/Service.cs @@ -1,4 +1,6 @@ -namespace Moonlight.App.Database.Entities.Store; +using Moonlight.Features.StoreSystem.Entities; + +namespace Moonlight.Core.Database.Entities.Store; public class Service { diff --git a/Moonlight/App/Database/Entities/Store/ServiceShare.cs b/Moonlight/Core/Database/Entities/Store/ServiceShare.cs similarity index 64% rename from Moonlight/App/Database/Entities/Store/ServiceShare.cs rename to Moonlight/Core/Database/Entities/Store/ServiceShare.cs index 4cbcca2d..3b4d1a4f 100644 --- a/Moonlight/App/Database/Entities/Store/ServiceShare.cs +++ b/Moonlight/Core/Database/Entities/Store/ServiceShare.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Database.Entities.Store; +namespace Moonlight.Core.Database.Entities.Store; public class ServiceShare { diff --git a/Moonlight/App/Database/Entities/Theme.cs b/Moonlight/Core/Database/Entities/Theme.cs similarity index 87% rename from Moonlight/App/Database/Entities/Theme.cs rename to Moonlight/Core/Database/Entities/Theme.cs index 81a17b35..abae4f6b 100644 --- a/Moonlight/App/Database/Entities/Theme.cs +++ b/Moonlight/Core/Database/Entities/Theme.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Database.Entities; +namespace Moonlight.Core.Database.Entities; public class Theme { diff --git a/Moonlight/App/Database/Entities/User.cs b/Moonlight/Core/Database/Entities/User.cs similarity index 85% rename from Moonlight/App/Database/Entities/User.cs rename to Moonlight/Core/Database/Entities/User.cs index 78bedeb1..22c61747 100644 --- a/Moonlight/App/Database/Entities/User.cs +++ b/Moonlight/Core/Database/Entities/User.cs @@ -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 { diff --git a/Moonlight/App/Database/Enums/ServiceType.cs b/Moonlight/Core/Database/Enums/ServiceType.cs similarity index 64% rename from Moonlight/App/Database/Enums/ServiceType.cs rename to Moonlight/Core/Database/Enums/ServiceType.cs index 1f2c4d14..1a68a5bc 100644 --- a/Moonlight/App/Database/Enums/ServiceType.cs +++ b/Moonlight/Core/Database/Enums/ServiceType.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Database.Enums; +namespace Moonlight.Core.Database.Enums; public enum ServiceType { diff --git a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs similarity index 91% rename from Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs rename to Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs index 00811bcd..7eed2ec0 100644 --- a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231013200303_AddedUser")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs similarity index 97% rename from Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs rename to Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs index ef03bad6..a1871458 100644 --- a/Moonlight/App/Database/Migrations/20231013200303_AddedUser.cs +++ b/Moonlight/Core/Database/Migrations/20231013200303_AddedUser.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedUser : Migration diff --git a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs similarity index 82% rename from Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs index cd17712a..3c90fdb2 100644 --- a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231017075519_AddStoreModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -80,7 +81,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -101,7 +102,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -117,7 +118,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -203,7 +204,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -224,7 +225,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -266,9 +267,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) @@ -277,9 +278,9 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) @@ -288,24 +289,24 @@ namespace Moonlight.App.Database.Migrations b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId"); b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -316,13 +317,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -331,7 +332,7 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); diff --git a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs similarity index 99% rename from Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs rename to Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs index 41b821e1..dcaefe97 100644 --- a/Moonlight/App/Database/Migrations/20231017075519_AddStoreModels.cs +++ b/Moonlight/Core/Database/Migrations/20231017075519_AddStoreModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddStoreModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs similarity index 81% rename from Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs rename to Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs index b584d5fd..42496597 100644 --- a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231018203522_AddedUserStoreData")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -279,39 +280,39 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -320,15 +321,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -339,13 +340,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -354,12 +355,12 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs similarity index 98% rename from Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs rename to Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs index 13c6ea26..a22bb9eb 100644 --- a/Moonlight/App/Database/Migrations/20231018203522_AddedUserStoreData.cs +++ b/Moonlight/Core/Database/Migrations/20231018203522_AddedUserStoreData.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedUserStoreData : Migration diff --git a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs similarity index 81% rename from Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs rename to Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs index 4a54145b..caabb9e8 100644 --- a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231018204737_AddedTransactions")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -43,7 +44,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -64,7 +65,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -85,7 +86,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -106,7 +107,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -127,7 +128,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -177,7 +178,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -213,7 +214,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -234,7 +235,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -257,7 +258,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -302,39 +303,39 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -343,15 +344,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -362,13 +363,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -377,19 +378,19 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs similarity index 97% rename from Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs rename to Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs index b8581b52..72a6a619 100644 --- a/Moonlight/App/Database/Migrations/20231018204737_AddedTransactions.cs +++ b/Moonlight/Core/Database/Migrations/20231018204737_AddedTransactions.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTransactions : Migration diff --git a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs index b1a2f6e1..7b500b51 100644 --- a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231027105412_AddPostsModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -131,7 +132,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -152,7 +153,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -173,7 +174,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -194,7 +195,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -215,7 +216,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -265,7 +266,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -301,7 +302,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -322,7 +323,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -345,7 +346,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -390,9 +391,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -401,28 +402,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -431,39 +432,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -472,15 +473,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -491,13 +492,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -506,26 +507,26 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs similarity index 99% rename from Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs rename to Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs index 7910ab27..9083ba89 100644 --- a/Moonlight/App/Database/Migrations/20231027105412_AddPostsModels.cs +++ b/Moonlight/Core/Database/Migrations/20231027105412_AddPostsModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddPostsModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs rename to Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs index 7f0deefd..54927627 100644 --- a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231028214520_AddedWordFilter")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -405,9 +406,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -416,28 +417,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -446,39 +447,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -487,15 +488,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -506,13 +507,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -521,26 +522,26 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs similarity index 95% rename from Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs rename to Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs index 4ff13e1e..a43b8593 100644 --- a/Moonlight/App/Database/Migrations/20231028214520_AddedWordFilter.cs +++ b/Moonlight/Core/Database/Migrations/20231028214520_AddedWordFilter.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedWordFilter : Migration diff --git a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs rename to Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs index 1419a13c..9772bffb 100644 --- a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231101161843_AddedTicketModels")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -402,7 +403,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -436,7 +437,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -481,9 +482,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -492,28 +493,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -522,39 +523,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -563,15 +564,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -582,13 +583,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -597,22 +598,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -621,37 +622,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs similarity index 98% rename from Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs rename to Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs index f76fc0d9..ac2ad432 100644 --- a/Moonlight/App/Database/Migrations/20231101161843_AddedTicketModels.cs +++ b/Moonlight/Core/Database/Migrations/20231101161843_AddedTicketModels.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTicketModels : Migration diff --git a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs rename to Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs index 33208aae..4a8c9da4 100644 --- a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20231222100225_AddThemeModel")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs similarity index 96% rename from Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs rename to Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs index 9aadbbbf..aa5fb5d7 100644 --- a/Moonlight/App/Database/Migrations/20231222100225_AddThemeModel.cs +++ b/Moonlight/Core/Database/Migrations/20231222100225_AddThemeModel.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddThemeModel : Migration diff --git a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs similarity index 80% rename from Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs rename to Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs index e25d18d4..40b8d57a 100644 --- a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs +++ b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.Designer.cs @@ -4,11 +4,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] [Migration("20240119090835_AddedTransactionDate")] @@ -20,7 +21,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -53,7 +54,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -84,7 +85,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +109,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -123,7 +124,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -146,7 +147,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -167,7 +168,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -188,7 +189,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -209,7 +210,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -230,7 +231,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -280,7 +281,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -316,7 +317,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -337,7 +338,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -363,7 +364,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -395,7 +396,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -437,7 +438,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -471,7 +472,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -516,9 +517,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -527,28 +528,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -557,39 +558,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -598,15 +599,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -617,13 +618,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -632,22 +633,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -656,37 +657,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs similarity index 94% rename from Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs rename to Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs index bb3d3e9e..806e2ec9 100644 --- a/Moonlight/App/Database/Migrations/20240119090835_AddedTransactionDate.cs +++ b/Moonlight/Core/Database/Migrations/20240119090835_AddedTransactionDate.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { /// public partial class AddedTransactionDate : Migration diff --git a/Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs b/Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs similarity index 80% rename from Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs rename to Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs index debff26b..0e1f2dc9 100644 --- a/Moonlight/App/Database/Migrations/DataContextModelSnapshot.cs +++ b/Moonlight/Core/Database/Migrations/DataContextModelSnapshot.cs @@ -3,11 +3,12 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Moonlight.App.Database; +using Moonlight.Core.Database; +using Moonlight.Core.Database; #nullable disable -namespace Moonlight.App.Database.Migrations +namespace Moonlight.Core.Database.Migrations { [DbContext(typeof(DataContext))] partial class DataContextModelSnapshot : ModelSnapshot @@ -17,7 +18,7 @@ namespace Moonlight.App.Database.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -50,7 +51,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Posts"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -81,7 +82,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostComments"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -105,7 +106,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("PostLikes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.WordFilter", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.WordFilter", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -120,7 +121,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("WordFilters"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Category", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -143,7 +144,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Categories"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Coupon", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Coupon", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -164,7 +165,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Coupons"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -185,7 +186,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("CouponUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCode", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCode", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -206,7 +207,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -227,7 +228,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("GiftCodeUses"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -277,7 +278,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Products"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -313,7 +314,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Services"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -334,7 +335,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("ServiceShares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -360,7 +361,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Transaction"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Theme", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Theme", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -392,7 +393,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Themes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -434,7 +435,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Tickets"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -468,7 +469,7 @@ namespace Moonlight.App.Database.Migrations b.ToTable("TicketMessages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -513,9 +514,9 @@ namespace Moonlight.App.Database.Migrations b.ToTable("Users"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) @@ -524,28 +525,28 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostComment", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostComment", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Author") + b.HasOne("Moonlight.Core.Database.Entities.User", "Author") .WithMany() .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Comments") .HasForeignKey("PostId"); b.Navigation("Author"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.PostLike", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.PostLike", b => { - b.HasOne("Moonlight.App.Database.Entities.Community.Post", null) + b.HasOne("Moonlight.Core.Database.Entities.Community.Post", null) .WithMany("Likes") .HasForeignKey("PostId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -554,39 +555,39 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.CouponUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.CouponUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Coupon", "Coupon") + b.HasOne("Moonlight.Core.Database.Entities.Store.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("CouponUses") .HasForeignKey("UserId"); b.Navigation("Coupon"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.GiftCodeUse", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.GiftCodeUse", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.GiftCode", "GiftCode") + b.HasOne("Moonlight.Core.Database.Entities.Store.GiftCode", "GiftCode") .WithMany() .HasForeignKey("GiftCodeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("GiftCodeUses") .HasForeignKey("UserId"); b.Navigation("GiftCode"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Product", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Product", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Category", "Category") + b.HasOne("Moonlight.Core.Database.Entities.Store.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -595,15 +596,15 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Owner") + b.HasOne("Moonlight.Core.Database.Entities.User", "Owner") .WithMany() .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Product", "Product") + b.HasOne("Moonlight.Core.Database.Entities.Store.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) @@ -614,13 +615,13 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Product"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.ServiceShare", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.ServiceShare", b => { - b.HasOne("Moonlight.App.Database.Entities.Store.Service", null) + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", null) .WithMany("Shares") .HasForeignKey("ServiceId"); - b.HasOne("Moonlight.App.Database.Entities.User", "User") + b.HasOne("Moonlight.Core.Database.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -629,22 +630,22 @@ namespace Moonlight.App.Database.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Transaction", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Transaction", b => { - b.HasOne("Moonlight.App.Database.Entities.User", null) + b.HasOne("Moonlight.Core.Database.Entities.User", null) .WithMany("Transactions") .HasForeignKey("UserId"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Creator") + b.HasOne("Moonlight.Core.Database.Entities.User", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Moonlight.App.Database.Entities.Store.Service", "Service") + b.HasOne("Moonlight.Core.Database.Entities.Store.Service", "Service") .WithMany() .HasForeignKey("ServiceId"); @@ -653,37 +654,37 @@ namespace Moonlight.App.Database.Migrations b.Navigation("Service"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.TicketMessage", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.TicketMessage", b => { - b.HasOne("Moonlight.App.Database.Entities.User", "Sender") + b.HasOne("Moonlight.Core.Database.Entities.User", "Sender") .WithMany() .HasForeignKey("SenderId"); - b.HasOne("Moonlight.App.Database.Entities.Tickets.Ticket", null) + b.HasOne("Moonlight.Core.Database.Entities.Tickets.Ticket", null) .WithMany("Messages") .HasForeignKey("TicketId"); b.Navigation("Sender"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Community.Post", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Community.Post", b => { b.Navigation("Comments"); b.Navigation("Likes"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Store.Service", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Store.Service", b => { b.Navigation("Shares"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.Tickets.Ticket", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.Tickets.Ticket", b => { b.Navigation("Messages"); }); - modelBuilder.Entity("Moonlight.App.Database.Entities.User", b => + modelBuilder.Entity("Moonlight.Core.Database.Entities.User", b => { b.Navigation("CouponUses"); diff --git a/Moonlight/App/Event/Args/MailVerificationEventArgs.cs b/Moonlight/Core/Event/Args/MailVerificationEventArgs.cs similarity index 58% rename from Moonlight/App/Event/Args/MailVerificationEventArgs.cs rename to Moonlight/Core/Event/Args/MailVerificationEventArgs.cs index a1f31600..69b4450c 100644 --- a/Moonlight/App/Event/Args/MailVerificationEventArgs.cs +++ b/Moonlight/Core/Event/Args/MailVerificationEventArgs.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities; +using Moonlight.Core.Database.Entities; -namespace Moonlight.App.Event.Args; +namespace Moonlight.Core.Event.Args; public class MailVerificationEventArgs { diff --git a/Moonlight/App/Event/Args/TicketMessageEventArgs.cs b/Moonlight/Core/Event/Args/TicketMessageEventArgs.cs similarity index 60% rename from Moonlight/App/Event/Args/TicketMessageEventArgs.cs rename to Moonlight/Core/Event/Args/TicketMessageEventArgs.cs index 900be64f..715d3a7d 100644 --- a/Moonlight/App/Event/Args/TicketMessageEventArgs.cs +++ b/Moonlight/Core/Event/Args/TicketMessageEventArgs.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities.Tickets; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Event.Args; +namespace Moonlight.Core.Event.Args; public class TicketMessageEventArgs { diff --git a/Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs b/Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs new file mode 100644 index 00000000..6d815626 --- /dev/null +++ b/Moonlight/Core/Event/Args/TransactionCreatedEventArgs.cs @@ -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; } +} \ No newline at end of file diff --git a/Moonlight/App/Event/Events.cs b/Moonlight/Core/Event/Events.cs similarity index 79% rename from Moonlight/App/Event/Events.cs rename to Moonlight/Core/Event/Events.cs index 7ee34f8b..623e8e75 100644 --- a/Moonlight/App/Event/Events.cs +++ b/Moonlight/Core/Event/Events.cs @@ -1,10 +1,10 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Community; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Database.Entities.Tickets; -using Moonlight.App.Event.Args; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.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 { diff --git a/Moonlight/App/Exceptions/DisplayException.cs b/Moonlight/Core/Exceptions/DisplayException.cs similarity index 86% rename from Moonlight/App/Exceptions/DisplayException.cs rename to Moonlight/Core/Exceptions/DisplayException.cs index 5f2df095..cc8c04a9 100644 --- a/Moonlight/App/Exceptions/DisplayException.cs +++ b/Moonlight/Core/Exceptions/DisplayException.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Exceptions; +namespace Moonlight.Core.Exceptions; public class DisplayException : Exception { diff --git a/Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs b/Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs similarity index 80% rename from Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs rename to Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs index e6d6db47..e409c43f 100644 --- a/Moonlight/App/Extensions/Attributes/RequirePermissionAttribute.cs +++ b/Moonlight/Core/Extensions/Attributes/RequirePermissionAttribute.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Extensions.Attributes; +namespace Moonlight.Core.Extensions.Attributes; public class RequirePermissionAttribute : Attribute { diff --git a/Moonlight/App/Extensions/Attributes/SelectorAttribute.cs b/Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs similarity index 79% rename from Moonlight/App/Extensions/Attributes/SelectorAttribute.cs rename to Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs index 308bfa88..4caf59af 100644 --- a/Moonlight/App/Extensions/Attributes/SelectorAttribute.cs +++ b/Moonlight/Core/Extensions/Attributes/SelectorAttribute.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Extensions.Attributes; +namespace Moonlight.Core.Extensions.Attributes; public class SelectorAttribute : Attribute { diff --git a/Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs b/Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs similarity index 90% rename from Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs rename to Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs index 2ade4563..89c69a65 100644 --- a/Moonlight/App/Extensions/ConfigurationBuilderExtensions.cs +++ b/Moonlight/Core/Extensions/ConfigurationBuilderExtensions.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class ConfigurationBuilderExtensions { diff --git a/Moonlight/App/Extensions/EventHandlerExtensions.cs b/Moonlight/Core/Extensions/EventHandlerExtensions.cs similarity index 95% rename from Moonlight/App/Extensions/EventHandlerExtensions.cs rename to Moonlight/Core/Extensions/EventHandlerExtensions.cs index 31f53931..a0704321 100644 --- a/Moonlight/App/Extensions/EventHandlerExtensions.cs +++ b/Moonlight/Core/Extensions/EventHandlerExtensions.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class EventHandlerExtensions { diff --git a/Moonlight/App/Extensions/ZipArchiveExtension.cs b/Moonlight/Core/Extensions/ZipArchiveExtension.cs similarity index 95% rename from Moonlight/App/Extensions/ZipArchiveExtension.cs rename to Moonlight/Core/Extensions/ZipArchiveExtension.cs index 9937e559..14be5808 100644 --- a/Moonlight/App/Extensions/ZipArchiveExtension.cs +++ b/Moonlight/Core/Extensions/ZipArchiveExtension.cs @@ -1,7 +1,7 @@ using System.IO.Compression; using System.Text; -namespace Moonlight.App.Extensions; +namespace Moonlight.Core.Extensions; public static class ZipArchiveExtension { diff --git a/Moonlight/App/Helpers/ComponentHelper.cs b/Moonlight/Core/Helpers/ComponentHelper.cs similarity index 95% rename from Moonlight/App/Helpers/ComponentHelper.cs rename to Moonlight/Core/Helpers/ComponentHelper.cs index 754bd6b9..a8296d9c 100644 --- a/Moonlight/App/Helpers/ComponentHelper.cs +++ b/Moonlight/Core/Helpers/ComponentHelper.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class ComponentHelper { diff --git a/Moonlight/App/Helpers/Formatter.cs b/Moonlight/Core/Helpers/Formatter.cs similarity index 99% rename from Moonlight/App/Helpers/Formatter.cs rename to Moonlight/Core/Helpers/Formatter.cs index dadf0495..ce8c3436 100644 --- a/Moonlight/App/Helpers/Formatter.cs +++ b/Moonlight/Core/Helpers/Formatter.cs @@ -1,7 +1,7 @@ using System.Text; using Microsoft.AspNetCore.Components; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class Formatter { diff --git a/Moonlight/App/Helpers/HashHelper.cs b/Moonlight/Core/Helpers/HashHelper.cs similarity index 99% rename from Moonlight/App/Helpers/HashHelper.cs rename to Moonlight/Core/Helpers/HashHelper.cs index 97458b83..9e5b46c7 100644 --- a/Moonlight/App/Helpers/HashHelper.cs +++ b/Moonlight/Core/Helpers/HashHelper.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography; using Microsoft.AspNetCore.Cryptography.KeyDerivation; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; // Src: https://codereview.stackexchange.com/questions/176697/net-core-mvc-future-proof-hashing-of-passwords public static class HashHelper diff --git a/Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs b/Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs similarity index 79% rename from Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs rename to Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs index 5c2469f6..9d7d4dea 100644 --- a/Moonlight/App/Helpers/LogMigrator/LogMigrateProvider.cs +++ b/Moonlight/Core/Helpers/LogMigrator/LogMigrateProvider.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers.LogMigrator; +namespace Moonlight.Core.Helpers.LogMigrator; public class LogMigrateProvider : ILoggerProvider { diff --git a/Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs b/Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs similarity index 96% rename from Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs rename to Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs index fb9100d1..a0de98e1 100644 --- a/Moonlight/App/Helpers/LogMigrator/MigrateLogger.cs +++ b/Moonlight/Core/Helpers/LogMigrator/MigrateLogger.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers.LogMigrator; +namespace Moonlight.Core.Helpers.LogMigrator; public class MigrateLogger : ILogger { diff --git a/Moonlight/App/Helpers/Logger.cs b/Moonlight/Core/Helpers/Logger.cs similarity index 98% rename from Moonlight/App/Helpers/Logger.cs rename to Moonlight/Core/Helpers/Logger.cs index efce9e9e..068ed3c3 100644 --- a/Moonlight/App/Helpers/Logger.cs +++ b/Moonlight/Core/Helpers/Logger.cs @@ -2,7 +2,7 @@ using System.Reflection; using Serilog; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public class Logger { diff --git a/Moonlight/App/Helpers/PathBuilder.cs b/Moonlight/Core/Helpers/PathBuilder.cs similarity index 95% rename from Moonlight/App/Helpers/PathBuilder.cs rename to Moonlight/Core/Helpers/PathBuilder.cs index 8d1054cb..5388208e 100644 --- a/Moonlight/App/Helpers/PathBuilder.cs +++ b/Moonlight/Core/Helpers/PathBuilder.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public static class PathBuilder { diff --git a/Moonlight/App/Helpers/PropBinder.cs b/Moonlight/Core/Helpers/PropBinder.cs similarity index 97% rename from Moonlight/App/Helpers/PropBinder.cs rename to Moonlight/Core/Helpers/PropBinder.cs index 9d3d9865..39b0c6d5 100644 --- a/Moonlight/App/Helpers/PropBinder.cs +++ b/Moonlight/Core/Helpers/PropBinder.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace Moonlight.App.Helpers; +namespace Moonlight.Core.Helpers; public class PropBinder { diff --git a/Moonlight/App/Http/Controllers/Api/AssetProxyController.cs b/Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs similarity index 92% rename from Moonlight/App/Http/Controllers/Api/AssetProxyController.cs rename to Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs index a8650a3c..f73ab0dd 100644 --- a/Moonlight/App/Http/Controllers/Api/AssetProxyController.cs +++ b/Moonlight/Core/Http/Controllers/Api/AssetProxyController.cs @@ -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")] diff --git a/Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs b/Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs similarity index 89% rename from Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs rename to Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs index 482da17c..4905a557 100644 --- a/Moonlight/App/Http/Controllers/Api/Auth/ResetController.cs +++ b/Moonlight/Core/Http/Controllers/Api/Auth/ResetController.cs @@ -1,11 +1,11 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Database.Entities; -using Moonlight.App.Models.Enums; -using Moonlight.App.Repositories; -using Moonlight.App.Services; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services; +using Moonlight.Core.Services.Utils; -namespace Moonlight.App.Http.Controllers.Api.Auth; +namespace Moonlight.Core.Http.Controllers.Api.Auth; [ApiController] [Route("api/auth/reset")] diff --git a/Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs b/Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs similarity index 87% rename from Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs rename to Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs index e2b19e28..518fb72b 100644 --- a/Moonlight/App/Http/Controllers/Api/Auth/VerifyController.cs +++ b/Moonlight/Core/Http/Controllers/Api/Auth/VerifyController.cs @@ -1,10 +1,10 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Enums; -using Moonlight.App.Services; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Services; +using Moonlight.Core.Services.Utils; -namespace Moonlight.App.Http.Controllers.Api.Auth; +namespace Moonlight.Core.Http.Controllers.Api.Auth; [ApiController] [Route("api/auth/verify")] diff --git a/Moonlight/App/Http/Controllers/Api/BucketController.cs b/Moonlight/Core/Http/Controllers/Api/BucketController.cs similarity index 89% rename from Moonlight/App/Http/Controllers/Api/BucketController.cs rename to Moonlight/Core/Http/Controllers/Api/BucketController.cs index ea38470e..5525d4e5 100644 --- a/Moonlight/App/Http/Controllers/Api/BucketController.cs +++ b/Moonlight/Core/Http/Controllers/Api/BucketController.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Mvc; -using Moonlight.App.Helpers; -using Moonlight.App.Services; +using Moonlight.Core.Helpers; +using Moonlight.Core.Services; -namespace Moonlight.App.Http.Controllers.Api; +namespace Moonlight.Core.Http.Controllers.Api; [ApiController] [Route("api/bucket")] diff --git a/Moonlight/App/Models/Abstractions/ApplicationTheme.cs b/Moonlight/Core/Models/Abstractions/ApplicationTheme.cs similarity index 87% rename from Moonlight/App/Models/Abstractions/ApplicationTheme.cs rename to Moonlight/Core/Models/Abstractions/ApplicationTheme.cs index 60a20f17..4c601a5f 100644 --- a/Moonlight/App/Models/Abstractions/ApplicationTheme.cs +++ b/Moonlight/Core/Models/Abstractions/ApplicationTheme.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class ApplicationTheme { diff --git a/Moonlight/App/Models/Abstractions/FlagStorage.cs b/Moonlight/Core/Models/Abstractions/FlagStorage.cs similarity index 92% rename from Moonlight/App/Models/Abstractions/FlagStorage.cs rename to Moonlight/Core/Models/Abstractions/FlagStorage.cs index 7ec57b91..829dedf4 100644 --- a/Moonlight/App/Models/Abstractions/FlagStorage.cs +++ b/Moonlight/Core/Models/Abstractions/FlagStorage.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class FlagStorage { diff --git a/Moonlight/App/Models/Abstractions/PermissionStorage.cs b/Moonlight/Core/Models/Abstractions/PermissionStorage.cs similarity index 89% rename from Moonlight/App/Models/Abstractions/PermissionStorage.cs rename to Moonlight/Core/Models/Abstractions/PermissionStorage.cs index 8a85b6f3..78cf17fb 100644 --- a/Moonlight/App/Models/Abstractions/PermissionStorage.cs +++ b/Moonlight/Core/Models/Abstractions/PermissionStorage.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Enums; +using Moonlight.Core.Models.Enums; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class PermissionStorage { diff --git a/Moonlight/Core/Models/Abstractions/Services/ServiceActions.cs b/Moonlight/Core/Models/Abstractions/Services/ServiceActions.cs new file mode 100644 index 00000000..5c5f2a58 --- /dev/null +++ b/Moonlight/Core/Models/Abstractions/Services/ServiceActions.cs @@ -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); +} \ No newline at end of file diff --git a/Moonlight/App/Models/Abstractions/Services/ServiceDefinition.cs b/Moonlight/Core/Models/Abstractions/Services/ServiceDefinition.cs similarity index 69% rename from Moonlight/App/Models/Abstractions/Services/ServiceDefinition.cs rename to Moonlight/Core/Models/Abstractions/Services/ServiceDefinition.cs index 0aafded1..0388ff8c 100644 --- a/Moonlight/App/Models/Abstractions/Services/ServiceDefinition.cs +++ b/Moonlight/Core/Models/Abstractions/Services/ServiceDefinition.cs @@ -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 { diff --git a/Moonlight/App/Models/Abstractions/Services/ServiceUiPage.cs b/Moonlight/Core/Models/Abstractions/Services/ServiceUiPage.cs similarity index 81% rename from Moonlight/App/Models/Abstractions/Services/ServiceUiPage.cs rename to Moonlight/Core/Models/Abstractions/Services/ServiceUiPage.cs index 19a0ef0c..6706bb87 100644 --- a/Moonlight/App/Models/Abstractions/Services/ServiceUiPage.cs +++ b/Moonlight/Core/Models/Abstractions/Services/ServiceUiPage.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components; -namespace Moonlight.App.Models.Abstractions.Services; +namespace Moonlight.Core.Models.Abstractions.Services; public class ServiceUiPage { diff --git a/Moonlight/App/Models/Abstractions/Services/ServiceViewContext.cs b/Moonlight/Core/Models/Abstractions/Services/ServiceViewContext.cs similarity index 75% rename from Moonlight/App/Models/Abstractions/Services/ServiceViewContext.cs rename to Moonlight/Core/Models/Abstractions/Services/ServiceViewContext.cs index cc7bf805..be32d11b 100644 --- a/Moonlight/App/Models/Abstractions/Services/ServiceViewContext.cs +++ b/Moonlight/Core/Models/Abstractions/Services/ServiceViewContext.cs @@ -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 { diff --git a/Moonlight/App/Models/Abstractions/Session.cs b/Moonlight/Core/Models/Abstractions/Session.cs similarity index 77% rename from Moonlight/App/Models/Abstractions/Session.cs rename to Moonlight/Core/Models/Abstractions/Session.cs index e076266d..d4b6d933 100644 --- a/Moonlight/App/Models/Abstractions/Session.cs +++ b/Moonlight/Core/Models/Abstractions/Session.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Database.Entities; +using Moonlight.Core.Database.Entities; -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class Session { diff --git a/Moonlight/App/Models/Abstractions/Subscriber.cs b/Moonlight/Core/Models/Abstractions/Subscriber.cs similarity index 74% rename from Moonlight/App/Models/Abstractions/Subscriber.cs rename to Moonlight/Core/Models/Abstractions/Subscriber.cs index 97d4944c..f752f334 100644 --- a/Moonlight/App/Models/Abstractions/Subscriber.cs +++ b/Moonlight/Core/Models/Abstractions/Subscriber.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Abstractions; +namespace Moonlight.Core.Models.Abstractions; public class Subscriber { diff --git a/Moonlight/App/Models/Enums/Permission.cs b/Moonlight/Core/Models/Enums/Permission.cs similarity index 88% rename from Moonlight/App/Models/Enums/Permission.cs rename to Moonlight/Core/Models/Enums/Permission.cs index d342dde8..11a0c4ff 100644 --- a/Moonlight/App/Models/Enums/Permission.cs +++ b/Moonlight/Core/Models/Enums/Permission.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Enums; +namespace Moonlight.Core.Models.Enums; public enum Permission { diff --git a/Moonlight/App/Models/Enums/UserFlag.cs b/Moonlight/Core/Models/Enums/UserFlag.cs similarity index 65% rename from Moonlight/App/Models/Enums/UserFlag.cs rename to Moonlight/Core/Models/Enums/UserFlag.cs index d6fcd355..ef613a62 100644 --- a/Moonlight/App/Models/Enums/UserFlag.cs +++ b/Moonlight/Core/Models/Enums/UserFlag.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Enums; +namespace Moonlight.Core.Models.Enums; public enum UserFlag { diff --git a/Moonlight/App/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs b/Moonlight/Core/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs similarity index 93% rename from Moonlight/App/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs rename to Moonlight/Core/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs index 7f048aa8..51269606 100644 --- a/Moonlight/App/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Sys/Themes/AddThemeForm.cs @@ -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 { diff --git a/Moonlight/App/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs b/Moonlight/Core/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs similarity index 94% rename from Moonlight/App/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs rename to Moonlight/Core/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs index ac846b49..0020ecf1 100644 --- a/Moonlight/App/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Sys/Themes/EditThemeForm.cs @@ -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 { diff --git a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs similarity index 92% rename from Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs rename to Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs index c8f092ad..8682efef 100644 --- a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Admin.Users; +namespace Moonlight.Core.Models.Forms.Admin.Users; public class UpdateUserForm { diff --git a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs similarity index 88% rename from Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs rename to Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs index e6bfb7e8..91365793 100644 --- a/Moonlight/App/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Admin/Users/UpdateUserPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Admin.Users; +namespace Moonlight.Core.Models.Forms.Admin.Users; public class UpdateUserPasswordForm { diff --git a/Moonlight/App/Models/Forms/Auth/LoginForm.cs b/Moonlight/Core/Models/Forms/Auth/LoginForm.cs similarity index 89% rename from Moonlight/App/Models/Forms/Auth/LoginForm.cs rename to Moonlight/Core/Models/Forms/Auth/LoginForm.cs index 32cd2be4..7b414a43 100644 --- a/Moonlight/App/Models/Forms/Auth/LoginForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/LoginForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class LoginForm { diff --git a/Moonlight/App/Models/Forms/Auth/RegisterForm.cs b/Moonlight/Core/Models/Forms/Auth/RegisterForm.cs similarity index 96% rename from Moonlight/App/Models/Forms/Auth/RegisterForm.cs rename to Moonlight/Core/Models/Forms/Auth/RegisterForm.cs index b07fed66..6ebbde46 100644 --- a/Moonlight/App/Models/Forms/Auth/RegisterForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/RegisterForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class RegisterForm { diff --git a/Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs b/Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs similarity index 86% rename from Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs rename to Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs index 8bcca4a2..6816728c 100644 --- a/Moonlight/App/Models/Forms/Auth/ResetPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/ResetPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class ResetPasswordForm { diff --git a/Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs b/Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs similarity index 81% rename from Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs rename to Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs index ed84da38..88c7521a 100644 --- a/Moonlight/App/Models/Forms/Auth/TwoFactorCodeForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/TwoFactorCodeForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class TwoFactorCodeForm { diff --git a/Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs b/Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs similarity index 93% rename from Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs rename to Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs index 09ec62d7..9796e025 100644 --- a/Moonlight/App/Models/Forms/Auth/UpdateAccountForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/UpdateAccountForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class UpdateAccountForm { diff --git a/Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs b/Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs similarity index 93% rename from Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs rename to Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs index ed2b187d..f8f61202 100644 --- a/Moonlight/App/Models/Forms/Auth/UpdateAccountPasswordForm.cs +++ b/Moonlight/Core/Models/Forms/Auth/UpdateAccountPasswordForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Auth; +namespace Moonlight.Core.Models.Forms.Auth; public class UpdateAccountPasswordForm { diff --git a/Moonlight/App/Models/Forms/Services/AddUserToServiceForm.cs b/Moonlight/Core/Models/Forms/Services/AddUserToServiceForm.cs similarity index 90% rename from Moonlight/App/Models/Forms/Services/AddUserToServiceForm.cs rename to Moonlight/Core/Models/Forms/Services/AddUserToServiceForm.cs index 9109f1c2..03671774 100644 --- a/Moonlight/App/Models/Forms/Services/AddUserToServiceForm.cs +++ b/Moonlight/Core/Models/Forms/Services/AddUserToServiceForm.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Moonlight.App.Models.Forms.Services; +namespace Moonlight.Core.Models.Forms.Services; public class AddUserToServiceForm { diff --git a/Moonlight/App/Models/Json/Theme/ThemeExport.cs b/Moonlight/Core/Models/Json/Theme/ThemeExport.cs similarity index 85% rename from Moonlight/App/Models/Json/Theme/ThemeExport.cs rename to Moonlight/Core/Models/Json/Theme/ThemeExport.cs index fee81d6b..ab933344 100644 --- a/Moonlight/App/Models/Json/Theme/ThemeExport.cs +++ b/Moonlight/Core/Models/Json/Theme/ThemeExport.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Json.Theme; +namespace Moonlight.Core.Models.Json.Theme; public class ThemeExport { diff --git a/Moonlight/App/Models/Json/Theme/ThemeImport.cs b/Moonlight/Core/Models/Json/Theme/ThemeImport.cs similarity index 85% rename from Moonlight/App/Models/Json/Theme/ThemeImport.cs rename to Moonlight/Core/Models/Json/Theme/ThemeImport.cs index 370dbfc5..60b31b6b 100644 --- a/Moonlight/App/Models/Json/Theme/ThemeImport.cs +++ b/Moonlight/Core/Models/Json/Theme/ThemeImport.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Json.Theme; +namespace Moonlight.Core.Models.Json.Theme; public class ThemeImport { diff --git a/Moonlight/App/Models/Templates/MailVerify.cs b/Moonlight/Core/Models/Templates/MailVerify.cs similarity index 60% rename from Moonlight/App/Models/Templates/MailVerify.cs rename to Moonlight/Core/Models/Templates/MailVerify.cs index 92542534..7d90436e 100644 --- a/Moonlight/App/Models/Templates/MailVerify.cs +++ b/Moonlight/Core/Models/Templates/MailVerify.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Templates; +namespace Moonlight.Core.Models.Templates; public class MailVerify { diff --git a/Moonlight/App/Models/Templates/ResetPassword.cs b/Moonlight/Core/Models/Templates/ResetPassword.cs similarity index 61% rename from Moonlight/App/Models/Templates/ResetPassword.cs rename to Moonlight/Core/Models/Templates/ResetPassword.cs index 46f0cd33..d06356b7 100644 --- a/Moonlight/App/Models/Templates/ResetPassword.cs +++ b/Moonlight/Core/Models/Templates/ResetPassword.cs @@ -1,4 +1,4 @@ -namespace Moonlight.App.Models.Templates; +namespace Moonlight.Core.Models.Templates; public class ResetPassword { diff --git a/Moonlight/App/Plugins/Contexts/PluginContext.cs b/Moonlight/Core/Plugins/Contexts/PluginContext.cs similarity index 85% rename from Moonlight/App/Plugins/Contexts/PluginContext.cs rename to Moonlight/Core/Plugins/Contexts/PluginContext.cs index afdf874b..c1ab4c56 100644 --- a/Moonlight/App/Plugins/Contexts/PluginContext.cs +++ b/Moonlight/Core/Plugins/Contexts/PluginContext.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Abstractions.Services; +using Moonlight.Core.Models.Abstractions.Services; -namespace Moonlight.App.Plugins.Contexts; +namespace Moonlight.Core.Plugins.Contexts; public class PluginContext { diff --git a/Moonlight/App/Plugins/MoonlightPlugin.cs b/Moonlight/Core/Plugins/MoonlightPlugin.cs similarity index 67% rename from Moonlight/App/Plugins/MoonlightPlugin.cs rename to Moonlight/Core/Plugins/MoonlightPlugin.cs index b7d413ed..b6f71c19 100644 --- a/Moonlight/App/Plugins/MoonlightPlugin.cs +++ b/Moonlight/Core/Plugins/MoonlightPlugin.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Plugins.Contexts; +using Moonlight.Core.Plugins.Contexts; -namespace Moonlight.App.Plugins; +namespace Moonlight.Core.Plugins; public abstract class MoonlightPlugin { diff --git a/Moonlight/App/Repositories/Repository.cs b/Moonlight/Core/Repositories/Repository.cs similarity index 92% rename from Moonlight/App/Repositories/Repository.cs rename to Moonlight/Core/Repositories/Repository.cs index 1c46f6ab..874ea064 100644 --- a/Moonlight/App/Repositories/Repository.cs +++ b/Moonlight/Core/Repositories/Repository.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database; +using Moonlight.Core.Database; -namespace Moonlight.App.Repositories; +namespace Moonlight.Core.Repositories; public class Repository where TEntity : class { diff --git a/Moonlight/App/Services/Background/AutoMailSendService.cs b/Moonlight/Core/Services/Background/AutoMailSendService.cs similarity index 86% rename from Moonlight/App/Services/Background/AutoMailSendService.cs rename to Moonlight/Core/Services/Background/AutoMailSendService.cs index 12a3f4c7..c0b99818 100644 --- a/Moonlight/App/Services/Background/AutoMailSendService.cs +++ b/Moonlight/Core/Services/Background/AutoMailSendService.cs @@ -1,9 +1,9 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Event; -using Moonlight.App.Event.Args; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.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 { diff --git a/Moonlight/App/Services/BucketService.cs b/Moonlight/Core/Services/BucketService.cs similarity index 97% rename from Moonlight/App/Services/BucketService.cs rename to Moonlight/Core/Services/BucketService.cs index ced7ccdd..260d7e8d 100644 --- a/Moonlight/App/Services/BucketService.cs +++ b/Moonlight/Core/Services/BucketService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class BucketService { diff --git a/Moonlight/App/Services/ConfigService.cs b/Moonlight/Core/Services/ConfigService.cs similarity index 96% rename from Moonlight/App/Services/ConfigService.cs rename to Moonlight/Core/Services/ConfigService.cs index e10553c4..c8d0f67b 100644 --- a/Moonlight/App/Services/ConfigService.cs +++ b/Moonlight/Core/Services/ConfigService.cs @@ -1,8 +1,8 @@ -using Moonlight.App.Configuration; -using Moonlight.App.Helpers; +using Moonlight.Core.Configuration; +using Moonlight.Core.Helpers; using Newtonsoft.Json; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class ConfigService { diff --git a/Moonlight/App/Services/IdentityService.cs b/Moonlight/Core/Services/IdentityService.cs similarity index 93% rename from Moonlight/App/Services/IdentityService.cs rename to Moonlight/Core/Services/IdentityService.cs index c31b303e..666bb866 100644 --- a/Moonlight/App/Services/IdentityService.cs +++ b/Moonlight/Core/Services/IdentityService.cs @@ -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 diff --git a/Moonlight/App/Services/Interop/AdBlockService.cs b/Moonlight/Core/Services/Interop/AdBlockService.cs similarity index 89% rename from Moonlight/App/Services/Interop/AdBlockService.cs rename to Moonlight/Core/Services/Interop/AdBlockService.cs index 074f807d..11e9341f 100644 --- a/Moonlight/App/Services/Interop/AdBlockService.cs +++ b/Moonlight/Core/Services/Interop/AdBlockService.cs @@ -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 { diff --git a/Moonlight/App/Services/Interop/AlertService.cs b/Moonlight/Core/Services/Interop/AlertService.cs similarity index 96% rename from Moonlight/App/Services/Interop/AlertService.cs rename to Moonlight/Core/Services/Interop/AlertService.cs index ee1f9f9d..c66a2218 100644 --- a/Moonlight/App/Services/Interop/AlertService.cs +++ b/Moonlight/Core/Services/Interop/AlertService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class AlertService { diff --git a/Moonlight/App/Services/Interop/CookieService.cs b/Moonlight/Core/Services/Interop/CookieService.cs similarity index 95% rename from Moonlight/App/Services/Interop/CookieService.cs rename to Moonlight/Core/Services/Interop/CookieService.cs index 2aa0ce09..d1711742 100644 --- a/Moonlight/App/Services/Interop/CookieService.cs +++ b/Moonlight/Core/Services/Interop/CookieService.cs @@ -1,7 +1,6 @@ using Microsoft.JSInterop; -using Moonlight.App.Helpers; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class CookieService { diff --git a/Moonlight/App/Services/Interop/FileDownloadService.cs b/Moonlight/Core/Services/Interop/FileDownloadService.cs similarity index 95% rename from Moonlight/App/Services/Interop/FileDownloadService.cs rename to Moonlight/Core/Services/Interop/FileDownloadService.cs index 572417e7..7b9b5987 100644 --- a/Moonlight/App/Services/Interop/FileDownloadService.cs +++ b/Moonlight/Core/Services/Interop/FileDownloadService.cs @@ -1,7 +1,7 @@ using System.Text; using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class FileDownloadService { diff --git a/Moonlight/App/Services/Interop/ModalService.cs b/Moonlight/Core/Services/Interop/ModalService.cs similarity index 94% rename from Moonlight/App/Services/Interop/ModalService.cs rename to Moonlight/Core/Services/Interop/ModalService.cs index fcff73e2..c9f8819e 100644 --- a/Moonlight/App/Services/Interop/ModalService.cs +++ b/Moonlight/Core/Services/Interop/ModalService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class ModalService { diff --git a/Moonlight/App/Services/Interop/ToastService.cs b/Moonlight/Core/Services/Interop/ToastService.cs similarity index 97% rename from Moonlight/App/Services/Interop/ToastService.cs rename to Moonlight/Core/Services/Interop/ToastService.cs index 1128cc9d..3e83dac7 100644 --- a/Moonlight/App/Services/Interop/ToastService.cs +++ b/Moonlight/Core/Services/Interop/ToastService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Moonlight.App.Services.Interop; +namespace Moonlight.Core.Services.Interop; public class ToastService { diff --git a/Moonlight/App/Services/MailService.cs b/Moonlight/Core/Services/MailService.cs similarity index 96% rename from Moonlight/App/Services/MailService.cs rename to Moonlight/Core/Services/MailService.cs index b04c7fbd..c025d27b 100644 --- a/Moonlight/App/Services/MailService.cs +++ b/Moonlight/Core/Services/MailService.cs @@ -1,9 +1,9 @@ using MailKit.Net.Smtp; using MimeKit; -using Moonlight.App.Database.Entities; -using Moonlight.App.Helpers; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class MailService { diff --git a/Moonlight/App/Services/PluginService.cs b/Moonlight/Core/Services/PluginService.cs similarity index 93% rename from Moonlight/App/Services/PluginService.cs rename to Moonlight/Core/Services/PluginService.cs index 6cd608f1..350f3a99 100644 --- a/Moonlight/App/Services/PluginService.cs +++ b/Moonlight/Core/Services/PluginService.cs @@ -1,13 +1,10 @@ using System.Reflection; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Abstractions.Services; -using Moonlight.App.Plugins; -using Moonlight.App.Plugins.Contexts; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Abstractions.Services; +using Moonlight.Core.Plugins; +using Moonlight.Core.Plugins.Contexts; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class PluginService { diff --git a/Moonlight/App/Services/ServiceManage/ServiceAdminService.cs b/Moonlight/Core/Services/ServiceManage/ServiceAdminService.cs similarity index 91% rename from Moonlight/App/Services/ServiceManage/ServiceAdminService.cs rename to Moonlight/Core/Services/ServiceManage/ServiceAdminService.cs index a22bf95d..57aa90c0 100644 --- a/Moonlight/App/Services/ServiceManage/ServiceAdminService.cs +++ b/Moonlight/Core/Services/ServiceManage/ServiceAdminService.cs @@ -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 { diff --git a/Moonlight/App/Services/ServiceManage/ServiceDefinitionService.cs b/Moonlight/Core/Services/ServiceManage/ServiceDefinitionService.cs similarity index 85% rename from Moonlight/App/Services/ServiceManage/ServiceDefinitionService.cs rename to Moonlight/Core/Services/ServiceManage/ServiceDefinitionService.cs index 20c59d50..8b390797 100644 --- a/Moonlight/App/Services/ServiceManage/ServiceDefinitionService.cs +++ b/Moonlight/Core/Services/ServiceManage/ServiceDefinitionService.cs @@ -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 { diff --git a/Moonlight/App/Services/ServiceManage/ServiceManageService.cs b/Moonlight/Core/Services/ServiceManage/ServiceManageService.cs similarity index 87% rename from Moonlight/App/Services/ServiceManage/ServiceManageService.cs rename to Moonlight/Core/Services/ServiceManage/ServiceManageService.cs index 8858fcc6..5e0c7c78 100644 --- a/Moonlight/App/Services/ServiceManage/ServiceManageService.cs +++ b/Moonlight/Core/Services/ServiceManage/ServiceManageService.cs @@ -1,11 +1,11 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Enums; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Database.Entities.Store; +using Moonlight.Core.Models.Abstractions; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.ServiceManage; +namespace Moonlight.Core.Services.ServiceManage; public class ServiceManageService { diff --git a/Moonlight/App/Services/ServiceManage/ServiceService.cs b/Moonlight/Core/Services/ServiceManage/ServiceService.cs similarity index 94% rename from Moonlight/App/Services/ServiceManage/ServiceService.cs rename to Moonlight/Core/Services/ServiceManage/ServiceService.cs index 24ab12df..021bec43 100644 --- a/Moonlight/App/Services/ServiceManage/ServiceService.cs +++ b/Moonlight/Core/Services/ServiceManage/ServiceService.cs @@ -1,10 +1,10 @@ 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; -namespace Moonlight.App.Services.ServiceManage; +namespace Moonlight.Core.Services.ServiceManage; public class ServiceService // This service is used for managing services and create the connection to the actual logic behind a service type { diff --git a/Moonlight/App/Services/SessionService.cs b/Moonlight/Core/Services/SessionService.cs similarity index 89% rename from Moonlight/App/Services/SessionService.cs rename to Moonlight/Core/Services/SessionService.cs index e013c3fe..61c7adf8 100644 --- a/Moonlight/App/Services/SessionService.cs +++ b/Moonlight/Core/Services/SessionService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Models.Abstractions; +using Moonlight.Core.Models.Abstractions; -namespace Moonlight.App.Services; +namespace Moonlight.Core.Services; public class SessionService { diff --git a/Moonlight/App/Services/Sys/MoonlightService.cs b/Moonlight/Core/Services/Sys/MoonlightService.cs similarity index 95% rename from Moonlight/App/Services/Sys/MoonlightService.cs rename to Moonlight/Core/Services/Sys/MoonlightService.cs index f6fb628c..11ce3416 100644 --- a/Moonlight/App/Services/Sys/MoonlightService.cs +++ b/Moonlight/Core/Services/Sys/MoonlightService.cs @@ -1,9 +1,9 @@ using System.IO.Compression; -using Moonlight.App.Event; -using Moonlight.App.Extensions; -using Moonlight.App.Helpers; +using Moonlight.Core.Event; +using Moonlight.Core.Extensions; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services.Sys; +namespace Moonlight.Core.Services.Sys; public class MoonlightService // This service can be used to perform strictly panel specific actions { diff --git a/Moonlight/App/Services/Sys/MoonlightThemeService.cs b/Moonlight/Core/Services/Sys/MoonlightThemeService.cs similarity index 89% rename from Moonlight/App/Services/Sys/MoonlightThemeService.cs rename to Moonlight/Core/Services/Sys/MoonlightThemeService.cs index 281e3f55..1d9b81c4 100644 --- a/Moonlight/App/Services/Sys/MoonlightThemeService.cs +++ b/Moonlight/Core/Services/Sys/MoonlightThemeService.cs @@ -1,9 +1,9 @@ using Mappy.Net; -using Moonlight.App.Database.Entities; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Models.Abstractions; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.Sys; +namespace Moonlight.Core.Services.Sys; public class MoonlightThemeService { diff --git a/Moonlight/App/Services/Users/UserAuthService.cs b/Moonlight/Core/Services/Users/UserAuthService.cs similarity index 89% rename from Moonlight/App/Services/Users/UserAuthService.cs rename to Moonlight/Core/Services/Users/UserAuthService.cs index 4dd055dc..78217cc6 100644 --- a/Moonlight/App/Services/Users/UserAuthService.cs +++ b/Moonlight/Core/Services/Users/UserAuthService.cs @@ -1,16 +1,16 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Event; -using Moonlight.App.Exceptions; -using Moonlight.App.Extensions; -using Moonlight.App.Helpers; -using Moonlight.App.Models.Abstractions; -using Moonlight.App.Models.Enums; -using Moonlight.App.Models.Templates; -using Moonlight.App.Repositories; -using Moonlight.App.Services.Utils; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Event; +using Moonlight.Core.Exceptions; +using Moonlight.Core.Extensions; +using Moonlight.Core.Helpers; +using Moonlight.Core.Models.Abstractions; +using Moonlight.Core.Models.Enums; +using Moonlight.Core.Models.Templates; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services.Utils; using OtpNet; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserAuthService { diff --git a/Moonlight/App/Services/Users/UserDeleteService.cs b/Moonlight/Core/Services/Users/UserDeleteService.cs similarity index 93% rename from Moonlight/App/Services/Users/UserDeleteService.cs rename to Moonlight/Core/Services/Users/UserDeleteService.cs index 6280c16e..c943b9e4 100644 --- a/Moonlight/App/Services/Users/UserDeleteService.cs +++ b/Moonlight/Core/Services/Users/UserDeleteService.cs @@ -1,13 +1,14 @@ using Microsoft.EntityFrameworkCore; -using Moonlight.App.Database.Entities; -using Moonlight.App.Database.Entities.Community; -using Moonlight.App.Database.Entities.Store; -using Moonlight.App.Database.Entities.Tickets; -using Moonlight.App.Repositories; -using Moonlight.App.Services.Community; -using Moonlight.App.Services.ServiceManage; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Database.Entities.Store; +using Moonlight.Core.Repositories; +using Moonlight.Core.Services.ServiceManage; +using Moonlight.Features.Community.Entities; +using Moonlight.Features.Community.Services; +using Moonlight.Features.StoreSystem.Entities; +using Moonlight.Features.Ticketing.Entities; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserDeleteService { diff --git a/Moonlight/App/Services/Users/UserDetailsService.cs b/Moonlight/Core/Services/Users/UserDetailsService.cs similarity index 89% rename from Moonlight/App/Services/Users/UserDetailsService.cs rename to Moonlight/Core/Services/Users/UserDetailsService.cs index f1070ff0..96b3178d 100644 --- a/Moonlight/App/Services/Users/UserDetailsService.cs +++ b/Moonlight/Core/Services/Users/UserDetailsService.cs @@ -1,7 +1,7 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserDetailsService { diff --git a/Moonlight/App/Services/Users/UserService.cs b/Moonlight/Core/Services/Users/UserService.cs similarity index 90% rename from Moonlight/App/Services/Users/UserService.cs rename to Moonlight/Core/Services/Users/UserService.cs index 4770545d..798e8493 100644 --- a/Moonlight/App/Services/Users/UserService.cs +++ b/Moonlight/Core/Services/Users/UserService.cs @@ -1,8 +1,8 @@ -using Moonlight.App.Database.Entities; -using Moonlight.App.Exceptions; -using Moonlight.App.Repositories; +using Moonlight.Core.Database.Entities; +using Moonlight.Core.Exceptions; +using Moonlight.Core.Repositories; -namespace Moonlight.App.Services.Users; +namespace Moonlight.Core.Services.Users; public class UserService { diff --git a/Moonlight/App/Services/Utils/ConnectionService.cs b/Moonlight/Core/Services/Utils/ConnectionService.cs similarity index 94% rename from Moonlight/App/Services/Utils/ConnectionService.cs rename to Moonlight/Core/Services/Utils/ConnectionService.cs index 9f505913..e79e10b9 100644 --- a/Moonlight/App/Services/Utils/ConnectionService.cs +++ b/Moonlight/Core/Services/Utils/ConnectionService.cs @@ -1,6 +1,6 @@ -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; -namespace Moonlight.App.Services.Utils; +namespace Moonlight.Core.Services.Utils; public class ConnectionService { diff --git a/Moonlight/App/Services/Utils/JwtService.cs b/Moonlight/Core/Services/Utils/JwtService.cs similarity index 96% rename from Moonlight/App/Services/Utils/JwtService.cs rename to Moonlight/Core/Services/Utils/JwtService.cs index 3021c1c8..2712ea12 100644 --- a/Moonlight/App/Services/Utils/JwtService.cs +++ b/Moonlight/Core/Services/Utils/JwtService.cs @@ -1,9 +1,9 @@ using JWT.Algorithms; using JWT.Builder; -using Moonlight.App.Helpers; +using Moonlight.Core.Helpers; using Newtonsoft.Json; -namespace Moonlight.App.Services.Utils; +namespace Moonlight.Core.Services.Utils; public class JwtService { diff --git a/Moonlight/Shared/Components/Forms/AutoCrud.razor b/Moonlight/Core/UI/Components/Forms/AutoCrud.razor similarity index 99% rename from Moonlight/Shared/Components/Forms/AutoCrud.razor rename to Moonlight/Core/UI/Components/Forms/AutoCrud.razor index dfad589f..0cdd39cc 100644 --- a/Moonlight/Shared/Components/Forms/AutoCrud.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoCrud.razor @@ -1,7 +1,8 @@ @using BlazorTable -@using Moonlight.App.Repositories @using System.Linq.Expressions @using Mappy.Net +@using Moonlight.Core.Repositories +@using Moonlight.Core.Services.Interop @typeparam TItem where TItem : class @typeparam TCreateForm diff --git a/Moonlight/Shared/Components/Forms/AutoForm.razor b/Moonlight/Core/UI/Components/Forms/AutoForm.razor similarity index 94% rename from Moonlight/Shared/Components/Forms/AutoForm.razor rename to Moonlight/Core/UI/Components/Forms/AutoForm.razor index 3135cf1b..b3d248e8 100644 --- a/Moonlight/Shared/Components/Forms/AutoForm.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoForm.razor @@ -1,5 +1,4 @@ -@using Moonlight.App.Extensions - +@using Moonlight.Core.Helpers @typeparam TForm @foreach (var prop in typeof(TForm).GetProperties()) diff --git a/Moonlight/Shared/Components/Forms/AutoProperty.razor b/Moonlight/Core/UI/Components/Forms/AutoProperty.razor similarity index 97% rename from Moonlight/Shared/Components/Forms/AutoProperty.razor rename to Moonlight/Core/UI/Components/Forms/AutoProperty.razor index 202b542a..71afe7e8 100644 --- a/Moonlight/Shared/Components/Forms/AutoProperty.razor +++ b/Moonlight/Core/UI/Components/Forms/AutoProperty.razor @@ -1,8 +1,9 @@ @using System.Reflection @using System.ComponentModel @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Extensions.Attributes -@using Moonlight.App.Repositories +@using Moonlight.Core.Extensions.Attributes +@using Moonlight.Core.Helpers +@using Moonlight.Core.Repositories @typeparam TProp @inject IServiceProvider ServiceProvider diff --git a/Moonlight/Shared/Components/Forms/ChatFileSelect.razor b/Moonlight/Core/UI/Components/Forms/ChatFileSelect.razor similarity index 95% rename from Moonlight/Shared/Components/Forms/ChatFileSelect.razor rename to Moonlight/Core/UI/Components/Forms/ChatFileSelect.razor index 2256bc32..9c9dcde7 100644 --- a/Moonlight/Shared/Components/Forms/ChatFileSelect.razor +++ b/Moonlight/Core/UI/Components/Forms/ChatFileSelect.razor @@ -1,4 +1,6 @@ @using Microsoft.AspNetCore.Components.Forms +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services.Interop @inject ToastService ToastService diff --git a/Moonlight/Shared/Components/Forms/ConfirmButton.razor b/Moonlight/Core/UI/Components/Forms/ConfirmButton.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/ConfirmButton.razor rename to Moonlight/Core/UI/Components/Forms/ConfirmButton.razor diff --git a/Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor b/Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor similarity index 91% rename from Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor rename to Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor index 25047634..cd918127 100644 --- a/Moonlight/Shared/Components/Forms/DynamicTypedAutoForm.razor +++ b/Moonlight/Core/UI/Components/Forms/DynamicTypedAutoForm.razor @@ -1,4 +1,5 @@ -@{ +@using Moonlight.Core.Helpers +@{ var typeToCreate = typeof(AutoForm<>).MakeGenericType(Model.GetType()); var rf = ComponentHelper.FromType(typeToCreate, parameter => { diff --git a/Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor similarity index 95% rename from Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor index 1cb6a673..0897bba2 100644 --- a/Moonlight/Shared/Components/Forms/SmartCustomFileSelect.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartCustomFileSelect.razor @@ -1,4 +1,6 @@ @using Microsoft.AspNetCore.Components.Forms +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services.Interop @inject ToastService ToastService diff --git a/Moonlight/Shared/Components/Forms/SmartDropdown.razor b/Moonlight/Core/UI/Components/Forms/SmartDropdown.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartDropdown.razor rename to Moonlight/Core/UI/Components/Forms/SmartDropdown.razor diff --git a/Moonlight/Shared/Components/Forms/SmartEnumSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartEnumSelect.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartEnumSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartEnumSelect.razor diff --git a/Moonlight/Shared/Components/Forms/SmartFileSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor similarity index 95% rename from Moonlight/Shared/Components/Forms/SmartFileSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor index f0848210..a78f2881 100644 --- a/Moonlight/Shared/Components/Forms/SmartFileSelect.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartFileSelect.razor @@ -1,4 +1,6 @@ @using Microsoft.AspNetCore.Components.Forms +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services.Interop @inject ToastService ToastService diff --git a/Moonlight/Shared/Components/Forms/SmartForm.razor b/Moonlight/Core/UI/Components/Forms/SmartForm.razor similarity index 99% rename from Moonlight/Shared/Components/Forms/SmartForm.razor rename to Moonlight/Core/UI/Components/Forms/SmartForm.razor index f78d4fa5..f0228181 100644 --- a/Moonlight/Shared/Components/Forms/SmartForm.razor +++ b/Moonlight/Core/UI/Components/Forms/SmartForm.razor @@ -1,5 +1,5 @@ @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Exceptions +@using Moonlight.Core.Exceptions
diff --git a/Moonlight/Shared/Components/Forms/SmartSelect.razor b/Moonlight/Core/UI/Components/Forms/SmartSelect.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/SmartSelect.razor rename to Moonlight/Core/UI/Components/Forms/SmartSelect.razor diff --git a/Moonlight/Shared/Components/Forms/TextEditor.razor b/Moonlight/Core/UI/Components/Forms/TextEditor.razor similarity index 99% rename from Moonlight/Shared/Components/Forms/TextEditor.razor rename to Moonlight/Core/UI/Components/Forms/TextEditor.razor index 54e1f59b..1496278c 100644 --- a/Moonlight/Shared/Components/Forms/TextEditor.razor +++ b/Moonlight/Core/UI/Components/Forms/TextEditor.razor @@ -1,7 +1,8 @@ @inject IJSRuntime JsRuntime @using Microsoft.AspNetCore.Components.Forms -@using Moonlight.App.Services @using Ganss.Xss +@using Moonlight.Core.Helpers +@using Moonlight.Core.Services @inherits InputBase @inject IdentityService IdentityService diff --git a/Moonlight/Shared/Components/Forms/WButton.razor b/Moonlight/Core/UI/Components/Forms/WButton.razor similarity index 100% rename from Moonlight/Shared/Components/Forms/WButton.razor rename to Moonlight/Core/UI/Components/Forms/WButton.razor diff --git a/Moonlight/Shared/Components/Partials/ConnectionIndicator.razor b/Moonlight/Core/UI/Components/Partials/ConnectionIndicator.razor similarity index 100% rename from Moonlight/Shared/Components/Partials/ConnectionIndicator.razor rename to Moonlight/Core/UI/Components/Partials/ConnectionIndicator.razor diff --git a/Moonlight/Shared/Components/Partials/LazyLoader.razor b/Moonlight/Core/UI/Components/Partials/LazyLoader.razor similarity index 100% rename from Moonlight/Shared/Components/Partials/LazyLoader.razor rename to Moonlight/Core/UI/Components/Partials/LazyLoader.razor diff --git a/Moonlight/Shared/Components/Partials/PageHeader.razor b/Moonlight/Core/UI/Components/Partials/PageHeader.razor similarity index 97% rename from Moonlight/Shared/Components/Partials/PageHeader.razor rename to Moonlight/Core/UI/Components/Partials/PageHeader.razor index d6887719..fd990728 100644 --- a/Moonlight/Shared/Components/Partials/PageHeader.razor +++ b/Moonlight/Core/UI/Components/Partials/PageHeader.razor @@ -1,5 +1,6 @@ -@using Moonlight.Shared.Layouts -@using Moonlight.App.Services +@using Moonlight.Core.Services +@using Moonlight.Core.Services.Interop +@using Moonlight.Core.UI.Layouts @inject IdentityService IdentityService @inject ConfigService ConfigService diff --git a/Moonlight/Shared/Components/Partials/PermissionChecker.razor b/Moonlight/Core/UI/Components/Partials/PermissionChecker.razor similarity index 92% rename from Moonlight/Shared/Components/Partials/PermissionChecker.razor rename to Moonlight/Core/UI/Components/Partials/PermissionChecker.razor index 227be23d..7b366f68 100644 --- a/Moonlight/Shared/Components/Partials/PermissionChecker.razor +++ b/Moonlight/Core/UI/Components/Partials/PermissionChecker.razor @@ -1,7 +1,6 @@ -@using Moonlight.App.Extensions.Attributes -@using Moonlight.App.Models.Abstractions -@using Moonlight.App.Services - +@using Moonlight.Core.Extensions.Attributes +@using Moonlight.Core.Models.Abstractions +@using Moonlight.Core.Services @inject IdentityService IdentityService @if (Allowed) diff --git a/Moonlight/Shared/Components/Partials/Sidebar.razor b/Moonlight/Core/UI/Components/Partials/Sidebar.razor similarity index 96% rename from Moonlight/Shared/Components/Partials/Sidebar.razor rename to Moonlight/Core/UI/Components/Partials/Sidebar.razor index e21c3e9b..f03f3b46 100644 --- a/Moonlight/Shared/Components/Partials/Sidebar.razor +++ b/Moonlight/Core/UI/Components/Partials/Sidebar.razor @@ -1,6 +1,6 @@ -@using Moonlight.Shared.Layouts -@using Moonlight.App.Services -@using Moonlight.App.Models.Enums +@using Moonlight.Core.Services +@using Moonlight.Core.Models.Enums +@using Moonlight.Core.UI.Layouts @inject IdentityService IdentityService @@ -11,7 +11,7 @@
-
+