Skip to content

Commit

Permalink
chors: divide domain project lib
Browse files Browse the repository at this point in the history
  • Loading branch information
mtai0524 committed Nov 14, 2024
1 parent 489a0ff commit 277bdc9
Show file tree
Hide file tree
Showing 32 changed files with 68 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Notaion.Models;
using Notaion.Domain.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Notaion.Entities
namespace Notaion.Domain.Entities
{
[Table("Chat")]
public class Chat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Notaion.Models;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Notaion.Domain.Models;

namespace Notaion.Entities
namespace Notaion.Domain.Entities
{
[Table("ChatPrivate")]
public class ChatPrivate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Notaion.Models;
using Notaion.Domain.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Notaion.Entities
namespace Notaion.Domain.Entities
{
[Table("FriendShip")]
public class FriendShip
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Notaion.Models;
using Notaion.Domain.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Notaion.Entities
namespace Notaion.Domain.Entities
{
[Table("Page")]
public class Page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace Notaion.Models
namespace Notaion.Domain.Models

{
public class AcceptFriendRequestModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace Notaion.Models
namespace Notaion.Domain.Models

{
public class ChatPrivateViewModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace Notaion.Models
namespace Notaion.Domain.Models

{
public class ChatViewModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Notaion.Models
namespace Notaion.Domain.Models
{
public class CreatePage
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

namespace Notaion.Models
namespace Notaion.Domain.Models
{
public class SignUpModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace Notaion.Models
namespace Notaion.Domain.Models

{
public class UpdatePageContentDto
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Identity;

namespace Notaion.Models
namespace Notaion.Domain.Models
{
public class User : IdentityUser
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Notaion.Models
namespace Notaion.Domain.Models
{
public class UserProfile
{
Expand Down
13 changes: 13 additions & 0 deletions NotaionWebApp/Notaion.Domain/Notaion.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.10" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions NotaionWebApp/Notaion/Context/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Notaion.Domain.Entities;
using Notaion.Domain.Models;
using Notaion.Entities;
using Notaion.Models;

Expand Down
1 change: 1 addition & 0 deletions NotaionWebApp/Notaion/Controllers/ApiAccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Microsoft.AspNetCore.SignalR;
using Notaion.Hubs;
using Notaion.Entities;
using Notaion.Domain.Models;

namespace WebAPI.Controllers
{
Expand Down
2 changes: 2 additions & 0 deletions NotaionWebApp/Notaion/Controllers/ChatController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Authorization;
using Notaion.Domain.Models;
using Notaion.Domain.Entities;

namespace Notaion.Controllers
{
Expand Down
2 changes: 2 additions & 0 deletions NotaionWebApp/Notaion/Controllers/ChatPrivateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Microsoft.AspNetCore.SignalR;
using Microsoft.EntityFrameworkCore;
using Notaion.Context;
using Notaion.Domain.Entities;
using Notaion.Domain.Models;
using Notaion.Entities;
using Notaion.Hubs;
using Notaion.Models;
Expand Down
2 changes: 2 additions & 0 deletions NotaionWebApp/Notaion/Controllers/FriendShipController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Notaion.Context;
using Notaion.Domain.Entities;
using Notaion.Domain.Models;
using Notaion.Entities;
using Notaion.Models;

Expand Down
2 changes: 2 additions & 0 deletions NotaionWebApp/Notaion/Controllers/PageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Notaion.Context;
using Notaion.Domain.Entities;
using Notaion.Domain.Models;
using Notaion.Entities;
using Notaion.Models;
using System.Security.Claims;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasIndex("UserId");

b.ToTable("Chat");
b.ToTable("Chat", (string)null);
});

modelBuilder.Entity("Notaion.Entities.ChatPrivate", b =>
Expand Down Expand Up @@ -289,7 +289,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasIndex("UserId");

b.ToTable("ChatPrivate");
b.ToTable("ChatPrivate", (string)null);
});

modelBuilder.Entity("Notaion.Entities.FriendShip", b =>
Expand Down Expand Up @@ -318,7 +318,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasIndex("SenderId");

b.ToTable("FriendShip");
b.ToTable("FriendShip", (string)null);
});

modelBuilder.Entity("Notaion.Entities.Item", b =>
Expand All @@ -340,7 +340,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasKey("Id");

b.ToTable("Items");
b.ToTable("Items", (string)null);
});

modelBuilder.Entity("Notaion.Entities.Notification", b =>
Expand Down Expand Up @@ -375,7 +375,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasKey("Id");

b.ToTable("Notification");
b.ToTable("Notification", (string)null);
});

modelBuilder.Entity("Notaion.Entities.Page", b =>
Expand Down Expand Up @@ -405,7 +405,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

b.HasIndex("UserId");

b.ToTable("Page");
b.ToTable("Page", (string)null);
});

modelBuilder.Entity("Notaion.Models.User", b =>
Expand Down
4 changes: 4 additions & 0 deletions NotaionWebApp/Notaion/Notaion.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Notaion.Domain\Notaion.Domain.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion NotaionWebApp/Notaion/Notaion.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ActiveDebugProfile>https</ActiveDebugProfile>
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>T:\notaion-backend\NotaionWebApp\Notaion\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>T:\notaion-backend\NotaionWebApp\Notaion\Properties\PublishProfiles\site8642-WebDeploy1.pubxml</NameOfLastUsedPublishProfile>
<WebStackScaffolding_ControllerDialogWidth>650</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
Expand Down
1 change: 1 addition & 0 deletions NotaionWebApp/Notaion/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Microsoft.IdentityModel.Tokens;
using Notaion.Configurations;
using Notaion.Context;
using Notaion.Domain.Models;
using Notaion.Hubs;
using Notaion.Models;
using Notaion.Repositories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>T:\IIS_NOTAION</_PublishTargetUrl>
<History>True|2024-10-12T13:44:23.3664909Z||;</History>
<History>True|2024-10-28T12:02:12.6100652Z||;True|2024-10-12T20:44:23.3664909+07:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA45ACkv6Ev0Gy7utx8HyVkgAAAAACAAAAAAAQZgAAAAEAACAAAABSm0dADuKEoSXI2PM3/C+djjsZNaNJvaNktK2zzOh0ZQAAAAAOgAAAAAIAACAAAAAaubSe329ikteIzbdUehSGkeEFWcMirIFoj/tBJlG3PCAAAAAaOwJII3B0tuPaPOzYnGrfQAgIQnX5FDaCdhlVr8BQDEAAAADxwckrnekLCzuMBtAKkP1cCWMOulRqdqFNLxcPxe9HXD/Y0JACDx7eUDw/7grdO/SQQKIkbvxPSZZdbFnGYkiS</EncryptedPassword>
<History>True|2024-10-08T10:12:03.4740526Z||;</History>
<History>True|2024-10-28T12:07:16.1054653Z||;True|2024-10-08T17:12:03.4740526+07:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions NotaionWebApp/Notaion/Repositories/AccountRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using CloudinaryDotNet;
using CloudinaryDotNet.Actions;
using Notaion.Services;
using Notaion.Domain.Models;

namespace Notaion.Repositories
{
Expand Down
1 change: 1 addition & 0 deletions NotaionWebApp/Notaion/Repositories/IAccountRepository.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Notaion.Domain.Models;
using Notaion.Models;

namespace Notaion.Repositories
Expand Down
1 change: 1 addition & 0 deletions NotaionWebApp/Notaion/Services/UserService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Notaion.Context;
using Notaion.Domain.Models;
using Notaion.Models;

namespace Notaion.Services
Expand Down
6 changes: 6 additions & 0 deletions NotaionWebApp/NotionWebApp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 17.8.34511.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notaion", "Notaion\Notaion.csproj", "{EF90AC04-F263-48D1-AC7F-50E4D835E8D6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notaion.Domain", "Notaion.Domain\Notaion.Domain.csproj", "{20E32AC7-43D6-450C-A848-22C0012BD4D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{EF90AC04-F263-48D1-AC7F-50E4D835E8D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF90AC04-F263-48D1-AC7F-50E4D835E8D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF90AC04-F263-48D1-AC7F-50E4D835E8D6}.Release|Any CPU.Build.0 = Release|Any CPU
{20E32AC7-43D6-450C-A848-22C0012BD4D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20E32AC7-43D6-450C-A848-22C0012BD4D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20E32AC7-43D6-450C-A848-22C0012BD4D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20E32AC7-43D6-450C-A848-22C0012BD4D9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 277bdc9

Please sign in to comment.