35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
namespace Project.Entities;
|
|
|
|
public class Statement
|
|
{
|
|
public int Id { get; private set; }
|
|
public int TeacherId { get; private set; }
|
|
public int SubjectId { get; private set; }
|
|
public DateTime Date { get; private set; }
|
|
public IEnumerable<StatementStudent> StatementStudents { get; private set; } = [];
|
|
|
|
public static Statement CreateOperation(int id, int teacherId, int subjectId, DateTime date, IEnumerable<StatementStudent> statementStudents)
|
|
{
|
|
return new Statement
|
|
{
|
|
Id = id,
|
|
TeacherId = teacherId,
|
|
SubjectId = subjectId,
|
|
Date = date,
|
|
StatementStudents = statementStudents
|
|
};
|
|
}
|
|
|
|
public static Statement CreateOperation(TempStatementStudent tempStatementStudent, IEnumerable<StatementStudent> statementStudents)
|
|
{
|
|
return new Statement
|
|
{
|
|
Id = tempStatementStudent.Id,
|
|
TeacherId = tempStatementStudent.TeacherId,
|
|
SubjectId = tempStatementStudent.SubjectId,
|
|
Date = tempStatementStudent.Date,
|
|
StatementStudents = statementStudents
|
|
};
|
|
}
|
|
}
|