49 lines
1.2 KiB
C#
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
|
|
};
|
|
}
|
|
|
|
}
|
|
}
|