添加项目文件。
This commit is contained in:
34
Entities/Contracts/ClassStudent.cs
Normal file
34
Entities/Contracts/ClassStudent.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("class_student")]
|
||||
public class ClassStudent
|
||||
{
|
||||
[Key]
|
||||
[Column("class_id", Order = 0)]
|
||||
[ForeignKey("Class")]
|
||||
public Guid ClassId { get; set; }
|
||||
|
||||
[Key]
|
||||
[Column("student_id", Order = 1)]
|
||||
[ForeignKey("Student")]
|
||||
public Guid StudentId { get; set; }
|
||||
|
||||
[Column("enrollment_date")]
|
||||
public DateTime EnrollmentDate { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public Class Class { get; set; }
|
||||
public User Student { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user