Pibd-22_Lyakhov_T.I._Simple/StudentProgressRecord/Entity/Statement.cs
2024-11-25 18:18:53 +04:00

49 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Entity
{
public class Statement
{
public long Id { get; set; }
public long SubjectId { get; set; }
public long TeacherId { get; set; }
public DateTime Date { get; set; }
public IEnumerable<Marks> Marks { get; set; } = [];
public static Statement CreateOperation(long id, long subjectId, long teacherId,
DateTime timeStamp, IEnumerable<Marks> marks)
{
return new Statement
{
Id = id,
SubjectId = subjectId,
TeacherId = teacherId,
Date = timeStamp,
Marks = marks
};
}
public static Statement CreateOperation(TempStatement statement, IEnumerable<Marks> marks)
{
return new Statement
{
Id = statement.Id,
SubjectId = statement.SubjectId,
TeacherId = statement.TeacherId,
Date = statement.Date,
Marks = marks
};
}
}
}