added first controller and corresponding stored procedures.

This commit is contained in:
2026-02-18 22:03:35 -08:00
parent 9d9a416d1c
commit 690ea97826
24 changed files with 1094 additions and 75 deletions
@@ -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
};
}
}
+21
View File
@@ -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
};
}