Skip to content

Commit

Permalink
Merge pull request #2 from bentran1vn/revert-1-Entity
Browse files Browse the repository at this point in the history
Revert "Add new entities and update EF Core migration"
  • Loading branch information
PhucNghi176 authored Sep 27, 2024
2 parents 8b6313d + c263b8e commit 5c23372
Show file tree
Hide file tree
Showing 25 changed files with 18 additions and 1,979 deletions.
4 changes: 2 additions & 2 deletions MBS-COMMAND.API/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ConnectionStrings": {
"ConnectionStrings": "Server=103.185.184.35;Database=PRNSUPPER;Uid=sa;Pwd=AnhBiLongDaiKa@;Trust Server Certificate=True;",
"Redis": "103.185.184.35:6379,password=Thientan291157@,abortConnect=false"
"ConnectionStrings": "Server=14.225.205.54;Database=AntreeDB;Uid=sa;Pwd=Thientan291157@;Trust Server Certificate=True;",
"Redis": "103.162.14.116:6379"
},
"JwtOption": {
"Issuer": "http://103.162.14.116:8080",
Expand Down
21 changes: 0 additions & 21 deletions MBS-COMMAND.API/logs/log-20240927.txt

This file was deleted.

7 changes: 0 additions & 7 deletions MBS_COMMAND.Domain/Abstractions/Entities/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,4 @@ public abstract class Entity<T> : IEntity<T>
public T Id { get; protected set; }

public bool IsDeleted { get; protected set; }
}
public abstract class Entity : Entity<Guid>, IEntity<Guid>
{
protected Entity()
{
Id = Guid.NewGuid();
}
}
5 changes: 4 additions & 1 deletion MBS_COMMAND.Domain/Abstractions/Entities/IEntity.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
namespace MBS_COMMAND.Domain.Abstractions.Entities;

public interface IEntity<T>;
public interface IEntity<T>
{

}
10 changes: 0 additions & 10 deletions MBS_COMMAND.Domain/Entities/Category.cs

This file was deleted.

14 changes: 0 additions & 14 deletions MBS_COMMAND.Domain/Entities/Certificate.cs

This file was deleted.

10 changes: 0 additions & 10 deletions MBS_COMMAND.Domain/Entities/Config.cs

This file was deleted.

15 changes: 0 additions & 15 deletions MBS_COMMAND.Domain/Entities/Feedback.cs

This file was deleted.

16 changes: 0 additions & 16 deletions MBS_COMMAND.Domain/Entities/Group.cs

This file was deleted.

11 changes: 0 additions & 11 deletions MBS_COMMAND.Domain/Entities/Group_Student_Mapping.cs

This file was deleted.

15 changes: 0 additions & 15 deletions MBS_COMMAND.Domain/Entities/Project.cs

This file was deleted.

20 changes: 0 additions & 20 deletions MBS_COMMAND.Domain/Entities/Schedule.cs

This file was deleted.

12 changes: 0 additions & 12 deletions MBS_COMMAND.Domain/Entities/Semester.cs

This file was deleted.

14 changes: 0 additions & 14 deletions MBS_COMMAND.Domain/Entities/Skill.cs

This file was deleted.

16 changes: 0 additions & 16 deletions MBS_COMMAND.Domain/Entities/Slot.cs

This file was deleted.

20 changes: 0 additions & 20 deletions MBS_COMMAND.Domain/Entities/Subject.cs

This file was deleted.

17 changes: 0 additions & 17 deletions MBS_COMMAND.Domain/Entities/Transaction.cs

This file was deleted.

20 changes: 0 additions & 20 deletions MBS_COMMAND.Domain/Entities/User.cs

This file was deleted.

4 changes: 4 additions & 0 deletions MBS_COMMAND.Domain/MBS_COMMAND.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ProjectReference Include="..\MBS_COMMAND.Contract\MBS_COMMAND.Contract.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Entities\" />
</ItemGroup>

</Project>
24 changes: 7 additions & 17 deletions MBS_COMMAND.Persistence/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using MBS_AUTHORIZATION.Domain.Entities;
using MBS_COMMAND.Domain.Entities;
using Microsoft.EntityFrameworkCore;

namespace MBS_COMMAND.Persistence;
Expand All @@ -14,19 +12,11 @@ public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
protected override void OnModelCreating(ModelBuilder builder) =>
builder.ApplyConfigurationsFromAssembly(AssemblyReference.Assembly);

public virtual DbSet<Category> Categories { get; set; }
public virtual DbSet<Certificate> Certificates { get; set; }
public virtual DbSet<Config> Configs { get; set; }
public virtual DbSet<Feedback> Feedbacks { get; set; }
public virtual DbSet<Group> Groups { get; set; }
public virtual DbSet<Group_Student_Mapping> group_Student_Mappings { get; set; }
public virtual DbSet<Project> Projects { get; set; }
public virtual DbSet<Schedule> Schedules { get; set; }
public virtual DbSet<Semester> Semesters { get; set; }
public virtual DbSet<Skill> Skills { get; set; }
public virtual DbSet<Slot> Slots { get; set; }
public virtual DbSet<Subject> Subjects { get; set; }
public virtual DbSet<Transaction> Transactions { get; set; }
public virtual DbSet<User> Users { get; set; }

// public DbSet<AppUser> AppUses { get; set; }
// public DbSet<Action> Actions { get; set; }
// public DbSet<Function> Functions { get; set; }
// public DbSet<ActionInFunction> ActionInFunctions { get; set; }
// public DbSet<Permission> Permissions { get; set; }
//
// public DbSet<Product> Products { get; set; }
}

This file was deleted.

16 changes: 1 addition & 15 deletions MBS_COMMAND.Persistence/Constants/TableNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,5 @@ internal static class TableNames
internal const string OutboxMessages = nameof(OutboxMessages);

// *********** Singular Nouns ***********
internal const string Category = nameof(Category);
internal const string Certificate = nameof(Certificate);
internal const string Config = nameof(Config);
internal const string Feedback = nameof(Feedback);
internal const string Group = nameof(Group);
internal const string Group_Student_Mapping = nameof(Group_Student_Mapping);
internal const string Project = nameof(Project);
internal const string Schedule = nameof(Schedule);
internal const string Semester = nameof(Semester);
internal const string Skill = nameof(Skill);
internal const string Slot = nameof(Slot);
internal const string Subject = nameof(Subject);
internal const string Transaction = nameof(Transaction);
internal const string User = nameof(User);

internal const string Product = nameof(Product);
}
Loading

0 comments on commit 5c23372

Please sign in to comment.