Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
foxminchan committed Feb 16, 2023
1 parent bb4326c commit 2edac8d
Show file tree
Hide file tree
Showing 24 changed files with 887 additions and 110 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
9 changes: 9 additions & 0 deletions Application/Services/AuthorizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@

namespace Application.Services
{
/**
* @Project ASP.NET Core 7.0
* @Author: Nguyen Xuan Nhan
* @Team: 4FT
* @Copyright (C) 2023 4FT. All rights reserved
* @License MIT
* @Create date Mon 23 Jan 2023 00:00:00 AM +07
*/

public class AuthorizationService
{
private readonly IIdentityClaimRepository _identityClaimRepository;
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ Tất cả những thay đổi đáng chú ý đối với dự án này sẽ đ
## Sửa đổi:

- Thay đổi đường dẫn API

## [1.1.0] - 2021/02/17

### Tính năng mới:

- Phân quyền cho API
- Policy cho API
- Refresh token
- Thêm header Authorization cho API
- Triển khai HATEOAS
- Thêm bộ đệm cho API

## Sửa đổi:

- Thay đổi đường dẫn API
10 changes: 0 additions & 10 deletions Infrastructure/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<RefreshToken>(entity =>
{
entity.ToTable("RefreshTokens");
entity.ToView("vRefreshTokens");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("bigint")
Expand All @@ -65,7 +64,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Teacher>(entity =>
{
entity.ToTable("Teachers");
entity.ToView("vTeachers");
entity.HasKey(e => e.id);
entity.Property(e => e.fullName)
.HasColumnType("nvarchar(50)")
Expand All @@ -84,7 +82,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Branch>(entity =>
{
entity.ToTable("Branches");
entity.ToView("vBranches");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("char(5)");
Expand All @@ -99,7 +96,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Class>(entity =>
{
entity.ToTable("Classes");
entity.ToView("vClasses");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("char(7)");
Expand Down Expand Up @@ -127,7 +123,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Student>(entity =>
{
entity.ToTable("Students");
entity.ToView("vStudents");
entity.HasKey(e => e.id);
entity.Property(e => e.fullName)
.HasColumnType("nvarchar(50)")
Expand All @@ -145,7 +140,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<ClassStudent>(entity =>
{
entity.ToTable("ClassStudents");
entity.ToView("vClassStudents");
entity.HasKey(e => new { e.classId, e.studentId });
entity.HasOne(s => s.@class)
.WithMany(g => g.classStudents)
Expand All @@ -160,7 +154,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Category>(entity =>
{
entity.ToTable("Categories");
entity.ToView("vCategories");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("char(5)");
Expand All @@ -172,7 +165,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Course>(entity =>
{
entity.ToTable("Courses");
entity.ToView("vCourses");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("char(5)");
Expand All @@ -190,7 +182,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Lesson>(entity =>
{
entity.ToTable("Lessons");
entity.ToView("vLessons");
entity.HasKey(e => e.id);
entity.Property(e => e.id)
.HasColumnType("char(10)");
Expand All @@ -208,7 +199,6 @@ protected override void OnModelCreating(ModelBuilder builder)
builder.Entity<Attendance>(entity =>
{
entity.ToTable("Attendance");
entity.ToView("vAttendance");
entity.HasKey(e => new { e.classId, e.lessonId });
entity.Property(e => e.date)
.HasConversion<StringConverter>()
Expand Down
Loading

0 comments on commit 2edac8d

Please sign in to comment.