This commit is contained in:
funa4i 2024-10-28 20:08:02 +04:00
parent 7d448c781e
commit 898a3c0c7b
8 changed files with 127 additions and 2 deletions

View File

@ -14,13 +14,13 @@ namespace StudentProgressRecord.Entity
public long DepartmentID { get; set; } public long DepartmentID { get; set; }
public static Teacher CreateTeacher(long id, string Fio, long DepartmentID) public static Teacher CreateTeacher(long id, string Fio, long departmentId)
{ {
return new Teacher return new Teacher
{ {
Id = id, Id = id,
Fio = Fio, Fio = Fio,
DepartmentID = DepartmentID DepartmentID = departmentId
}; };
} }

View File

@ -0,0 +1,20 @@
using StudentProgressRecord.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface IDepartmentRepository
{
IEnumerable<Department> ReadDepartments(long? facultyId=null);
Department ReadDepartmentById(long id);
void CreateDepartment(Department department);
void UpdateDepartment(Department department);
void DeleteDepartment(long id);
}
}

View File

@ -0,0 +1,19 @@
using StudentProgressRecord.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface IFacultyRepository
{
IEnumerable<Faculty> ReadFaculties();
Faculty ReadFacultyById(long id);
void CreateFaculty(Faculty faculty);
void UpdateFaculty(Faculty faculty);
void DeleteFaculty(long id);
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface IGroupRepository
{
IEnumerable<Group> ReadGroups(long? departmentId=null);
Group ReadGroupById(long id);
void CreateGroup(Group group);
void UpdateGroup(Group group);
void DeleteGroup(long id);
}
}

View File

@ -0,0 +1,13 @@
using StudentProgressRecord.Entity;
namespace StudentProgressRecord.Repositories
{
public interface IStatementReposytory
{
IEnumerable<Statement> ReadStatements(long? subjectId, long? teacherId, long? studentId, DateTime? dateTo=null, int? mark=null);
Statement ReadStatementById(long id);
void CreateStatement(Statement statement);
void UpdateStatement(Statement statement);
void DeleteStatement(long id);
}
}

View File

@ -0,0 +1,18 @@
using StudentProgressRecord.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface IStudentRepository
{
IEnumerable<Student> ReadStudents(long? groupId = null, bool? familyPos=null, bool? domitory=null);
Student ReadStudentById(long id);
void CreateStudent(Student student);
void UpdateStudent(Student student);
void DeleteStudent(long id);
}
}

View File

@ -0,0 +1,18 @@
using StudentProgressRecord.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface ISubjectRepository
{
IEnumerable<Subject> ReadSubjects();
Subject ReadSubjectById(long id);
void CreateSubject(Subject subject);
void UpdateSubject(Subject subject);
void DeleteSubject(long id);
}
}

View File

@ -0,0 +1,19 @@
using StudentProgressRecord.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StudentProgressRecord.Repositories
{
public interface ITeacherRepository
{
IEnumerable<Teacher> ReadTeachers(long? departmentID = null);
Teacher ReadTeacherById(long id);
void CreateTeacher(Teacher teacher);
void UpdateTeacher(Teacher teacher);
void DeleteTeacher(long id);
}
}