mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 12:17:35 +00:00
added first controller and corresponding stored procedures.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace WinStudentGoalTracker.Models;
|
||||
|
||||
public class ResponseResult<T>
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string? Message { get; set; }
|
||||
public T? Data { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using WinStudentGoalTracker.DataAccess;
|
||||
|
||||
namespace WinStudentGoalTracker.Models;
|
||||
|
||||
public class StudentResponse
|
||||
{
|
||||
public int IdStudent { get; set; }
|
||||
public int? IdProgram { get; set; }
|
||||
public string? Identifier { get; set; }
|
||||
public int? ProgramYear { get; set; }
|
||||
public DateTime? EnrollmentDate { get; set; }
|
||||
public DateTime? ExpectedGrad { get; set; }
|
||||
public DateTime? CreatedAt { get; set; }
|
||||
|
||||
public static StudentResponse FromDatabaseModel(dbStudent student)
|
||||
{
|
||||
return new StudentResponse
|
||||
{
|
||||
IdStudent = student.IdStudent,
|
||||
IdProgram = student.IdProgram,
|
||||
Identifier = student.Identifier,
|
||||
ProgramYear = student.ProgramYear,
|
||||
EnrollmentDate = student.EnrollmentDate,
|
||||
ExpectedGrad = student.ExpectedGrad,
|
||||
CreatedAt = student.CreatedAt
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace WinStudentGoalTracker.Models;
|
||||
|
||||
public static class UserRoles
|
||||
{
|
||||
// Role names from role-based-access-control.md
|
||||
public const string Teacher = "Teacher";
|
||||
public const string Paraeducator = "Paraeducator";
|
||||
public const string ProgramAdmin = "ProgramAdmin";
|
||||
public const string DistrictAdmin = "DistrictAdmin";
|
||||
public const string SuperAdmin = "SuperAdmin";
|
||||
|
||||
public static readonly IReadOnlyList<string> All = new[]
|
||||
{
|
||||
Teacher,
|
||||
Paraeducator,
|
||||
ProgramAdmin,
|
||||
DistrictAdmin,
|
||||
SuperAdmin
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user