diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs deleted file mode 100644 index 4876ec9cb992e209a764a46fc8e0de7107af6a28..0000000000000000000000000000000000000000 --- a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/GradeDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Text.Json.Serialization; - -namespace Tsi1.BusinessLayer.Dtos -{ - public class GradeDto - { - public int ActivityId { get; set; } - - public int UserId { get; set; } - - public decimal Value { get; set; } - } -} diff --git a/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs b/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs deleted file mode 100644 index c5c05e7a5c541434a33b3dd28131b76876711d34..0000000000000000000000000000000000000000 --- a/Tsi1.Api/Tsi1.DataLayer/Entities/Grade.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Tsi1.DataLayer.Entities -{ - public class Grade - { - public int ActivityId { get; set; } - - public int StudentId { get; set; } - - public decimal Value { get; set; } - - public DateTime Date { get; set; } - - public Student Student { get; set; } - - public Activity Activity { get; set; } - } -} diff --git a/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs b/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs deleted file mode 100644 index d8596a9ff6de422d94466eab94b3bcba0aa9736a..0000000000000000000000000000000000000000 --- a/Tsi1.Api/Tsi1.DataLayer/EntityConfiguration/GradeConfiguration.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using System; -using System.Collections.Generic; -using System.Text; -using Tsi1.DataLayer.Entities; - -namespace Tsi1.DataLayer.EntityConfiguration -{ - public class GradeConfiguration : IEntityTypeConfiguration<Grade> - { - public void Configure(EntityTypeBuilder<Grade> builder) - { - builder.HasKey(x => new { x.ActivityId, x.StudentId}); - - builder.Property(x => x.Value) - .IsRequired() - .HasColumnType("NUMERIC(5,2)"); - - builder.HasOne(x => x.Activity) - .WithMany(x => x.Grades) - .HasForeignKey(x => x.ActivityId); - - builder.HasOne(x => x.Student) - .WithMany(x => x.Grades) - .HasForeignKey(x => x.StudentId); - } - } -}