From 67a1ab0a89a466b4223b553c8cb1d980c9546424 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 19 Sep 2022 08:06:37 -0400 Subject: [PATCH 01/49] save progress --- .../Controllers/MembershipsController.cs | 9 ++++++--- Gordon360/Models/CCT/MEMBERSHIP.cs | 17 ++++++++++++++++ .../ViewModels/MembershipUploadViewModel.cs | 20 +++++++++++++++++++ Gordon360/Services/AccountService.cs | 6 +++--- Gordon360/Services/ServiceInterfaces.cs | 2 +- 5 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 Gordon360/Models/ViewModels/MembershipUploadViewModel.cs diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index a7e1b7b26..ae93f71cc 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -15,12 +15,14 @@ namespace Gordon360.Controllers public class MembershipsController : GordonControllerBase { private readonly IMembershipService _membershipService; + private readonly IAccountService _accountService; private readonly IActivityService _activityService; - public MembershipsController(CCTContext context, IActivityService activityService) + public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService) { _membershipService = new MembershipService(context); _activityService = activityService; + _accountService = accountService; } /// @@ -188,9 +190,10 @@ public async Task> GetActivityMembersCountForSessionAsync(stri [HttpPost] [Route("", Name = "Memberships")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] - public async Task> PostAsync([FromBody] MEMBERSHIP membership) + public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) { - var result = await _membershipService.AddAsync(membership); + membership.GordonID = _accountService.GetGordonIDFromEmail(membership.email); + var result = await _membershipService.AddAsync((MEMBERSHIP)membership); if (result == null) { diff --git a/Gordon360/Models/CCT/MEMBERSHIP.cs b/Gordon360/Models/CCT/MEMBERSHIP.cs index da8272303..f047f9bc5 100644 --- a/Gordon360/Models/CCT/MEMBERSHIP.cs +++ b/Gordon360/Models/CCT/MEMBERSHIP.cs @@ -43,5 +43,22 @@ public partial class MEMBERSHIP public DateTime? JOB_TIME { get; set; } public bool? GRP_ADMIN { get; set; } public bool? PRIVACY { get; set; } + + public static implicit operator MEMBERSHIP(MembershipUploadViewModel m) => new MEMBERSHIP() + { + MEMBERSHIP_ID = m.MembershipID, + ACT_CDE = m.ACTCode, + SESS_CDE = m.SessCode, + ID_NUM = m.GordonID ?? 0, + PART_CDE = m.PartCode, + BEGIN_DTE = m.BeginDate, + END_DTE = m.EndDate, + COMMENT_TXT = m.CommentText, + USER_NAME = "cct.service", + JOB_NAME = "360 Add Member", + JOB_TIME = DateTime.Now, + GRP_ADMIN = false, + PRIVACY = false + }; } } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs new file mode 100644 index 000000000..a83e8eb4b --- /dev/null +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -0,0 +1,20 @@ +using System; + +namespace Gordon360.Models.CCT +{ + public partial class MembershipUploadViewModel + { + public int MembershipID { get; set; } + public string ACTCode { get; set; } + public string SessCode { get; set; } + public string email { get; set; } + public int? GordonID { get; set; } + public string PartCode { get; set; } + public string CommentText { get; set; } + public DateTime BeginDate { get; set; } + public DateTime? EndDate { get; set; } + public DateTime? JobTime { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } +} \ No newline at end of file diff --git a/Gordon360/Services/AccountService.cs b/Gordon360/Services/AccountService.cs index c3eab4e74..fd4da412b 100644 --- a/Gordon360/Services/AccountService.cs +++ b/Gordon360/Services/AccountService.cs @@ -55,8 +55,8 @@ public IEnumerable GetAll() /// Fetches the account record with the specified email. /// /// The email address associated with the account. - /// the student account information - public AccountViewModel GetAccountByEmail(string email) + /// the student id number + public int GetGordonIDFromEmail(string email) { var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); if (account == null) @@ -64,7 +64,7 @@ public AccountViewModel GetAccountByEmail(string email) throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; } - return account; + return account.gordon_id; } /// diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 6abd77915..ba2b2df47 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -59,7 +59,7 @@ public interface IAccountService { AccountViewModel GetAccountByID(string id); IEnumerable GetAll(); - AccountViewModel GetAccountByEmail(string email); + int GetGordonIDFromEmail(string email); AccountViewModel GetAccountByUsername(string username); IEnumerable AdvancedSearch(List accountTypes, string? firstname, From f0d858e77a2c6eacd0a4e9f54af14a091125a175 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Thu, 22 Sep 2022 16:27:51 -0400 Subject: [PATCH 02/49] Remove ID #s from objects pased through the MembershipController --- Gordon360/Authorization/StateYourBusiness.cs | 96 +++---- Gordon360/Controllers/EmailsController.cs | 4 +- .../Controllers/MembershipsController.cs | 108 ++++---- Gordon360/Documentation/Gordon360.xml | 97 +++---- Gordon360/Models/CCT/Context/CCTContext.cs | 18 +- .../Models/CCT/Context/efpt.CCT.config.json | 8 +- Gordon360/Models/CCT/FacStaff.cs | 5 +- Gordon360/Models/CCT/MEMBERSHIP.cs | 17 -- Gordon360/Models/CCT/MembershipView.cs | 59 ++++ .../ViewModels/JenzibarActivitiesViewModel.cs | 6 - .../ViewModels/MembershipUploadViewModel.cs | 8 +- .../Models/ViewModels/MembershipViewModel.cs | 22 +- Gordon360/Program.cs | 1 + Gordon360/Services/AccountService.cs | 20 +- Gordon360/Services/EmailService.cs | 7 +- Gordon360/Services/MembershipService.cs | 260 ++++++++---------- Gordon360/Services/ServiceInterfaces.cs | 37 +-- 17 files changed, 377 insertions(+), 396 deletions(-) create mode 100644 Gordon360/Models/CCT/MembershipView.cs delete mode 100644 Gordon360/Models/ViewModels/JenzibarActivitiesViewModel.cs diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index 702dda06d..a519868d6 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -8,10 +8,12 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; namespace Gordon360.Authorization { @@ -40,24 +42,36 @@ public class StateYourBusiness : ActionFilterAttribute private IWebHostEnvironment _webHostEnvironment; private CCTContext _CCTContext; private MyGordonContext _MyGordonContext; + private IMembershipService _membershipService; + private IAccountService _accountService; // User position at the college and their id. private IEnumerable user_groups { get; set; } private string user_id { get; set; } private string user_name { get; set; } - public override async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next) + public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) { context = actionContext; _webHostEnvironment = context.HttpContext.RequestServices.GetService(); // Step 1: Who is to be authorized var authenticatedUser = actionContext.HttpContext.User; - _CCTContext = context.HttpContext.RequestServices.GetService(); - _MyGordonContext = context.HttpContext.RequestServices.GetService(); + + var optionsBuilderCCT = new DbContextOptionsBuilder(); + optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); + _CCTContext = new CCTContext(optionsBuilderCCT.Options); + + var optionsBuilderMyGordon = new DbContextOptionsBuilder(); + optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); + _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); + + + _accountService = new AccountService(_CCTContext); + _membershipService = new MembershipService(_CCTContext, _accountService); user_name = AuthUtils.GetUsername(authenticatedUser); user_groups = AuthUtils.GetGroups(authenticatedUser); - user_id = new AccountService(_CCTContext).GetAccountByUsername(user_name).GordonID; + user_id = _accountService.GetAccountByUsername(user_name).GordonID; if (user_groups.Contains(AuthGroup.SiteAdmin)) { @@ -111,11 +125,10 @@ private async Task CanDenyAllowAsync(string resource) var mrToConsider = await mrService.GetAsync(mrID); // Populate the membershipRequest manually. Omit fields I don't need. var activityCode = mrToConsider.ActivityCode; - var membershipService = new MembershipService(_CCTContext); - var is_activityLeader = (await membershipService.GetLeaderMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var is_activityLeader = (_membershipService.GetLeaderMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (is_activityLeader) // If user is the leader of the activity that the request is sent to. return true; - var is_activityAdvisor = (await membershipService.GetAdvisorMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var is_activityAdvisor = (_membershipService.GetAdvisorMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. return true; @@ -159,8 +172,7 @@ private async Task CanReadOneAsync(string resource) return true; var activityCode = mrToConsider.ActivityCode; - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; @@ -180,8 +192,7 @@ private async Task CanReadOneAsync(string resource) // NOTE: In the future, probably only email addresses should be stored // in memberships, since we would rather not give students access to // other students' account information - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = membershipService.IsGroupAdmin(Int32.Parse(user_id)); + var isGroupAdmin = _membershipService.IsGroupAdmin(user_name); if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; @@ -223,10 +234,9 @@ private async Task CanReadPartialAsync(string resource) case Resource.MEMBERSHIP_BY_ACTIVITY: { // Only people that are part of the activity should be able to see members - var membershipService = new MembershipService(_CCTContext); var activityCode = (string)context.ActionArguments["activityCode"]; - var activityMembers = await membershipService.GetMembershipsForActivityAsync(activityCode); - var is_personAMember = activityMembers.Any(x => x.IDNumber.ToString() == user_id && x.Participation != "GUEST"); + var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); + var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); if (is_personAMember) return true; return false; @@ -249,10 +259,9 @@ private async Task CanReadPartialAsync(string resource) case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: { // An activity leader should be able to see the membership requests that belong to the activity he is leading. - var membershipService = new MembershipService(_CCTContext); var activityCode = (string)context.ActionArguments["id"]; - var groupAdmins = await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode); - var isGroupAdmin = groupAdmins.Any(x => x.IDNumber.ToString() == user_id); + var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; return false; @@ -271,20 +280,19 @@ private async Task CanReadPartialAsync(string resource) // Only leaders, advisors, and group admins var activityCode = (string?)context.ActionArguments["activityCode"]; - var membershipService = new MembershipService(_CCTContext); - var leaders = await membershipService.GetLeaderMembershipsForActivityAsync(activityCode); - var is_activity_leader = leaders.Any(x => x.IDNumber.ToString() == user_id); + var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); + var is_activity_leader = leaders.Any(x => x.Username == user_name); if (is_activity_leader) return true; - var advisors = await membershipService.GetAdvisorMembershipsForActivityAsync(activityCode); - var is_activityAdvisor = advisors.Any(x => x.IDNumber.ToString() == user_id); + var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); + var is_activityAdvisor = advisors.Any(x => x.Username == user_name); if (is_activityAdvisor) return true; - var groupAdmin = await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode); - var is_groupAdmin = groupAdmin.Any(x => x.IDNumber.ToString() == user_id); + var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); if (is_groupAdmin) return true; @@ -416,9 +424,8 @@ private async Task CanAddAsync(string resource) return true; var activityCode = membershipToConsider.ACT_CDE; - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. return true; return false; @@ -492,7 +499,6 @@ private async Task CanUpdateAsync(string resource) var activityCode = membershipToConsider.ACT_CDE; - var membershipService = new MembershipService(_CCTContext); //var is_membershipLeader = membershipService.GetLeaderMembershipsForActivity(activityCode).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; //if (is_membershipLeader) // return true; // Activity Leaders can update memberships of people in their activity. @@ -500,7 +506,7 @@ private async Task CanUpdateAsync(string resource) //var is_membershipAdvisor = membershipService.GetAdvisorMembershipsForActivity(activityCode).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; //if (is_membershipAdvisor) // return true; // Activity Advisors can update memberships of people in their activity. - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; if (isGroupAdmin) return true; // Activity Advisors can update memberships of people in their activity. @@ -508,9 +514,9 @@ private async Task CanUpdateAsync(string resource) if (is_membershipOwner) { // Restrict what a regular owner can edit. - var originalMembership = membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); + var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); // If they are not trying to change their participation level, then it is ok - if (originalMembership.PART_CDE == membershipToConsider.PART_CDE) + if (originalMembership.Participation == membershipToConsider.PART_CDE) return true; } @@ -529,17 +535,16 @@ private async Task CanUpdateAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipService = new MembershipService(_CCTContext); var membershipID = (int)context.ActionArguments["id"]; - var membershipToConsider = membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; if (is_membershipOwner) return true; - var activityCode = membershipToConsider.ACT_CDE; + var activityCode = membershipToConsider.ActivityCode; - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (isGroupAdmin) return true; @@ -578,11 +583,10 @@ private async Task CanUpdateAsync(string resource) if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipService = new MembershipService(_CCTContext); var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; var activityCode = membershipToConsider.ACT_CDE; - var is_advisor = (await membershipService.GetAdvisorMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var is_advisor = (_membershipService.GetAdvisorMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (is_advisor) return true; // Activity Advisors can update memberships of people in their activity. @@ -605,9 +609,8 @@ private async Task CanUpdateAsync(string resource) if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; var activityCode = (string)context.ActionArguments["id"]; - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (isGroupAdmin) return true; return false; @@ -622,8 +625,7 @@ private async Task CanUpdateAsync(string resource) var activityCode = (string)context.ActionArguments["id"]; var sessionCode = (string)context.ActionArguments["sess_cde"]; - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (isGroupAdmin) { var activityService = context.HttpContext.RequestServices.GetRequiredService(); @@ -677,16 +679,15 @@ private async Task CanDeleteAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipService = new MembershipService(_CCTContext); var membershipID = (int)context.ActionArguments["id"]; - var membershipToConsider = membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; if (is_membershipOwner) return true; - var activityCode = membershipToConsider.ACT_CDE; + var activityCode = membershipToConsider.ActivityCode; - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (isGroupAdmin) return true; @@ -706,9 +707,8 @@ private async Task CanDeleteAsync(string resource) return true; var activityCode = mrToConsider.ActivityCode; - var membershipService = new MembershipService(_CCTContext); - var isGroupAdmin = (await membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode)).Any(x => x.IDNumber.ToString() == user_id); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); if (isGroupAdmin) return true; diff --git a/Gordon360/Controllers/EmailsController.cs b/Gordon360/Controllers/EmailsController.cs index 8005f23bf..db8e37ea6 100644 --- a/Gordon360/Controllers/EmailsController.cs +++ b/Gordon360/Controllers/EmailsController.cs @@ -15,9 +15,9 @@ public class EmailsController : GordonControllerBase { private readonly EmailService _emailService; - public EmailsController(CCTContext context) + public EmailsController(CCTContext context, IMembershipService membershipService) { - _emailService = new EmailService(context); + _emailService = new EmailService(context, membershipService); } [HttpGet] diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index ae93f71cc..6398c5705 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -18,30 +18,11 @@ public class MembershipsController : GordonControllerBase private readonly IAccountService _accountService; private readonly IActivityService _activityService; - public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService) + public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) { - _membershipService = new MembershipService(context); _activityService = activityService; _accountService = accountService; - } - - /// - /// Get all memberships - /// - /// - /// A list of all memberships - /// - /// - /// Server makes call to the database and returns all current memberships - /// - // GET api/ - [HttpGet] - [Route("")] - [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.MEMBERSHIP)] - public async Task>> GetAsync() - { - var result = await _membershipService.GetAllAsync(); - return Ok(result); + _membershipService = membershipService; } /// @@ -53,9 +34,9 @@ public async Task>> GetAsync() [HttpGet] [Route("activity/{activityCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] - public async Task>> GetMembershipsForActivityAsync(string activityCode, string? sessionCode) + public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) { - var result = await _membershipService.GetMembershipsForActivityAsync(activityCode, sessionCode); + var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); if (result == null) { return NotFound(); @@ -71,9 +52,9 @@ public async Task>> GetMemberships [HttpGet] [Route("activity/{activityCode}/group-admin")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] - public async Task>> GetGroupAdminForActivityAsync(string activityCode) + public ActionResult> GetGroupAdminForActivity(string activityCode) { - var result = await _membershipService.GetGroupAdminMembershipsForActivityAsync(activityCode); + var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); if (result == null) { @@ -90,9 +71,9 @@ public async Task>> GetGroupAdminF [HttpGet] [Route("activity/{activityCode}/leaders")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] - public async Task>> GetLeadersForActivityAsync(string activityCode) + public ActionResult> GetLeadersForActivity(string activityCode) { - var result = await _membershipService.GetLeaderMembershipsForActivityAsync(activityCode); + var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); if (result == null) { @@ -109,9 +90,9 @@ public async Task>> GetLeadersForA [HttpGet] [Route("activity/{activityCode}/advisors")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] - public async Task>> GetAdvisorsForActivityAsync(string activityCode) + public ActionResult> GetAdvisorsForActivityAsync(string activityCode) { - var result = await _membershipService.GetAdvisorMembershipsForActivityAsync(activityCode); + var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); if (result == null) { @@ -128,9 +109,9 @@ public async Task>> GetAdvisorsFor [HttpGet] [Route("activity/{activityCode}/followers")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public async Task> GetActivityFollowersCountAsync(string activityCode) + public ActionResult GetActivityFollowersCount(string activityCode) { - var result = await _membershipService.GetActivityFollowersCountAsync(activityCode); + var result = _membershipService.GetActivityFollowersCount(activityCode); return Ok(result); } @@ -143,9 +124,9 @@ public async Task> GetActivityFollowersCountAsync(string activ [HttpGet] [Route("activity/{activityCode}/members")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public async Task> GetActivityMembersCountAsync(string activityCode) + public ActionResult GetActivityMembersCount(string activityCode) { - var result = await _membershipService.GetActivityMembersCountAsync(activityCode); + var result = _membershipService.GetActivityMembersCount(activityCode); return Ok(result); } @@ -159,9 +140,9 @@ public async Task> GetActivityMembersCountAsync(string activit [HttpGet] [Route("activity/{activityCode}/followers/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public async Task> GetActivityFollowersCountForSessionAsync(string activityCode, string sessionCode) + public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) { - var result = await _membershipService.GetActivityFollowersCountForSessionAsync(activityCode, sessionCode); + var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); return Ok(result); } @@ -175,9 +156,9 @@ public async Task> GetActivityFollowersCountForSessionAsync(st [HttpGet] [Route("activity/{activityCode}/members/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public async Task> GetActivityMembersCountForSessionAsync(string activityCode, string sessionCode) + public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) { - var result = await _membershipService.GetActivityMembersCountForSessionAsync(activityCode, sessionCode); + var result = _membershipService.GetActivityMembersCountForSession(activityCode, sessionCode); return Ok(result); } @@ -190,17 +171,23 @@ public async Task> GetActivityMembersCountForSessionAsync(stri [HttpPost] [Route("", Name = "Memberships")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] - public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) + public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) { - membership.GordonID = _accountService.GetGordonIDFromEmail(membership.email); - var result = await _membershipService.AddAsync((MEMBERSHIP)membership); + var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; + + if (idNum == null) + { + return NotFound(); + } + + var result = await _membershipService.AddAsync(membership); if (result == null) { return NotFound(); } - return Created("memberships", membership); + return Created("memberships", result); } @@ -212,9 +199,9 @@ public async Task> PostAsync([FromBody] /// The membership information that the student is a part of [Route("student/{username}")] [HttpGet] - public async Task>> GetMembershipsForStudentByUsenameAsync(string username) + public ActionResult> GetMembershipsForStudentByUsername(string username) { - var result = await _membershipService.GetMembershipsForStudentAsync(username); + var result = _membershipService.GetMembershipsForStudent(username); if (result == null) { @@ -228,7 +215,7 @@ public async Task>> GetMembershipsForStud return Ok(result); else { - List list = new List(); + List list = new List(); foreach (var item in result) { var act = _activityService.Get(item.ActivityCode); @@ -238,8 +225,9 @@ public async Task>> GetMembershipsForStud } else { - var admins = await _membershipService.GetGroupAdminMembershipsForActivityAsync(item.ActivityCode); - if (admins.Any(a => a.AD_Username == authenticatedUserUsername)) + // If the current authenticated user is an admin of this group, then include the membership + var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); + if (admins.Any(a => a.Username == authenticatedUserUsername)) { list.Add(item); } @@ -253,19 +241,20 @@ public async Task>> GetMembershipsForStud /// The membership id of whichever one is to be changed /// The content within the membership that is to be changed and what it will change to /// Calls the server to make a call and update the database with the changed information + /// The membership information that the student is a part of // PUT api//5 [HttpPut] [Route("{id}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> PutAsync(int id, [FromBody] MEMBERSHIP membership) + public async Task> PutAsync([FromBody] MembershipUploadViewModel membership) { - var result = await _membershipService.UpdateAsync(id, membership); + var result = await _membershipService.UpdateAsync(membership); if (result == null) { return NotFound(); } - return Ok(membership); + return Ok(result); } /// Update an existing membership item to be a group admin or not @@ -274,11 +263,9 @@ public async Task> PutAsync(int id, [FromBody] MEMBERSH [HttpPut] [Route("{id}/group-admin")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> ToggleGroupAdminAsync([FromBody] MEMBERSHIP membership) + public async Task> ToggleGroupAdminAsync([FromBody] MembershipUploadViewModel membership) { - var id = membership.MEMBERSHIP_ID; - - var result = await _membershipService.ToggleGroupAdminAsync(id, membership); + var result = await _membershipService.ToggleGroupAdminAsync(membership); if (result == null) { @@ -288,16 +275,15 @@ public async Task> ToggleGroupAdminAsync([FromBody] MEM } /// Update an existing membership item to be private or not - /// The id of the membership - /// the boolean value + /// The membership to toggle privacy on /// Calls the server to make a call and update the database with the changed information [HttpPut] [Route("{id}/privacy/{p}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] - public ActionResult TogglePrivacy(int id, bool p) + public async Task> TogglePrivacyAsync(MembershipUploadViewModel membership) { - _membershipService.TogglePrivacy(id, p); - return Ok(); + var updatedMembership = await _membershipService.TogglePrivacyAsync(membership); + return Ok(updatedMembership); } /// Delete an existing membership @@ -322,12 +308,12 @@ public ActionResult Delete(int id) /// /// Determines whether or not the given student is a Group Admin of some activity /// - /// The student id + /// The account username to check [HttpGet] [Route("isGroupAdmin/{id}")] - public ActionResult IsGroupAdmin(int id) + public ActionResult IsGroupAdmin(string username) { - var result = _membershipService.IsGroupAdmin(id); + var result = _membershipService.IsGroupAdmin(username); return Ok(result); } diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index d14e877c6..84eed73cc 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -402,18 +402,7 @@ Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - Get all memberships - - - A list of all memberships - - - Server makes call to the database and returns all current memberships - - - + Get all the memberships associated with a given activity @@ -421,14 +410,14 @@ Optional code of session to get for IHttpActionResult - + Gets the group admin memberships associated with a given activity. The activity ID. A list of all leader-type memberships for the specified activity. - + Gets the leader-type memberships associated with a given activity. @@ -442,21 +431,21 @@ The activity ID. A list of all advisor-type memberships for the specified activity. - + Gets the number of followers of an activity The activity ID. The number of followers of the activity - + Gets the number of members (besides followers) of an activity The activity ID. The number of members of the activity - + Gets the number of followers of an activity @@ -464,7 +453,7 @@ The session code The number of followers of the activity - + Gets the number of members (excluding followers) of an activity @@ -472,13 +461,13 @@ The session code The number of members of the activity - + Create a new membership item to be added to database The membership item containing all required and relevant information Posts a new membership to the server to be added into the database - + Fetch memberships that a specific student has been a part of @TODO: Move security checks to state your business? Or consider changing implementation here @@ -486,21 +475,21 @@ The Student Username The membership information that the student is a part of - + Update an existing membership item The membership id of whichever one is to be changed The content within the membership that is to be changed and what it will change to Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of - + Update an existing membership item to be a group admin or not /// The content within the membership that is to be changed Calls the server to make a call and update the database with the changed information - + Update an existing membership item to be private or not - The id of the membership - the boolean value + The membership to toggle privacy on Calls the server to make a call and update the database with the changed information @@ -508,11 +497,11 @@ The identifier for the membership to be deleted Calls the server to make a call and remove the given membership from the database - + Determines whether or not the given student is a Group Admin of some activity - The student id + The account username to check @@ -1088,12 +1077,19 @@ AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + Fetches the account record with the specified email. + + The email address associated with the account. + the account id number + Fetches the account record with the specified email. The email address associated with the account. - the student account information + the first account object which matches the email @@ -1614,7 +1610,7 @@ Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, we do it here by using the validateMembership() method. @@ -1636,13 +1632,7 @@ The membership id MembershipViewModel if found, null if not found - - - Fetches all membership records from storage. - - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - + Fetches the memberships associated with the activity whose code is specified by the parameter. @@ -1650,49 +1640,49 @@ Optional code of session to get memberships for MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. The activity code. MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - + Fetches the leaders of the activity whose activity code is specified by the parameter. The activity code. MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - + Fetches the advisors of the activity whose activity code is specified by the parameter. The activity code. MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - + Fetches all the membership information linked to the student whose id appears as a parameter. The student's AD Username. A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - + Fetches the number of followers associated with the activity whose code is specified by the parameter. The activity code. int. - + Fetches the number of memberships associated with the activity whose code is specified by the parameter. The activity code. int. - + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. @@ -1700,50 +1690,47 @@ The session code int. - + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. The activity code. The session code - int. + int - + Updates the membership whose id is given as the first parameter to the contents of the second parameter. - The membership id. The updated membership. The newly modified membership. - + Switches the group-admin property of the person whose membership id is given - The membership id. The corresponding membership object The newly modified membership. - + Switches the privacy property of the person whose membership id is given - The membership id. - membership private or not + The membership object passed. The newly modified membership. - + Helper method to Validate a membership The membership to validate True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - + Determines whether or not the given user is a Group Admin of some activity - Gordon ID of the user to check + Username of the user to check true if student is a Group Admin, else false diff --git a/Gordon360/Models/CCT/Context/CCTContext.cs b/Gordon360/Models/CCT/Context/CCTContext.cs index a4e738062..86c35a2a7 100644 --- a/Gordon360/Models/CCT/Context/CCTContext.cs +++ b/Gordon360/Models/CCT/Context/CCTContext.cs @@ -57,6 +57,7 @@ public CCTContext(DbContextOptions options) public virtual DbSet MYSCHEDULE { get; set; } public virtual DbSet Mailboxes { get; set; } public virtual DbSet Majors { get; set; } + public virtual DbSet MembershipView { get; set; } public virtual DbSet Message_Rooms { get; set; } public virtual DbSet Messages { get; set; } public virtual DbSet PART_DEF { get; set; } @@ -232,8 +233,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.ToView("FacStaff"); entity.Property(e => e.BuildingDescription).IsFixedLength(); - - entity.Property(e => e.Country).IsFixedLength(); }); modelBuilder.Entity(entity => @@ -352,6 +351,21 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.ToView("Majors"); }); + modelBuilder.Entity(entity => + { + entity.ToView("MembershipView"); + + entity.Property(e => e.ActivityCode).IsFixedLength(); + + entity.Property(e => e.ActivityDescription).IsFixedLength(); + + entity.Property(e => e.Participation).IsFixedLength(); + + entity.Property(e => e.ParticipationDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + modelBuilder.Entity(entity => { entity.HasKey(e => e.room_id) diff --git a/Gordon360/Models/CCT/Context/efpt.CCT.config.json b/Gordon360/Models/CCT/Context/efpt.CCT.config.json index db347867d..0ac76dab1 100644 --- a/Gordon360/Models/CCT/Context/efpt.CCT.config.json +++ b/Gordon360/Models/CCT/Context/efpt.CCT.config.json @@ -8,6 +8,7 @@ "ModelNamespace": null, "OutputContextPath": "Models\/CCT\/Context", "OutputPath": "Models\/CCT", + "PreserveCasingWithRegex": true, "ProjectRootNamespace": "Gordon360", "Schemas": null, "SelectedHandlebarsLanguage": 0, @@ -221,6 +222,10 @@ "Name": "[dbo].[Majors]", "ObjectType": 3 }, + { + "Name": "[dbo].[MembershipView]", + "ObjectType": 3 + }, { "Name": "[dbo].[PART_DEF]", "ObjectType": 3 @@ -727,5 +732,6 @@ "UseNodaTime": false, "UseNullableReferences": false, "UseSchemaFolders": false, - "UseSpatial": false + "UseSpatial": false, + "UseT4": false } \ No newline at end of file diff --git a/Gordon360/Models/CCT/FacStaff.cs b/Gordon360/Models/CCT/FacStaff.cs index 18c7f1e4e..db604258c 100644 --- a/Gordon360/Models/CCT/FacStaff.cs +++ b/Gordon360/Models/CCT/FacStaff.cs @@ -82,7 +82,7 @@ public partial class FacStaff [StringLength(1)] [Unicode(false)] public string KeepPrivate { get; set; } - [StringLength(75)] + [StringLength(100)] [Unicode(false)] public string JobTitle { get; set; } [StringLength(20)] @@ -100,6 +100,7 @@ public partial class FacStaff [StringLength(50)] [Unicode(false)] public string Email { get; set; } + public int? ActiveAccount { get; set; } [StringLength(7)] [Unicode(false)] public string Type { get; set; } @@ -114,7 +115,7 @@ public partial class FacStaff [StringLength(45)] [Unicode(false)] public string BuildingDescription { get; set; } - [StringLength(60)] + [StringLength(63)] [Unicode(false)] public string Country { get; set; } [StringLength(20)] diff --git a/Gordon360/Models/CCT/MEMBERSHIP.cs b/Gordon360/Models/CCT/MEMBERSHIP.cs index f047f9bc5..da8272303 100644 --- a/Gordon360/Models/CCT/MEMBERSHIP.cs +++ b/Gordon360/Models/CCT/MEMBERSHIP.cs @@ -43,22 +43,5 @@ public partial class MEMBERSHIP public DateTime? JOB_TIME { get; set; } public bool? GRP_ADMIN { get; set; } public bool? PRIVACY { get; set; } - - public static implicit operator MEMBERSHIP(MembershipUploadViewModel m) => new MEMBERSHIP() - { - MEMBERSHIP_ID = m.MembershipID, - ACT_CDE = m.ACTCode, - SESS_CDE = m.SessCode, - ID_NUM = m.GordonID ?? 0, - PART_CDE = m.PartCode, - BEGIN_DTE = m.BeginDate, - END_DTE = m.EndDate, - COMMENT_TXT = m.CommentText, - USER_NAME = "cct.service", - JOB_NAME = "360 Add Member", - JOB_TIME = DateTime.Now, - GRP_ADMIN = false, - PRIVACY = false - }; } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MembershipView.cs b/Gordon360/Models/CCT/MembershipView.cs new file mode 100644 index 000000000..68834347a --- /dev/null +++ b/Gordon360/Models/CCT/MembershipView.cs @@ -0,0 +1,59 @@ +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class MembershipView + { + public int MembershipID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ActivityCode { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ActivityDescription { get; set; } + [Unicode(false)] + public string ActivityImagePath { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SessionDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string Participation { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ParticipationDescription { get; set; } + [Column(TypeName = "datetime")] + public DateTime StartDate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? EndDate { get; set; } + [StringLength(45)] + [Unicode(false)] + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } +} \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/JenzibarActivitiesViewModel.cs b/Gordon360/Models/ViewModels/JenzibarActivitiesViewModel.cs deleted file mode 100644 index 54ca39f9e..000000000 --- a/Gordon360/Models/ViewModels/JenzibarActivitiesViewModel.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Gordon360.Models.ViewModels -{ - public class JenzibarActivitiesViewModel - { - } -} \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index a83e8eb4b..b24bfd0e9 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -7,14 +7,10 @@ public partial class MembershipUploadViewModel public int MembershipID { get; set; } public string ACTCode { get; set; } public string SessCode { get; set; } - public string email { get; set; } - public int? GordonID { get; set; } + public string Username { get; set; } public string PartCode { get; set; } public string CommentText { get; set; } - public DateTime BeginDate { get; set; } - public DateTime? EndDate { get; set; } - public DateTime? JobTime { get; set; } - public bool? GroupAdmin { get; set; } + public bool GroupAdmin { get; set; } public bool? Privacy { get; set; } } } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipViewModel.cs b/Gordon360/Models/ViewModels/MembershipViewModel.cs index 7d0d5292d..e3619cc27 100644 --- a/Gordon360/Models/ViewModels/MembershipViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipViewModel.cs @@ -12,7 +12,7 @@ public class MembershipViewModel public string ActivityImagePath { get; set; } public string SessionCode { get; set; } public string SessionDescription { get; set; } - public int IDNumber { get; set; } + public int? IDNumber { get; set; } public string AD_Username { get; set; } public string FirstName { get; set; } public string LastName { get; set; } @@ -27,25 +27,5 @@ public class MembershipViewModel public string ActivityTypeDescription { get; set; } public bool? Privacy { get; set; } public int AccountPrivate { get; set; } - - - public static implicit operator MembershipViewModel(MEMBERSHIP m) - { - MembershipViewModel vm = new MembershipViewModel - { - MembershipID = m.MEMBERSHIP_ID, - ActivityCode = m.ACT_CDE.Trim(), - SessionCode = m.SESS_CDE.Trim(), - IDNumber = m.ID_NUM, - Participation = m.PART_CDE.Trim(), - GroupAdmin = m.GRP_ADMIN ?? false, - StartDate = m.BEGIN_DTE, - EndDate = m.END_DTE, - Description = m.COMMENT_TXT ?? "", // For Null comments - Privacy = m.PRIVACY ?? false, - }; - - return vm; - } } } \ No newline at end of file diff --git a/Gordon360/Program.cs b/Gordon360/Program.cs index da6280cdd..7bd2175d1 100644 --- a/Gordon360/Program.cs +++ b/Gordon360/Program.cs @@ -45,6 +45,7 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddMemoryCache(); diff --git a/Gordon360/Services/AccountService.cs b/Gordon360/Services/AccountService.cs index a5154b9ce..c89aee35d 100644 --- a/Gordon360/Services/AccountService.cs +++ b/Gordon360/Services/AccountService.cs @@ -55,8 +55,8 @@ public IEnumerable GetAll() /// Fetches the account record with the specified email. /// /// The email address associated with the account. - /// the student id number - public int GetGordonIDFromEmail(string email) + /// the account id number + public string GetGordonIDFromEmail(string email) { var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); if (account == null) @@ -67,6 +67,22 @@ public int GetGordonIDFromEmail(string email) return account.gordon_id; } + /// + /// Fetches the account record with the specified email. + /// + /// The email address associated with the account. + /// the first account object which matches the email + public AccountViewModel GetAccountByEmail(string email) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + /// /// Fetches the account record with the specified username. /// diff --git a/Gordon360/Services/EmailService.cs b/Gordon360/Services/EmailService.cs index 9901e0c2b..1644f150d 100644 --- a/Gordon360/Services/EmailService.cs +++ b/Gordon360/Services/EmailService.cs @@ -17,10 +17,12 @@ namespace Gordon360.Services public class EmailService : IEmailService { private readonly CCTContext _context; + private IMembershipService _membershipService; - public EmailService(CCTContext context) + public EmailService(CCTContext context, IMembershipService membershipService) { _context = context; + _membershipService = membershipService; } /// @@ -37,9 +39,8 @@ public async Task> GetEmailsForActivityAsync(string sessionCode = Helpers.GetCurrentSession(_context); } - var membershipService = new MembershipService(_context); - var result = membershipService.MembershipEmails(activityCode, sessionCode, participationType); + var result = _membershipService.MembershipEmails(activityCode, sessionCode, participationType); if (result == null) { diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 90976ef87..bec1ed715 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -18,10 +18,12 @@ namespace Gordon360.Services public class MembershipService : IMembershipService { private readonly CCTContext _context; + private IAccountService _accountService; - public MembershipService(CCTContext context) + public MembershipService(CCTContext context, IAccountService accountService) { _context = context; + _accountService = accountService; } /// @@ -30,27 +32,26 @@ public MembershipService(CCTContext context) /// /// The membership to be added /// The newly added Membership object - public async Task AddAsync(MEMBERSHIP membership) + public async Task AddAsync(MembershipUploadViewModel membership) { // validate returns a boolean value. await ValidateMembershipAsync(membership); IsPersonAlreadyInActivity(membership); - // Get session begin date of the membership - var sessionCode = await _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Equals(membership.SESS_CDE)).FirstOrDefaultAsync(); - membership.BEGIN_DTE = (DateTime)sessionCode.SESS_BEGN_DTE; // The Add() method returns the added membership. - var payload = await _context.MEMBERSHIP.AddAsync(membership); + var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) - if (payload == null) + if (payload?.Entity == null) { throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; + } else + { + await _context.SaveChangesAsync(); + return MEMBERSHIPToMembershipView(payload.Entity); } - await _context.SaveChangesAsync(); - return membership; } @@ -59,7 +60,7 @@ public async Task AddAsync(MEMBERSHIP membership) /// /// The membership id /// The membership that was just deleted - public MEMBERSHIP Delete(int membershipID) + public MembershipView Delete(int membershipID) { var result = _context.MEMBERSHIP.Find(membershipID); if (result == null) @@ -69,7 +70,7 @@ public MEMBERSHIP Delete(int membershipID) _context.MEMBERSHIP.Remove(result); _context.SaveChanges(); - return result; + return MEMBERSHIPToMembershipView(result); } /// @@ -77,9 +78,9 @@ public MEMBERSHIP Delete(int membershipID) /// /// The membership id /// MembershipViewModel if found, null if not found - public MEMBERSHIP GetSpecificMembership(int membershipID) + public MembershipView GetSpecificMembership(int membershipID) { - MEMBERSHIP result = _context.MEMBERSHIP.Find(membershipID); + MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); if (result == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; @@ -88,71 +89,19 @@ public MEMBERSHIP GetSpecificMembership(int membershipID) return result; } - /// - /// Fetches all membership records from storage. - /// - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public async Task> GetAllAsync() - { - var allMemberships = await _context.Procedures.ALL_MEMBERSHIPSAsync(); - - return allMemberships.OrderByDescending(m => m.StartDate).Select(m => new MembershipViewModel - { - MembershipID = m.MembershipID, - ActivityCode = m.ActivityCode.Trim(), - ActivityDescription = m.ActivityDescription.Trim(), - ActivityImagePath = m.ActivityImagePath, - SessionCode = m.SessionCode.Trim(), - SessionDescription = m.SessionDescription.Trim(), - IDNumber = m.IDNumber, - FirstName = m.FirstName.Trim(), - LastName = m.LastName.Trim(), - Participation = m.Participation.Trim(), - ParticipationDescription = m.ParticipationDescription.Trim(), - StartDate = m.StartDate, - EndDate = m.EndDate, - Description = m.Description, - GroupAdmin = m.GroupAdmin, - Privacy = m.Privacy - }); - } - /// /// Fetches the memberships associated with the activity whose code is specified by the parameter. /// /// The activity code. /// Optional code of session to get memberships for /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public async Task> GetMembershipsForActivityAsync(string activityCode, string? sessionCode = null) + public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) { - IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); - - if (sessionCode != null) - { - memberships = memberships.Where(m => m.SessionCode.Trim() == sessionCode); - } + //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); - return memberships.OrderByDescending(x => x.StartDate).Select(m => new MembershipViewModel - { - MembershipID = m.MembershipID, - ActivityCode = m.ActivityCode.Trim(), - ActivityDescription = m.ActivityDescription.Trim(), - ActivityImagePath = m.ActivityImagePath, - SessionCode = m.SessionCode.Trim(), - SessionDescription = m.SessionDescription.Trim(), - IDNumber = m.IDNumber, - AD_Username = m.AD_Username, - FirstName = m.FirstName.Trim(), - LastName = m.LastName.Trim(), - Mail_Location = m.Mail_Location, - Participation = m.Participation.Trim(), - ParticipationDescription = m.ParticipationDescription.Trim(), - StartDate = m.StartDate, - EndDate = m.EndDate, - Description = m.Description, - GroupAdmin = m.GroupAdmin, - AccountPrivate = m.AccountPrivate - }); + return _context.MembershipView + .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) + .OrderByDescending(m => m.StartDate); } /// @@ -160,10 +109,9 @@ public async Task> GetMembershipsForActivityAsy /// /// The activity code. /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public async Task> GetGroupAdminMembershipsForActivityAsync(string activityCode) + public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) { - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(m => m.GroupAdmin == true); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); } /// @@ -171,11 +119,10 @@ public async Task> GetGroupAdminMembershipsForA /// /// The activity code. /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public async Task> GetLeaderMembershipsForActivityAsync(string activityCode) + public IEnumerable GetLeaderMembershipsForActivity(string activityCode) { var leaderRole = Helpers.GetLeaderRoleCodes(); - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation == leaderRole); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == leaderRole); } /// @@ -183,12 +130,11 @@ public async Task> GetLeaderMembershipsForActiv /// /// The activity code. /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public async Task> GetAdvisorMembershipsForActivityAsync(string activityCode) + public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) { var advisorRole = Helpers.GetAdvisorRoleCodes(); - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation == advisorRole); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == advisorRole); } /// @@ -196,7 +142,7 @@ public async Task> GetAdvisorMembershipsForActi /// /// The student's AD Username. /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - public async Task> GetMembershipsForStudentAsync(string username) + public IEnumerable GetMembershipsForStudent(string username) { var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); if (account == null) @@ -204,29 +150,7 @@ public async Task> GetMembershipsForStudentAsyn throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; } - var memberships = await _context.Procedures.MEMBERSHIPS_PER_STUDENT_IDAsync(int.Parse(account.gordon_id)); - - return memberships.OrderByDescending(x => x.StartDate).Select(m => new MembershipViewModel - { - MembershipID = m.MembershipID, - ActivityCode = m.ActivityCode.Trim(), - ActivityDescription = m.ActivityDescription.Trim(), - ActivityImagePath = m.ActivityImagePath, - SessionCode = m.SessionCode.Trim(), - SessionDescription = m.SessionDescription.Trim(), - IDNumber = m.IDNumber, - FirstName = m.FirstName.Trim(), - LastName = m.LastName.Trim(), - Participation = m.Participation.Trim(), - ParticipationDescription = m.ParticipationDescription.Trim(), - StartDate = m.StartDate, - EndDate = m.EndDate, - Description = m.Description, - ActivityType = m.ActivityType.Trim(), - ActivityTypeDescription = m.ActivityTypeDescription.Trim(), - GroupAdmin = m.GroupAdmin, - Privacy = m.Privacy, - }); + return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); } /// @@ -234,10 +158,9 @@ public async Task> GetMembershipsForStudentAsyn /// /// The activity code. /// int. - public async Task GetActivityFollowersCountAsync(string activityCode) + public int GetActivityFollowersCount(string activityCode) { - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation == "GUEST").Count(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); } /// @@ -245,10 +168,9 @@ public async Task GetActivityFollowersCountAsync(string activityCode) /// /// The activity code. /// int. - public async Task GetActivityMembersCountAsync(string activityCode) + public int GetActivityMembersCount(string activityCode) { - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation != "GUEST").Count(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); } /// @@ -257,10 +179,9 @@ public async Task GetActivityMembersCountAsync(string activityCode) /// The activity code. /// The session code /// int. - public async Task GetActivityFollowersCountForSessionAsync(string activityCode, string sessionCode) + public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) { - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation == "GUEST" && x.SessionCode == sessionCode).Count(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); } /// @@ -268,22 +189,20 @@ public async Task GetActivityFollowersCountForSessionAsync(string activityC /// /// The activity code. /// The session code - /// int. - public async Task GetActivityMembersCountForSessionAsync(string activityCode, string sessionCode) + /// int + public int GetActivityMembersCountForSession(string activityCode, string sessionCode) { - var memberships = await GetMembershipsForActivityAsync(activityCode); - return memberships.Where(x => x.Participation != "GUEST" && x.SessionCode == sessionCode).Count(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); } /// /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. /// - /// The membership id. /// The updated membership. /// The newly modified membership. - public async Task UpdateAsync(int membershipID, MEMBERSHIP membership) + public async Task UpdateAsync(MembershipUploadViewModel membership) { - var original = await _context.MEMBERSHIP.FindAsync(membershipID); + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membership.MembershipID); if (original == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; @@ -293,25 +212,23 @@ public async Task UpdateAsync(int membershipID, MEMBERSHIP membershi // One can only update certain fields within a membrship //original.BEGIN_DTE = membership.BEGIN_DTE; - original.COMMENT_TXT = membership.COMMENT_TXT; + original.COMMENT_TXT = membership.CommentText; //original.END_DTE = membership.END_DTE; - original.PART_CDE = membership.PART_CDE; - original.SESS_CDE = membership.SESS_CDE; + original.PART_CDE = membership.PartCode; await _context.SaveChangesAsync(); - return original; + return MEMBERSHIPToMembershipView(original); } /// /// Switches the group-admin property of the person whose membership id is given /// - /// The membership id. /// The corresponding membership object /// The newly modified membership. - public async Task ToggleGroupAdminAsync(int membershipID, MEMBERSHIP membership) + public async Task ToggleGroupAdminAsync(MembershipUploadViewModel membership) { - var original = await _context.MEMBERSHIP.FindAsync(membershipID); + var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membership.MembershipID); if (original == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; @@ -319,35 +236,34 @@ public async Task ToggleGroupAdminAsync(int membershipID, MEMBERSHIP await ValidateMembershipAsync(membership); - var isGuest = original.PART_CDE == "GUEST"; - - if (isGuest) + if (original.PART_CDE == "GUEST") throw new ArgumentException("A guest cannot be assigned as an admin.", "Participation Level"); original.GRP_ADMIN = !original.GRP_ADMIN; await _context.SaveChangesAsync(); - return original; + return MEMBERSHIPToMembershipView(original); } /// /// Switches the privacy property of the person whose membership id is given /// - /// The membership id. - /// membership private or not + /// The membership object passed. /// The newly modified membership. - public void TogglePrivacy(int membershipID, bool isPrivate) + public async Task TogglePrivacyAsync(MembershipUploadViewModel membership) { - var original = _context.MEMBERSHIP.Find(membershipID); + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membership.MembershipID); if (original == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; } - original.PRIVACY = isPrivate; + original.PRIVACY = !original.PRIVACY; - _context.SaveChanges(); + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); } @@ -356,30 +272,30 @@ public void TogglePrivacy(int membershipID, bool isPrivate) /// /// The membership to validate /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - private async Task ValidateMembershipAsync(MEMBERSHIP membership) + private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) { - var personExists = _context.ACCOUNT.Where(x => x.gordon_id.Trim() == membership.ID_NUM.ToString()).Any(); + var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username.ToString()).Any(); if (!personExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; } - var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PART_CDE).Any(); + var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); if (!participationExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; } - var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SESS_CDE).Any(); + var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); if (!sessionExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; } - var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACT_CDE).Any(); + var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); if (!activityExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; } - if (!(await _context.Procedures.ACTIVE_CLUBS_PER_SESS_IDAsync(membership.SESS_CDE)).Any(a => a.ACT_CDE.Trim() == membership.ACT_CDE)) + if (!_context.JNZB_ACTIVITIES.Any(a => a.SESS_CDE == membership.SessCode && a.ACT_CDE.Trim() == membership.ACTCode)) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; } @@ -387,10 +303,10 @@ private async Task ValidateMembershipAsync(MEMBERSHIP membership) return true; } - private bool IsPersonAlreadyInActivity(MEMBERSHIP membershipRequest) + private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) { - var personAlreadyInActivity = _context.MEMBERSHIP.Any(x => x.SESS_CDE == membershipRequest.SESS_CDE && - x.ACT_CDE == membershipRequest.ACT_CDE && x.ID_NUM == membershipRequest.ID_NUM); + var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && + x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); if (personAlreadyInActivity) { @@ -403,30 +319,39 @@ private bool IsPersonAlreadyInActivity(MEMBERSHIP membershipRequest) /// /// Determines whether or not the given user is a Group Admin of some activity /// - /// Gordon ID of the user to check + /// Username of the user to check /// true if student is a Group Admin, else false - public bool IsGroupAdmin(int gordonID) + public bool IsGroupAdmin(string username) { - return _context.MEMBERSHIP.Any(membership => membership.ID_NUM == gordonID && membership.GRP_ADMIN == true); + return _context.MembershipView.Any(membership => membership.Username == username && membership.GroupAdmin == true); } public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null) { - var memberships = _context.MEMBERSHIP.Where(m => m.ACT_CDE == activityCode && m.SESS_CDE == sessionCode); + var memberships = _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode); if (participationCode != null) { if (participationCode == ParticipationType.GroupAdmin) { - memberships = memberships.Where(m => m.GRP_ADMIN == true); + memberships = memberships.Where(m => m.GroupAdmin == true); } else { - memberships = memberships.Where(m => m.PART_CDE == participationCode.Value); + memberships = memberships.Where(m => m.Participation == participationCode.Value); } } - return memberships.Join(_context.ACCOUNT, m => m.ID_NUM.ToString(), a => a.gordon_id, (m, a) => new EmailViewModel { Email = a.email, FirstName = a.firstname, LastName = a.lastname }); + return memberships.Join( + _context.ACCOUNT, + m => m.Username.ToString(), + a => a.AD_Username, + (m, a) => new EmailViewModel { + Email = a.email, + FirstName = a.firstname, + LastName = a.lastname + } + ); } public class ParticipationType @@ -444,5 +369,36 @@ public class ParticipationType // BUT, it's convenient to treat it as a participation type in several places throughout the API public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } } + + private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) + { + var sessionCode = _context.CM_SESSION_MSTR + .Where(x => x.SESS_CDE.Equals(membership.SessCode)) + .FirstOrDefault(); + + return new MEMBERSHIP() { + MEMBERSHIP_ID = membership.MembershipID, + ACT_CDE = membership.ACTCode, + SESS_CDE = membership.SessCode, + ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), + BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, + PART_CDE = membership.PartCode, + COMMENT_TXT = membership.CommentText, + GRP_ADMIN = membership.GroupAdmin, + PRIVACY = membership.Privacy + }; + } + + private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) + { + var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); + + if (foundMembership == null) + { + throw new ResourceCreationException(); + } + + return foundMembership; + } } } \ No newline at end of file diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 51092ea83..cbf0b3dca 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -59,7 +59,8 @@ public interface IAccountService { AccountViewModel GetAccountByID(string id); IEnumerable GetAll(); - int GetGordonIDFromEmail(string email); + string GetGordonIDFromEmail(string email); + AccountViewModel GetAccountByEmail(string email); AccountViewModel GetAccountByUsername(string username); IEnumerable AdvancedSearch(List accountTypes, string firstname, @@ -171,23 +172,23 @@ public interface IJenzibarActivityService public interface IMembershipService { - Task> GetLeaderMembershipsForActivityAsync(string activityCode); - Task> GetAdvisorMembershipsForActivityAsync(string activityCode); - Task> GetGroupAdminMembershipsForActivityAsync(string activityCode); - Task> GetMembershipsForActivityAsync(string activityCode, string? sessionCode); - Task> GetMembershipsForStudentAsync(string username); - Task GetActivityFollowersCountForSessionAsync(string activityCode, string sessionCode); - Task GetActivityMembersCountForSessionAsync(string activityCode, string sessionCode); - Task> GetAllAsync(); - MEMBERSHIP GetSpecificMembership(int membershipID); - Task GetActivityFollowersCountAsync(string idactivityCode); - Task GetActivityMembersCountAsync(string activityCode); - Task AddAsync(MEMBERSHIP membership); - Task UpdateAsync(int membershipID, MEMBERSHIP membership); - Task ToggleGroupAdminAsync(int membershipID, MEMBERSHIP membership); - void TogglePrivacy(int membershipID, bool isPrivate); - MEMBERSHIP Delete(int membershipID); - bool IsGroupAdmin(int gordonID); + IEnumerable GetLeaderMembershipsForActivity(string activityCode); + IEnumerable GetAdvisorMembershipsForActivity(string activityCode); + IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); + IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); + IEnumerable GetMembershipsForStudent(string username); + int GetActivityFollowersCountForSession(string activityCode, string sessionCode); + int GetActivityMembersCountForSession(string activityCode, string sessionCode); + MembershipView GetSpecificMembership(int membershipID); + int GetActivityFollowersCount(string idactivityCode); + int GetActivityMembersCount(string activityCode); + Task AddAsync(MembershipUploadViewModel membership); + Task UpdateAsync(MembershipUploadViewModel membership); + Task ToggleGroupAdminAsync(MembershipUploadViewModel membership); + Task TogglePrivacyAsync(MembershipUploadViewModel membership); + MembershipView Delete(int membershipID); + bool IsGroupAdmin(string username); + public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); } public interface IJobsService From c0a2d2a7fd2df5f174e0dfd137b0aec7d4be0eee Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 23 Sep 2022 13:06:42 -0400 Subject: [PATCH 03/49] replace id numbers in memberships --- .../Controllers/MembershipsController.cs | 643 +- Gordon360/Documentation/Gordon360.xml | 4348 ++++----- Gordon360/Models/CCT/ACCOUNT.cs | 108 +- .../CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs | 30 +- Gordon360/Models/CCT/ACT_INFO.cs | 72 +- Gordon360/Models/CCT/ADMIN.cs | 50 +- .../CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs | 28 +- .../Models/CCT/ADVISOR_SEPARATEResult.cs | 28 +- Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs | 34 +- .../CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs | 34 +- Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs | 54 +- Gordon360/Models/CCT/ALL_REQUESTSResult.cs | 48 +- Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs | 22 +- Gordon360/Models/CCT/Alumni.cs | 256 +- Gordon360/Models/CCT/Birthdays.cs | 34 +- Gordon360/Models/CCT/Buildings.cs | 42 +- Gordon360/Models/CCT/CM_SESSION_MSTR.cs | 70 +- .../Models/CCT/COURSES_FOR_PROFESSORResult.cs | 58 +- .../Models/CCT/CREATE_MESSAGE_ROOMResult.cs | 34 +- Gordon360/Models/CCT/CURRENT_SESSIONResult.cs | 24 +- Gordon360/Models/CCT/CUSTOM_PROFILE.cs | 54 +- Gordon360/Models/CCT/ChapelEvent.cs | 72 +- Gordon360/Models/CCT/Clifton_Strengths.cs | 88 +- Gordon360/Models/CCT/Config.cs | 46 +- Gordon360/Models/CCT/Context/CCTContext.cs | 950 +- .../CCT/Context/CCTContextProcedures.cs | 7910 ++++++++--------- .../Models/CCT/Context/DbContextExtensions.cs | 136 +- .../CCT/Context/ICCTContextProcedures.cs | 266 +- .../Models/CCT/Context/efpt.CCT.config.json | 1476 +-- Gordon360/Models/CCT/Countries.cs | 44 +- .../Models/CCT/DISTINCT_ACT_TYPEResult.cs | 24 +- Gordon360/Models/CCT/DiningInfo.cs | 66 +- .../Models/CCT/Dining_Meal_Choice_Desc.cs | 42 +- .../CCT/Dining_Meal_Plan_Change_History.cs | 64 +- .../Models/CCT/Dining_Meal_Plan_Id_Mapping.cs | 44 +- Gordon360/Models/CCT/Dining_Mealplans.cs | 50 +- .../Models/CCT/Dining_Student_Meal_Choice.cs | 44 +- .../Models/CCT/EMAILS_PER_ACT_CDEResult.cs | 28 +- Gordon360/Models/CCT/ERROR_LOG.cs | 38 +- Gordon360/Models/CCT/EmergencyContact.cs | 214 +- .../CCT/FINALIZATION_GETDEMOGRAPHICResult.cs | 24 +- .../CCT/FINALIZATION_GETHOLDSBYIDResult.cs | 44 +- ...ALIZATION_GET_FINALIZATION_STATUSResult.cs | 40 +- ...ATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs | 42 +- .../CCT/FINALIZATION_UPDATECELLPHONEResult.cs | 26 +- .../FINALIZATION_UPDATEDEMOGRAPHICResult.cs | 22 +- Gordon360/Models/CCT/FacStaff.cs | 254 +- Gordon360/Models/CCT/GET_AA_ADMINResult.cs | 24 +- ...ET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs | 28 +- .../CCT/GET_AA_APARTMENT_HALLSResult.cs | 24 +- .../GET_AA_APPID_BY_NAME_AND_DATEResult.cs | 24 +- .../GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs | 24 +- .../CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs | 32 +- .../CCT/GET_AA_APPLICANTS_DETAILSResult.cs | 38 +- .../Models/CCT/GET_AA_APPLICATIONSResult.cs | 30 +- .../CCT/GET_AA_APPLICATIONS_BY_IDResult.cs | 30 +- .../CCT/GET_AA_CURRENT_APPLICATIONSResult.cs | 30 +- .../CCT/GET_AA_CURRENT_APP_IDSResult.cs | 24 +- .../CCT/GET_AA_EDITOR_BY_APPIDResult.cs | 24 +- .../CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs | 24 +- ...GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs | 24 +- .../CCT/GET_ALL_MESSAGES_BY_IDResult.cs | 44 +- .../Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs | 24 +- .../CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs | 24 +- .../Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs | 24 +- .../CCT/GET_HEALTH_CHECK_QUESTIONResult.cs | 28 +- Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs | 24 +- Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs | 34 +- .../CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs | 44 +- .../CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs | 26 +- .../CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs | 28 +- Gordon360/Models/CCT/Graduation.cs | 40 +- Gordon360/Models/CCT/Health_Question.cs | 50 +- Gordon360/Models/CCT/Health_Status.cs | 60 +- Gordon360/Models/CCT/Health_Status_CTRL.cs | 54 +- Gordon360/Models/CCT/Housing_Admins.cs | 34 +- Gordon360/Models/CCT/Housing_Applicants.cs | 62 +- Gordon360/Models/CCT/Housing_Applications.cs | 62 +- Gordon360/Models/CCT/Housing_HallChoices.cs | 46 +- Gordon360/Models/CCT/Housing_Halls.cs | 42 +- .../Models/CCT/INSERT_NEWS_ITEMResult.cs | 24 +- ...OR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs | 46 +- .../Models/CCT/Information_Change_Request.cs | 58 +- .../Models/CCT/Internships_as_Involvements.cs | 74 +- Gordon360/Models/CCT/InvolvementOffering.cs | 32 + Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs | 70 +- Gordon360/Models/CCT/JNZB_ACTIVITIES.cs | 112 +- .../CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs | 28 +- .../LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs | 48 +- Gordon360/Models/CCT/MEMBERSHIP.cs | 92 +- .../CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs | 58 +- .../CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs | 60 +- Gordon360/Models/CCT/MYSCHEDULE.cs | 102 +- .../Models/CCT/MYSCHEDULE_BY_IDResult.cs | 50 +- Gordon360/Models/CCT/Mailboxes.cs | 54 +- Gordon360/Models/CCT/Majors.cs | 40 +- Gordon360/Models/CCT/MembershipView.cs | 116 +- Gordon360/Models/CCT/Message_Rooms.cs | 50 +- Gordon360/Models/CCT/Messages.cs | 72 +- Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs | 28 +- Gordon360/Models/CCT/NEWS_NEWResult.cs | 46 +- .../Models/CCT/NEWS_NOT_EXPIREDResult.cs | 46 +- .../CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs | 46 +- Gordon360/Models/CCT/PART_DEF.cs | 44 +- .../CCT/PHOTO_INFO_PER_USER_NAMEResult.cs | 30 +- Gordon360/Models/CCT/Police.cs | 30 +- Gordon360/Models/CCT/REQUEST.cs | 74 +- .../Models/CCT/REQUESTS_PER_ACT_CDEResult.cs | 48 +- .../CCT/REQUESTS_PER_STUDENT_IDResult.cs | 48 +- .../CCT/REQUEST_PER_REQUEST_IDResult.cs | 48 +- .../Models/CCT/RIDERS_BY_RIDE_IDResult.cs | 28 +- Gordon360/Models/CCT/RoomAssign.cs | 82 +- Gordon360/Models/CCT/Rooms.cs | 56 +- ...NT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs | 46 +- .../CCT/STUDENT_JOBS_PER_ID_NUMResult.cs | 34 +- .../CCT/SUPERVISORS_PER_ACT_CDEResult.cs | 22 +- .../CCT/SUPERVISORS_PER_ID_NUMResult.cs | 22 +- .../Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs | 22 +- Gordon360/Models/CCT/Save_Bookings.cs | 52 +- Gordon360/Models/CCT/Save_Rides.cs | 86 +- Gordon360/Models/CCT/Schedule_Control.cs | 46 +- Gordon360/Models/CCT/Slider_Images.cs | 58 +- Gordon360/Models/CCT/States.cs | 42 +- Gordon360/Models/CCT/Student.cs | 388 +- Gordon360/Models/CCT/StudentNewsExpiration.cs | 34 +- .../Models/CCT/Timesheets_Clock_In_Out.cs | 36 +- Gordon360/Models/CCT/UPCOMING_RIDESResult.cs | 42 +- .../CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs | 42 +- .../Models/CCT/UPDATE_CELL_PHONEResult.cs | 26 +- Gordon360/Models/CCT/User_Connection_Ids.cs | 44 +- Gordon360/Models/CCT/User_Rooms.cs | 44 +- Gordon360/Models/CCT/Users.cs | 46 +- .../Models/CCT/VALID_DRIVES_BY_IDResult.cs | 24 +- .../VICTORY_PROMISE_BY_STUDENT_IDResult.cs | 30 +- Gordon360/Models/CCT/_360_SLIDER.cs | 102 +- .../ViewModels/MembershipUploadViewModel.cs | 1 - Gordon360/Services/AccountService.cs | 496 +- Gordon360/Services/MembershipService.cs | 806 +- Gordon360/Services/ServiceInterfaces.cs | 607 +- 139 files changed, 12169 insertions(+), 12124 deletions(-) create mode 100644 Gordon360/Models/CCT/InvolvementOffering.cs diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 6398c5705..697e3fb5e 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -1,321 +1,322 @@ -using Gordon360.Authorization; -using Gordon360.Models.CCT; -using Gordon360.Models.CCT.Context; -using Gordon360.Models.ViewModels; -using Gordon360.Services; -using Gordon360.Static.Names; -using Microsoft.AspNetCore.Mvc; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Controllers -{ - [Route("api/[controller]")] - public class MembershipsController : GordonControllerBase - { - private readonly IMembershipService _membershipService; - private readonly IAccountService _accountService; - private readonly IActivityService _activityService; - - public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) - { - _activityService = activityService; - _accountService = accountService; - _membershipService = membershipService; - } - - /// - /// Get all the memberships associated with a given activity - /// - /// The activity ID - /// Optional code of session to get for - /// IHttpActionResult - [HttpGet] - [Route("activity/{activityCode}")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] - public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) - { - var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the group admin memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all leader-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/group-admin")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] - public ActionResult> GetGroupAdminForActivity(string activityCode) - { - var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the leader-type memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all leader-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/leaders")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] - public ActionResult> GetLeadersForActivity(string activityCode) - { - var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the advisor-type memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all advisor-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/advisors")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] - public ActionResult> GetAdvisorsForActivityAsync(string activityCode) - { - var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the number of followers of an activity - /// - /// The activity ID. - /// The number of followers of the activity - [HttpGet] - [Route("activity/{activityCode}/followers")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCount(string activityCode) - { - var result = _membershipService.GetActivityFollowersCount(activityCode); - - return Ok(result); - } - - /// - /// Gets the number of members (besides followers) of an activity - /// - /// The activity ID. - /// The number of members of the activity - [HttpGet] - [Route("activity/{activityCode}/members")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCount(string activityCode) - { - var result = _membershipService.GetActivityMembersCount(activityCode); - - return Ok(result); - } - - /// - /// Gets the number of followers of an activity - /// - /// The activity ID. - /// The session code - /// The number of followers of the activity - [HttpGet] - [Route("activity/{activityCode}/followers/{sessionCode}")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) - { - var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); - - return Ok(result); - } - - /// - /// Gets the number of members (excluding followers) of an activity - /// - /// The activity ID. - /// The session code - /// The number of members of the activity - [HttpGet] - [Route("activity/{activityCode}/members/{sessionCode}")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) - { - var result = _membershipService.GetActivityMembersCountForSession(activityCode, sessionCode); - - return Ok(result); - } - - /// Create a new membership item to be added to database - /// The membership item containing all required and relevant information - /// - /// Posts a new membership to the server to be added into the database - // POST api/ - [HttpPost] - [Route("", Name = "Memberships")] - [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] - public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) - { - var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; - - if (idNum == null) - { - return NotFound(); - } - - var result = await _membershipService.AddAsync(membership); - - if (result == null) - { - return NotFound(); - } - - return Created("memberships", result); - - } - - /// - /// Fetch memberships that a specific student has been a part of - /// @TODO: Move security checks to state your business? Or consider changing implementation here - /// - /// The Student Username - /// The membership information that the student is a part of - [Route("student/{username}")] - [HttpGet] - public ActionResult> GetMembershipsForStudentByUsername(string username) - { - var result = _membershipService.GetMembershipsForStudent(username); - - if (result == null) - { - return NotFound(); - } - // privacy control of membership view model - var authenticatedUserUsername = AuthUtils.GetUsername(User); - var viewerGroups = AuthUtils.GetGroups(User); - - if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all - return Ok(result); - else - { - List list = new List(); - foreach (var item in result) - { - var act = _activityService.Get(item.ActivityCode); - if (!(act.Privacy == true || item.Privacy == true)) - { - list.Add(item); - } - else - { - // If the current authenticated user is an admin of this group, then include the membership - var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); - if (admins.Any(a => a.Username == authenticatedUserUsername)) - { - list.Add(item); - } - } - } - return Ok(list); - } - } - - /// Update an existing membership item - /// The membership id of whichever one is to be changed - /// The content within the membership that is to be changed and what it will change to - /// Calls the server to make a call and update the database with the changed information - /// The membership information that the student is a part of - // PUT api//5 - [HttpPut] - [Route("{id}")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> PutAsync([FromBody] MembershipUploadViewModel membership) - { - var result = await _membershipService.UpdateAsync(membership); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// Update an existing membership item to be a group admin or not - /// /// The content within the membership that is to be changed - /// Calls the server to make a call and update the database with the changed information - [HttpPut] - [Route("{id}/group-admin")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> ToggleGroupAdminAsync([FromBody] MembershipUploadViewModel membership) - { - var result = await _membershipService.ToggleGroupAdminAsync(membership); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// Update an existing membership item to be private or not - /// The membership to toggle privacy on - /// Calls the server to make a call and update the database with the changed information - [HttpPut] - [Route("{id}/privacy/{p}")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] - public async Task> TogglePrivacyAsync(MembershipUploadViewModel membership) - { - var updatedMembership = await _membershipService.TogglePrivacyAsync(membership); - return Ok(updatedMembership); - } - - /// Delete an existing membership - /// The identifier for the membership to be deleted - /// Calls the server to make a call and remove the given membership from the database - // DELETE api//5 - [HttpDelete] - [Route("{id}")] - [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] - public ActionResult Delete(int id) - { - var result = _membershipService.Delete(id); - - if (result == null) - { - return NotFound(); - } - - return Ok(result); - } - - /// - /// Determines whether or not the given student is a Group Admin of some activity - /// - /// The account username to check - [HttpGet] - [Route("isGroupAdmin/{id}")] - public ActionResult IsGroupAdmin(string username) - { - var result = _membershipService.IsGroupAdmin(username); - - return Ok(result); - } - } -} +using Gordon360.Authorization; +using Gordon360.Models.CCT; +using Gordon360.Models.CCT.Context; +using Gordon360.Models.ViewModels; +using Gordon360.Services; +using Gordon360.Static.Names; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Controllers +{ + [Route("api/[controller]")] + public class MembershipsController : GordonControllerBase + { + private readonly IMembershipService _membershipService; + private readonly IAccountService _accountService; + private readonly IActivityService _activityService; + + public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) + { + _activityService = activityService; + _accountService = accountService; + _membershipService = membershipService; + } + + /// + /// Get all the memberships associated with a given activity + /// + /// The activity ID + /// Optional code of session to get for + /// IHttpActionResult + [HttpGet] + [Route("activity/{activityCode}")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] + public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) + { + var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the group admin memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all leader-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/group-admin")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] + public ActionResult> GetGroupAdminForActivity(string activityCode) + { + var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the leader-type memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all leader-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/leaders")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] + public ActionResult> GetLeadersForActivity(string activityCode) + { + var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the advisor-type memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all advisor-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/advisors")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] + public ActionResult> GetAdvisorsForActivityAsync(string activityCode) + { + var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the number of followers of an activity + /// + /// The activity ID. + /// The number of followers of the activity + [HttpGet] + [Route("activity/{activityCode}/followers")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityFollowersCount(string activityCode) + { + var result = _membershipService.GetActivityFollowersCount(activityCode); + + return Ok(result); + } + + /// + /// Gets the number of members (besides followers) of an activity + /// + /// The activity ID. + /// The number of members of the activity + [HttpGet] + [Route("activity/{activityCode}/members")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityMembersCount(string activityCode) + { + var result = _membershipService.GetActivityMembersCount(activityCode); + + return Ok(result); + } + + /// + /// Gets the number of followers of an activity + /// + /// The activity ID. + /// The session code + /// The number of followers of the activity + [HttpGet] + [Route("activity/{activityCode}/followers/{sessionCode}")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) + { + var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); + + return Ok(result); + } + + /// + /// Gets the number of members (excluding followers) of an activity + /// + /// The activity ID. + /// The session code + /// The number of members of the activity + [HttpGet] + [Route("activity/{activityCode}/members/{sessionCode}")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) + { + var result = _membershipService.GetActivityMembersCountForSession(activityCode, sessionCode); + + return Ok(result); + } + + /// Create a new membership item to be added to database + /// The membership item containing all required and relevant information + /// + /// Posts a new membership to the server to be added into the database + // POST api/ + [HttpPost] + [Route("", Name = "Memberships")] + [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] + public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) + { + var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; + + if (idNum == null) + { + return NotFound(); + } + + var result = await _membershipService.AddAsync(membership); + + if (result == null) + { + return NotFound(); + } + + return Created("memberships", result); + + } + + /// + /// Fetch memberships that a specific student has been a part of + /// @TODO: Move security checks to state your business? Or consider changing implementation here + /// + /// The Student Username + /// The membership information that the student is a part of + [Route("student/{username}")] + [HttpGet] + public ActionResult> GetMembershipsForStudentByUsername(string username) + { + var result = _membershipService.GetMembershipsForStudent(username); + + if (result == null) + { + return NotFound(); + } + // privacy control of membership view model + var authenticatedUserUsername = AuthUtils.GetUsername(User); + var viewerGroups = AuthUtils.GetGroups(User); + + if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all + return Ok(result); + else + { + List list = new List(); + foreach (var item in result) + { + var act = _activityService.Get(item.ActivityCode); + if (!(act.Privacy == true || item.Privacy == true)) + { + list.Add(item); + } + else + { + // If the current authenticated user is an admin of this group, then include the membership + var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); + if (admins.Any(a => a.Username == authenticatedUserUsername)) + { + list.Add(item); + } + } + } + return Ok(list); + } + } + + /// Update an existing membership item + /// The membership id of whichever one is to be changed + /// The content within the membership that is to be changed and what it will change to + /// Calls the server to make a call and update the database with the changed information + /// The membership information that the student is a part of + // PUT api//5 + [HttpPut] + [Route("{membershipID}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] + public async Task> PutAsync(int membershipID, [FromBody] MembershipUploadViewModel membership) + { + var result = await _membershipService.UpdateAsync(membershipID, membership); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// Update an existing membership item to be a group admin or not + /// /// The content within the membership that is to be changed + /// Calls the server to make a call and update the database with the changed information + [HttpPut] + [Route("{membershipID}/group-admin/{isGroupAdmin}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] + public async Task> SetGroupAdminAsync(int membershipID, bool isGroupAdmin) + { + var result = await _membershipService.SetGroupAdminAsync(membershipID, isGroupAdmin); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// Update an existing membership item to be private or not + /// The membership to toggle privacy on + /// Calls the server to make a call and update the database with the changed information + [HttpPut] + [Route("{membershipID}/privacy/{isPrivate}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] + public async Task> SetPrivacyAsync(int membershipID, bool isPrivate) + { + + var updatedMembership = await _membershipService.SetPrivacyAsync(membershipID, isPrivate); + return Ok(updatedMembership); + } + + /// Delete an existing membership + /// The identifier for the membership to be deleted + /// Calls the server to make a call and remove the given membership from the database + // DELETE api//5 + [HttpDelete] + [Route("{id}")] + [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] + public ActionResult Delete(int id) + { + var result = _membershipService.Delete(id); + + if (result == null) + { + return NotFound(); + } + + return Ok(result); + } + + /// + /// Determines whether or not the given student is a Group Admin of some activity + /// + /// The account username to check + [HttpGet] + [Route("isGroupAdmin/{id}")] + public ActionResult IsGroupAdmin(string username) + { + var result = _membershipService.IsGroupAdmin(username); + + return Ok(result); + } + } +} diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 84eed73cc..848db5219 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -1,2174 +1,2174 @@ - - - - Gordon360 - - - - - Get the username of the authenticated user - - The ClaimsPrincipal representing the user's authentication claims - Username of the authenticated user - - - Set emergency contacts for student - The contact data to be stored - The data stored - - - Sets the students cell phone number - The phone number object to be added to the database - The data stored - - - Sets the students race and ethinicity - The object containing the race numbers of the users - The data stored - - - Gets and returns the user's holds - The user's stored holds - - - Sets the user as having completed Academic Checkin - The HTTP status indicating whether the request was completed or not - - - Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in - The HTTP status indicating whether the request was completed and returns the check in status of the student - - - - Return a list of accounts matching some or all of searchString. - - The input to search for - All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameter. - - The firstname portion of the search - The lastname portion of the search - All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameters - We are searching through all the info of a user, then narrowing it down to get only what we want - - Which account types to search. Accepted values: "student", "alumni", "facstaff" - The first name to search for - The last name to search for - - - - - - - - - - All accounts meeting some or all of the parameter - - - Gets the activities taking place during a given session - The session identifier - A list of all activities that are active during the given session determined by the id parameter - Queries the database to find which activities are active during the session desired - - - Gets the different types of activities taking place during a given session - The session identifier - A list of all the different types of activities that are active during the given session determined by the id parameter - Queries the database to find the distinct activities type of activities that are active during the session desired - - - - Get the status (open or closed) of an activity for a given session - - The session code that we want to check the status for - - - - - - Get all the activities that have not yet been closed out for the current session - - - - - - Get all the activities that have not yet been closed out for the current session for - which a given user is the group admin - - The id of the user who is group admin - - - - - Get all the activities that are already closed out for the current session - - - - - - Get all the activities that are already closed out for the current session for - which a given user is group admin - - The id of the user who is group admin - - - - - - The code of the activity to update - The updated involvement details - - - - - Set an image for the activity - - The activity code - The image file - - - - - Reset the activity Image - - The activity code - - - - Update an existing activity to be private or not - The id of the activity - the boolean value - Calls the server to make a call and update the database with the changed information - - - - Pulls all states available from Jenzabar States Table - - - - - - Pulls all Countries available from Jenzabar Countries Table - - - - - - Get all admins - - - A list of all admins - - - Server makes call to the database and returns all admins - - - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - - Create a new admin to be added to database - The admin item containing all required and relevant information - - Posts a new admin to the server to be added into the database - - - Delete an existing admin - The identifier for the admin to be deleted - Calls the server to make a call and remove the given admin from the database - - - - Return a list majors. - - All majors - - - - Return a list minors. - - All minors - - - - Return a list minors. - - All minors - - - - Return a list states. - - All states - - - - Return a list countries. - - All countries - - - - Return a list departments. - - All departments - - - - Return a list buildings. - - All buildings - - - Get all the slider content for the dashboard slider - A list of all the slides for the slider - Queries the database for all entries in slider table - - - Get all the banner slides for the dashboard banner - A list of all the slides for the banner - - - Post a new slide for the dashboard banner - The posted banner - - - Remove a slide from the dashboard banner - ID of the slide to remove - - - - Gets information about student's dining plan and balance - - A DiningInfo object - - - - This makes use of our cached request to 25Live, which stores AllEvents - - - - - - Delete an application (and consequently all rows that reference it) - - The id of the application to remove - - - - - Get a list of the apartment-style halls - - - - - - Get apartment application ID number of currently logged in user if that user is on an existing application - - - - - - Get apartment application ID number for a user if that user is on an existing application - - username of the profile info - - - - - save application - - Returns the application ID number if all the queries succeeded - - - - update existing application (Differentiated by HttpPut instead of HttpPost) - - Returns the application ID number if all the queries succeeded - - - - change the editor (i.e. primary applicant) of the application - - The result of changing the editor - - - - change the date an application was submitted - (changes it from null the first time they submit) - - The result of changing the date submitted - - - Get apartment application info for a given application ID number - application ID number of the apartment application - Object of type ApartmentAppViewModel - - - Get apartment application info for all applications if the current user is a housing admin - Object of type ApartmentApplicationViewModel - - - - Get a user's active jobs - - The datetime that the shift started - The datetime that the shift ended - The user's active jobs - - - - Get a user's saved shifts - - The user's saved shifts - - - - Get a user's active jobs - - - The result of saving a shift - - - - Edit a shift - The details that will be changed - - - - - Get a user's active jobs - - The result of deleting the shift - - - - Submit shifts - - The result of submitting the shifts - - - - Gets the name of a supervisor based on their ID number - - The name of the supervisor - - - - sends the current clock in status to the back end - true if user is clocked in and false if clocked out - - detail to be saved in the back end, true if user just clocked in - returns confirmation that the answer was recorded - - - - gets the the clock in status from the back end - true if user is clocked in and false if clocked out - - ClockInViewModel - - - - deletes the last clocked in status of a user - - returns confirmation that clock in status was deleted - - - Create a new error log item to be added to database - The error message containing all required and relevant information - - Posts a new message to the service to be added into the database - - - Create a new error log item to be added to database - The error log containing the ERROR_TIME, and the LOG_MESSAGE - - Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - - Get all the memberships associated with a given activity - - The activity ID - Optional code of session to get for - IHttpActionResult - - - - Gets the group admin memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the leader-type memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the advisor-type memberships associated with a given activity. - - The activity ID. - A list of all advisor-type memberships for the specified activity. - - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - - - - Gets the number of followers of an activity - - The activity ID. - The session code - The number of followers of the activity - - - - Gets the number of members (excluding followers) of an activity - - The activity ID. - The session code - The number of members of the activity - - - Create a new membership item to be added to database - The membership item containing all required and relevant information - - Posts a new membership to the server to be added into the database - - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - - - Update an existing membership item - The membership id of whichever one is to be changed - The content within the membership that is to be changed and what it will change to - Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of - - - Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed - Calls the server to make a call and update the database with the changed information - - - Update an existing membership item to be private or not - The membership to toggle privacy on - Calls the server to make a call and update the database with the changed information - - - Delete an existing membership - The identifier for the membership to be deleted - Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check - - - - Gets all custom events for a user - - A IEnumerable of custom events - - - - Gets specific custom event for a user - - The requested custom event - - - - Gets all myschedule objects for a user - - A IEnumerable of myschedule objects - - - Create a new myschedule to be added to database - The myschedule item containing all required and relevant information - Created schedule - Posts a new myschedule to the server to be added into the database - - - Delete an existing myschedule item - The identifier for the myschedule to be deleted - Calls the server to make a call and remove the given myschedule from the database - - - Update the existing myschedule in database - The updated myschedule item containing all required and relevant information - Original schedule - Put a myschedule to the server to be updated - - - Gets a news item by id from the database - The id of the news item to retrieve - The news item - - - Gets the base64 image data for an image corresponding - to a student news item. Only used by GO; when we move student news approval - to 360, this will be removed. - The id of the news item to retrieve image from - base64 string representing image - - - Call the service that gets all approved student news entries not yet expired, filtering - out the expired by comparing 2 weeks past date entered to current date - - - Call the service that gets all new and approved student news entries - which have not already expired, - checking novelty by comparing an entry's date entered to 10am on the previous day - - - Call the service that gets the list of categories - - - Call the service that gets all unapproved student news entries (by a particular user) - not yet expired, filtering out the expired news - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Create a new news item to be added to the database - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Deletes a news item from the database - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Controller) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item - The news item must be authored by the user and must not be expired and must be unapproved - - - Get profile info of currently logged in user - - - - Get public profile info for a user - username of the profile info - - - - Get the advisor(s) of a particular student - - All advisors of the given student. For each advisor, - provides first name, last name, and username. - - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Toggle privacy of the current user's Clifton Strengths - New privacy value - - - Gets the emergency contact information of a particular user - The username for which to retrieve info - Emergency contact information of the given user. - - - Gets the mailbox information of currently logged in user - - - - Gets the date of birth of the current logged-in user - - - - Get the profile image of currently logged in user - - - - Get the profile image of the given user - The profile image(s) that the authenticated user is allowed to see, if any - - - - Set an image for profile - - - - - - Set an IDimage for a user - - - - - - Reset the profile Image - - - - - - Update the profile social media links - - The type of social media - The path of the links - - - - - Update mobile phone number - - phoneNumber - - - - - Update privacy of mobile phone number - - Y or N - - - - - Update privacy of profile image - - Y or N - - - - - Posts fields into CCT.dbo.Information_Change_Request - Sends Alumni Profile Update Email to "devrequest@gordon.edu" - - Object with Field's Name and Field's Value, unused Field's Label - - - - - Gets the profile image at the given path or, if that file does not exist, the 360 default profile image - - - Note that the 360 default profile image is different from a user's default image. - A given user's default image is simply their approved ID photo. - The 360 default profile image, on the other hand, is a stock image of Scottie Lion. - Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. - - Path to the profile image to load - - - - - Gets all Membership Request Objects - - List of all requests for membership - - - - Gets a specific Membership Request Object - - The ID of the membership request - A memberships request with the specified id - - - - Gets the memberships requests for the specified activity - - The activity code - All membership requests associated with the activity - - - - Gets the memberships requests for the person making the request - - All membership requests associated with the student - - - - Creates a new membership request - - The request to be added - The added request if successful. HTTP error message if not. - - - - Updates a membership request - - The membership request id - The updated membership request object - The updated request if successful. HTTP error message if not. - - - - Sets a membership request to Approved - - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. - - - - Deletes a membership request - - The id of the membership request to delete - The deleted object - - - - Gets all upcoming ride objects - - A IEnumerable of rides objects - - - - Gets all upcoming ride objects for a user - - A IEnumerable of rides objects - - - - Create new ride object for a user - - Successfully posted ride object - - - Cancel an existing ride item - The identifier for the ride to be cancel - Calls the server to make a call and remove the given ride from the database - - - Delete an existing ride item - The identifier for the ride to be deleted - Calls the server to make a call and remove the given ride from the database - - - - Create new booking object for a user - - Successfully posted booking object - - - Delete an existing booking item - The identifier for the booking to be deleted - Calls the server to make a call and remove the given booking from the database - - - - Get schedule information of logged in user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO: Use Service Layer - - - - - - Get schedule information of specific user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO Use Service Layer - - username - - - - - Update privacy of schedule - - Y or N - - - - - Update schedule description - - New description - - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Get whether the currently logged-in user can read student schedules - - Whether they can read student schedules - - - Get a list of all sessions - All sessions within the database - Queries the database for all sessions, current and past - - - Get one specific session specified by the id in the URL string - The identifier for one specific session - The information about one specific session - Queries the database regarding a specific session with the given identifier - - - - Gets the current active session - - - - - - Gets the days left in the current session - - - - - - Gets student employment information about the user - - A Student Employment Json - - - - Get the short git SHA-1 and build date for the backend - - "Git Hash: {hashCode}; Build Time: {date and time}" - - - - - Gets current victory promise scores - - A VP Json - - - - Enum representing three possible wellness statuses. - GREEN - Healthy, no known contact/symptoms - YELLOW - Symptomatic or cautionary hold - RED - Quarantine/Isolation - - - - - Gets wellness status of current user - - A WellnessViewModel representing the most recent status of the user - - - - Gets question for wellness check from the back end - - A WellnessQuestionViewModel - - - - Stores the user's wellness status - - The current status of the user to post, of type WellnessStatusColor - The status that was stored in the database - - - - Whether the user wants their strengths to be private (not shown to other users) - - - - - Gordon ID Number - - - - - a job's unique id number - - - - - Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of the match, followed by the matched field. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The search input to match against - The match key if search matched a field, or null - - - - Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The first name of the search input to match against - The last name of the search input to match against - The match key if first and last name both matched a field, or null - - - - Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. - - - - - Stores the emergency contact information of a particular user - The object that stores the contact info - The students id number - The stored data - - - - Create the notes value for the database to be passed in with the rest of the data. - The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international - - The mobile phone of the contact - The home phone of the contact - The formatted notes parameter to be passed to the database - - - Stores the cellphone preferences for the current user - The phone number object for the user - The id of the student to be updated - The stored data - - - Stores the demographic data (race and ethnicity) of the current user - The race and ethnicity data for the user - The id of the user to be updated - The stored data - - - Gets the holds of the user with the given ID - The id of the user whose holds are to be found - The stored data - - - Sets the user as having been checked in - The id of the user who is to be marked as checked in - - - Gets the whether the user has completed Academic Checkin - The id of the user for which the data is to be found for - - - Formats a phone number for insertion into the database - The phone number to be formatted - The formatted number - - - - Service Class that facilitates data transactions between the AccountsController and the Account database model. - - - - - Fetches a single account record whose id matches the id provided as an argument - - The person's gordon id - AccountViewModel if found, null if not found - - - - Fetches all the account records from storage. - - AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the account id number - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the first account object which matches the email - - - - Fetches the account record with the specified username. - - The AD username associated with the account. - the student account information - - - - Get basic info for all accounts - - BasicInfoViewModel of all accounts - - - - Get basic info for all accounts except alumni - - BasicInfoViewModel of all accounts except alumni - - - - Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. - ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) - Activity Info and ACtivity may be talked about interchangeably. - - - - - Fetches a single activity record whose id matches the id provided as an argument - - The activity code - ActivityViewModel if found, null if not found - - - - Fetches the Activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the Activity types of activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches all activity records from storage. - - ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Checks to see if a specified activity is still open for this session - Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table - When an activity is closed out, the END_DTE is set to the date on which the closing happened - Otherwise, the END_DTE for all memberships of the activity will be null for that session - - The activity code for the activity in question - Code of the session to check - - - - - Gets a collection of all the current open activities, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current activities already closed out, by finding which activities have - memberships with an END_DTE that is not null - - The collection of activity codes for open activities - - - - Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is not null - - The user's id - The session we want to get the closed activities for - The collection of activity codes for open activities - - - - Updates the Activity Info - - The activity info resource with the updated information - The id of the activity info to be updated - The updated activity info resource - - - - Closes out a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Open a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Updates the image for the spcefied involvement - - The involvement to update the image of - The new image - The involvement with the updated image path - - - - Reset the path for the activity image - - The activity code - - - - change activty privacy - - The activity code - activity private or not - - - - Service class to facilitate interacting with the Admin table. - - - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - - - Fetches the admin resource whose username matches the specified argument - - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. - - - - Fetches all the administrators from the database - - Returns a list of administrators. If no administrators were found, an empty list is returned. - - - - Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateAdmin() method. - - The admin to be added - The newly added Admin object - - - - Delete the admin whose id is specified by the parameter. - - The admin id - The admin that was just deleted - - - - Helper method to Validate an admin - - The admin to validate - True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - - - - Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. - - - - - Fetches the dashboard slider content from the database. - - If found, returns a set of SliderViewModel's, based on each slide entry in the db. - If not returns an empty IEnumerable. - - - - Retrieve all banner slides from the database - - An IEnumerable of the slides in the database - - - - Inserts a banner slide in the database and uploads the image to the local slider folder - - The slide to add - The url of the server that the image is being posted to. - This is needed to save the image path into the database. The URL is different depending on where the API is running. - The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. - - The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. - The inserted slide - - - - Deletes a banner slide from the database and deletes the local image file - - The deleted slide - - - - Service that allows for meal control - - - - - - - - - - - - - Get information about the selected plan for the student user - - Student's Gordon ID - Current Session Code - - - - - Service class to facilitate getting emails for members of an activity. - - - - - Get a list of the emails for all members in the activity during the current session. - - The code of the activity to get emails for. - Optionally, the session to get emails for. Defaults to the current session - The participation type to get emails of. If unspecified, gets emails of all participation types. - A list of emails (along with first and last name) associated with that activity - - - - Send a email to a list of email addresses - - All addresses to send this email to - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Send a email to members of an activity - - The activity code to send this email to - The session of activity to select members from - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. - - - - - Adds a new error log to storage. - - The error log to be added - The newly added error_log object - - - - Adds a new error log to storage, after creating the timestamp. - - The error message for the error log to be added - The newly added error_log object - - - - Service that allows for event control - - - - URL to retrieve events from the 25Live API. - event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). - All other event types are not appropiate for the 360 events feed. - end_after parameter limits the request to events from the current academic year. - state parameter fetches only confirmed events - - - - Access the memory stream created by the cached task and parse it into events - Splits events with multiple repeated occurrences into individual records for each occurrence - - All events for the current academic year. - - - - Select only events that are marked for Public promotion - - All Public Events - - - - Select only events that are Approved to give CLAW credit - - All CLAW Events - - - - Returns all attended events for a student in a specific term - - The student's AD Username - The current term - - - - - Helper function to determine the current academic year - - - - - - Calls a stored procedure that returns a row in the staff whitelist which has the given user id, - if it is in the whitelist - - The id of the person using the page - Whether or not the user is on the staff whitelist - - - - Deletes the application with given id, - removing all rows that reference it. - - The id of the application to delete - Whether or not this was successful - - - - Gets all names of apartment halls - - AN array of hall names - - - - Calls a stored procedure that tries to get the id of an the application that a given user is - applicant on for a given session - - The student username to look for - Session for which the application would be - - The id of the application or - null if the user is not on an application for that session - - - - - Get the editor ID of a given application ID - - The application ID for which the editor ID would be - - The id of the editor or - null if the user is a member but not an editor of a given application - - - - - Saves student housing info - - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp - - second, it retrieves the application id of the application with the information we just inserted (because - the database creates the application ID so we have to ask it which number it generated for it) - - third, it inserts each applicant into the applicants table along with the application ID so we know - which application on which they are an applicant - - - The current session code - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Edit an existings apartment application - - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username - - second, it gets an array of the applicants that are already stored in the database for the given application ID - - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database - - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array - - - The student username of the user who is attempting to save the apartment application (retrieved via authentication token) - The current session code - The application ID number of the application to be edited - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Changes the student user who has permission to edit the given application - - - Whether or not all the queries succeeded - - - application ID number of the apartment application - boolean indicating whether the current user is an admin, permits access to restricted information such as birth date - Apartment Application formatted for display in the UI - - - Array of ApartmentApplicationViewModels - - - - "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked - - The application ID number of the application to be submitted - Returns whether the query succeeded - - - - Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. - - - - - Service class to facilitate data transactions between the MembershipRequestController and the database - - - - - Generate a new request to join an activity at a participation level higher than 'Guest' - - The membership request object - The membership request object once it is added - - - - Approves the request with the specified ID. - - The ID of the request to be approved - The approved membership - - - - Delete the membershipRequest object whose id is given in the parameters - - The membership request id - A copy of the deleted membership request - - - - Denies the membership request object whose id is given in the parameters - - The membership request id - - - - - Get the membership request object whose Id is specified in the parameters. - - The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. - - - - Fetches all the membership request objects from the database. - - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this activity - - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this student - - The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Update an existing membership request object - - The membership request id - The newly modified membership request - - - - - Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - - - - - Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateMembership() method. - - The membership to be added - The newly added Membership object - - - - Delete the membership whose id is specified by the parameter. - - The membership id - The membership that was just deleted - - - - Fetch the membership whose id is specified by the parameter - - The membership id - MembershipViewModel if found, null if not found - - - - Fetches the memberships associated with the activity whose code is specified by the parameter. - - The activity code. - Optional code of session to get memberships for - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the leaders of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the advisors of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches all the membership information linked to the student whose id appears as a parameter. - - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int. - - - - Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int - - - - Updates the membership whose id is given as the first parameter to the contents of the second parameter. - - The updated membership. - The newly modified membership. - - - - Switches the group-admin property of the person whose membership id is given - - The corresponding membership object - The newly modified membership. - - - - Switches the privacy property of the person whose membership id is given - - The membership object passed. - The newly modified membership. - - - - Helper method to Validate a membership - - The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Determines whether or not the given user is a Group Admin of some activity - - Username of the user to check - true if student is a Group Admin, else false - - - - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. - - - - - Fetch the myschedule item whose id is specified by the parameter - - The myschedule id - AD Username - Myschedule if found, null if not found - - - - Fetch all myschedule items belonging to the given user - - The AD Username - Array of Myschedule if found, null if not found - - - - Adds a new mySchedule record to storage. - - The membership to be added - The newly added custom event - - - - Delete the myschedule whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Update the myschedule item. - - The schedule information - The original schedule - - - - Gets a news item entity by id - NOTE: Also a helper method, hence why it returns a StudentNews model - rather than a StudentNewsViewModel - must be casted as the latter in its own - controller - - The SNID (id of news item) - The news item - - - - Gets unapproved unexpired news submitted by user. - - username - Result of query - - - - Adds a news item record to storage. - - The news item to be added - username - The newly added Membership object - - - - (Service) Deletes a news item from the database - - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Service) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item's view model - The news item must be authored by the user and must not be expired and must be unapproved - - - - Helper method to verify that a given news item has not yet been approved - - The news item to verify - true if unapproved, otherwise throws some kind of meaningful exception - - - - Helper method to verify that a given news item has not expired - (see documentation for expiration definition) - - The news item to verify - true if unexpired, otherwise throws some kind of meaningful exception - - - - Helper method to validate a news item - - The news item to validate - True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Verifies that a student account exists - - The AD Username of the student - true if account exists, ResourceNotFoundException if null - - - - get student profile info - - username - StudentProfileViewModel if found, null if not found - - - - get faculty staff profile info - - username - FacultyStaffProfileViewModel if found, null if not found - - - - get alumni profile info - - username - AlumniProfileViewModel if found, null if not found - - - - get mailbox combination - - The current user's username - MailboxViewModel with the combination - - - - get a user's birthday - - The username of the person to get the birthdate of - Date the user's date of birth - - - - get advisors for particular student - - AD username - - - - Gets the clifton strengths of a particular user - The id of the user for which to retrieve info - Clifton strengths of the given user. - - - - Toggles the privacy of the Clifton Strengths data associated with the given id - - ID of the user whose Clifton Strengths privacy is toggled - The new privacy value - Thrown when the given ID doesn't match any Clifton Strengths rows - - - Gets the emergency contact information of a particular user - The username of the user for which to retrieve info - Emergency contact information of the given user. - - - - Get photo path for profile - - AD username - PhotoPathViewModel if found, null if not found - - - - Fetches a single profile whose username matches the username provided as an argument - - The username - ProfileViewModel if found, null if not found - - - - Sets the path for the profile image. - - AD Username - - - - - - Sets the path for the profile links. - - The username - - - - - - privacy setting of mobile phone. - - AD Username - Y or N - - - - mobile phone number setting - - The username for the user whose phone is to be updated - The new number to update the user's phone number to - - - - privacy setting user profile photo. - - AD Username - Y or N - - - - Fetch all upcoming ride items - - IEnumerable of ride items if found, null if not found - - - - Fetch the ride items a user is part of - - The ride id - ride items if found, null if not found - - - - Adds a new ride record to storage. - - The Save_Rides object to be added - The gordon_id of the user creating the ride - The newly added custom event - - - - Delete the ride whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Cancel the ride whose id is specified by the parameter. - - The ride id - The gordon id - The ride that was just deleted - - - - Adds a new booking record to storage. - - The Save_Bookings object to be added - The newly added custom event - - - - Delete the booking whose ids are specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. - - - - - privacy setting of schedule. - - AD Username - Y or N - - - - description of schedule. - - AD Username - New description - - - - Update timestamp of modification in schedule. - - AD Username - Modified Time - - - - Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. - - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the student - StudentScheduleViewModel if found, null if not found - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the instructor - StudentScheduleViewModel if found, null if not found - - - - Service class to facilitate data transactions between the Controller and the database model. - - - - - Get the session record whose sesssion code matches the parameter. - - The session code. - A SessionViewModel if found, null if not found. - - - - Fetches all the session records from the database. - - A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - get Student Employment records of given user - - AD Username of user to get employment - VictoryPromiseViewModel if found, null if not found - - - - get victory promise scores - - id - VictoryPromiseViewModel if found, null if not found - - - - Get the status of the user by id - - AD Username of the user to get the status of - The status of the user, a WellnessViewModel - - - - Stores wellness Status in database. - - AD Username of the user to post the status for - Status that is being posted, one of the WellnessStatusColors - Status that was successfully recorded - - - - gets the question for the wellness check from the back end - - A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. - - - - Creates an expiration date for a check in at the current time - - The time of the check in - When the check in should expire (the next 5AM). - - - - Service class for methods that are shared between all services. - - - - - Helper method that gets the current session we are in. - - The session code of the current session - - - - Deletes an image from the filesystem, if there is one. - - The path to which the image belonged. - - - - Takes an image path and returns the data of the image at that path. - If given path is null it returns an empty string. - - The path to the image - The base64 data of the image - - - - Uploads a news image - - - Takes base64 image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The base64 image data to be stored - The format to save the image as. Defaults to Jpeg - - - - Uploads image from HTTP FormFile - - - Takes image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The image data to be stored - - - - Takes a filepath for an image, navigates to it, collects the raw data - of the file and converts it to base64 format. - - The path to the image - The base64 content of the image - - - + + + + Gordon360 + + + + + Get the username of the authenticated user + + The ClaimsPrincipal representing the user's authentication claims + Username of the authenticated user + + + Set emergency contacts for student + The contact data to be stored + The data stored + + + Sets the students cell phone number + The phone number object to be added to the database + The data stored + + + Sets the students race and ethinicity + The object containing the race numbers of the users + The data stored + + + Gets and returns the user's holds + The user's stored holds + + + Sets the user as having completed Academic Checkin + The HTTP status indicating whether the request was completed or not + + + Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in + The HTTP status indicating whether the request was completed and returns the check in status of the student + + + + Return a list of accounts matching some or all of searchString. + + The input to search for + All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameter. + + The firstname portion of the search + The lastname portion of the search + All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameters + We are searching through all the info of a user, then narrowing it down to get only what we want + + Which account types to search. Accepted values: "student", "alumni", "facstaff" + The first name to search for + The last name to search for + + + + + + + + + + All accounts meeting some or all of the parameter + + + Gets the activities taking place during a given session + The session identifier + A list of all activities that are active during the given session determined by the id parameter + Queries the database to find which activities are active during the session desired + + + Gets the different types of activities taking place during a given session + The session identifier + A list of all the different types of activities that are active during the given session determined by the id parameter + Queries the database to find the distinct activities type of activities that are active during the session desired + + + + Get the status (open or closed) of an activity for a given session + + The session code that we want to check the status for + + + + + + Get all the activities that have not yet been closed out for the current session + + + + + + Get all the activities that have not yet been closed out for the current session for + which a given user is the group admin + + The id of the user who is group admin + + + + + Get all the activities that are already closed out for the current session + + + + + + Get all the activities that are already closed out for the current session for + which a given user is group admin + + The id of the user who is group admin + + + + + + The code of the activity to update + The updated involvement details + + + + + Set an image for the activity + + The activity code + The image file + + + + + Reset the activity Image + + The activity code + + + + Update an existing activity to be private or not + The id of the activity + the boolean value + Calls the server to make a call and update the database with the changed information + + + + Pulls all states available from Jenzabar States Table + + + + + + Pulls all Countries available from Jenzabar Countries Table + + + + + + Get all admins + + + A list of all admins + + + Server makes call to the database and returns all admins + + + + + Get a specific admin + + + The specific admin + + + Server makes call to the database and returns the specific admin + + + + Create a new admin to be added to database + The admin item containing all required and relevant information + + Posts a new admin to the server to be added into the database + + + Delete an existing admin + The identifier for the admin to be deleted + Calls the server to make a call and remove the given admin from the database + + + + Return a list majors. + + All majors + + + + Return a list minors. + + All minors + + + + Return a list minors. + + All minors + + + + Return a list states. + + All states + + + + Return a list countries. + + All countries + + + + Return a list departments. + + All departments + + + + Return a list buildings. + + All buildings + + + Get all the slider content for the dashboard slider + A list of all the slides for the slider + Queries the database for all entries in slider table + + + Get all the banner slides for the dashboard banner + A list of all the slides for the banner + + + Post a new slide for the dashboard banner + The posted banner + + + Remove a slide from the dashboard banner + ID of the slide to remove + + + + Gets information about student's dining plan and balance + + A DiningInfo object + + + + This makes use of our cached request to 25Live, which stores AllEvents + + + + + + Delete an application (and consequently all rows that reference it) + + The id of the application to remove + + + + + Get a list of the apartment-style halls + + + + + + Get apartment application ID number of currently logged in user if that user is on an existing application + + + + + + Get apartment application ID number for a user if that user is on an existing application + + username of the profile info + + + + + save application + + Returns the application ID number if all the queries succeeded + + + + update existing application (Differentiated by HttpPut instead of HttpPost) + + Returns the application ID number if all the queries succeeded + + + + change the editor (i.e. primary applicant) of the application + + The result of changing the editor + + + + change the date an application was submitted + (changes it from null the first time they submit) + + The result of changing the date submitted + + + Get apartment application info for a given application ID number + application ID number of the apartment application + Object of type ApartmentAppViewModel + + + Get apartment application info for all applications if the current user is a housing admin + Object of type ApartmentApplicationViewModel + + + + Get a user's active jobs + + The datetime that the shift started + The datetime that the shift ended + The user's active jobs + + + + Get a user's saved shifts + + The user's saved shifts + + + + Get a user's active jobs + + + The result of saving a shift + + + + Edit a shift + The details that will be changed + + + + + Get a user's active jobs + + The result of deleting the shift + + + + Submit shifts + + The result of submitting the shifts + + + + Gets the name of a supervisor based on their ID number + + The name of the supervisor + + + + sends the current clock in status to the back end + true if user is clocked in and false if clocked out + + detail to be saved in the back end, true if user just clocked in + returns confirmation that the answer was recorded + + + + gets the the clock in status from the back end + true if user is clocked in and false if clocked out + + ClockInViewModel + + + + deletes the last clocked in status of a user + + returns confirmation that clock in status was deleted + + + Create a new error log item to be added to database + The error message containing all required and relevant information + + Posts a new message to the service to be added into the database + + + Create a new error log item to be added to database + The error log containing the ERROR_TIME, and the LOG_MESSAGE + + Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy + + + + Get all the memberships associated with a given activity + + The activity ID + Optional code of session to get for + IHttpActionResult + + + + Gets the group admin memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the leader-type memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the advisor-type memberships associated with a given activity. + + The activity ID. + A list of all advisor-type memberships for the specified activity. + + + + Gets the number of followers of an activity + + The activity ID. + The number of followers of the activity + + + + Gets the number of members (besides followers) of an activity + + The activity ID. + The number of members of the activity + + + + Gets the number of followers of an activity + + The activity ID. + The session code + The number of followers of the activity + + + + Gets the number of members (excluding followers) of an activity + + The activity ID. + The session code + The number of members of the activity + + + Create a new membership item to be added to database + The membership item containing all required and relevant information + + Posts a new membership to the server to be added into the database + + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + + + Update an existing membership item + The membership id of whichever one is to be changed + The content within the membership that is to be changed and what it will change to + Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of + + + Update an existing membership item to be a group admin or not + /// The content within the membership that is to be changed + Calls the server to make a call and update the database with the changed information + + + Update an existing membership item to be private or not + The membership to toggle privacy on + Calls the server to make a call and update the database with the changed information + + + Delete an existing membership + The identifier for the membership to be deleted + Calls the server to make a call and remove the given membership from the database + + + + Determines whether or not the given student is a Group Admin of some activity + + The account username to check + + + + Gets all custom events for a user + + A IEnumerable of custom events + + + + Gets specific custom event for a user + + The requested custom event + + + + Gets all myschedule objects for a user + + A IEnumerable of myschedule objects + + + Create a new myschedule to be added to database + The myschedule item containing all required and relevant information + Created schedule + Posts a new myschedule to the server to be added into the database + + + Delete an existing myschedule item + The identifier for the myschedule to be deleted + Calls the server to make a call and remove the given myschedule from the database + + + Update the existing myschedule in database + The updated myschedule item containing all required and relevant information + Original schedule + Put a myschedule to the server to be updated + + + Gets a news item by id from the database + The id of the news item to retrieve + The news item + + + Gets the base64 image data for an image corresponding + to a student news item. Only used by GO; when we move student news approval + to 360, this will be removed. + The id of the news item to retrieve image from + base64 string representing image + + + Call the service that gets all approved student news entries not yet expired, filtering + out the expired by comparing 2 weeks past date entered to current date + + + Call the service that gets all new and approved student news entries + which have not already expired, + checking novelty by comparing an entry's date entered to 10am on the previous day + + + Call the service that gets the list of categories + + + Call the service that gets all unapproved student news entries (by a particular user) + not yet expired, filtering out the expired news + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Create a new news item to be added to the database + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Deletes a news item from the database + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Controller) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item + The news item must be authored by the user and must not be expired and must be unapproved + + + Get profile info of currently logged in user + + + + Get public profile info for a user + username of the profile info + + + + Get the advisor(s) of a particular student + + All advisors of the given student. For each advisor, + provides first name, last name, and username. + + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Toggle privacy of the current user's Clifton Strengths + New privacy value + + + Gets the emergency contact information of a particular user + The username for which to retrieve info + Emergency contact information of the given user. + + + Gets the mailbox information of currently logged in user + + + + Gets the date of birth of the current logged-in user + + + + Get the profile image of currently logged in user + + + + Get the profile image of the given user + The profile image(s) that the authenticated user is allowed to see, if any + + + + Set an image for profile + + + + + + Set an IDimage for a user + + + + + + Reset the profile Image + + + + + + Update the profile social media links + + The type of social media + The path of the links + + + + + Update mobile phone number + + phoneNumber + + + + + Update privacy of mobile phone number + + Y or N + + + + + Update privacy of profile image + + Y or N + + + + + Posts fields into CCT.dbo.Information_Change_Request + Sends Alumni Profile Update Email to "devrequest@gordon.edu" + + Object with Field's Name and Field's Value, unused Field's Label + + + + + Gets the profile image at the given path or, if that file does not exist, the 360 default profile image + + + Note that the 360 default profile image is different from a user's default image. + A given user's default image is simply their approved ID photo. + The 360 default profile image, on the other hand, is a stock image of Scottie Lion. + Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. + + Path to the profile image to load + + + + + Gets all Membership Request Objects + + List of all requests for membership + + + + Gets a specific Membership Request Object + + The ID of the membership request + A memberships request with the specified id + + + + Gets the memberships requests for the specified activity + + The activity code + All membership requests associated with the activity + + + + Gets the memberships requests for the person making the request + + All membership requests associated with the student + + + + Creates a new membership request + + The request to be added + The added request if successful. HTTP error message if not. + + + + Updates a membership request + + The membership request id + The updated membership request object + The updated request if successful. HTTP error message if not. + + + + Sets a membership request to Approved + + The id of the membership request in question. + If successful: THe updated membership request wrapped in an OK Http status code. + + + + Sets the membership request to Denied + + The id of the membership request in question. + If successful: The updated membership request wrapped in an OK Http status code. + + + + Deletes a membership request + + The id of the membership request to delete + The deleted object + + + + Gets all upcoming ride objects + + A IEnumerable of rides objects + + + + Gets all upcoming ride objects for a user + + A IEnumerable of rides objects + + + + Create new ride object for a user + + Successfully posted ride object + + + Cancel an existing ride item + The identifier for the ride to be cancel + Calls the server to make a call and remove the given ride from the database + + + Delete an existing ride item + The identifier for the ride to be deleted + Calls the server to make a call and remove the given ride from the database + + + + Create new booking object for a user + + Successfully posted booking object + + + Delete an existing booking item + The identifier for the booking to be deleted + Calls the server to make a call and remove the given booking from the database + + + + Get schedule information of logged in user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO: Use Service Layer + + + + + + Get schedule information of specific user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO Use Service Layer + + username + + + + + Update privacy of schedule + + Y or N + + + + + Update schedule description + + New description + + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Get whether the currently logged-in user can read student schedules + + Whether they can read student schedules + + + Get a list of all sessions + All sessions within the database + Queries the database for all sessions, current and past + + + Get one specific session specified by the id in the URL string + The identifier for one specific session + The information about one specific session + Queries the database regarding a specific session with the given identifier + + + + Gets the current active session + + + + + + Gets the days left in the current session + + + + + + Gets student employment information about the user + + A Student Employment Json + + + + Get the short git SHA-1 and build date for the backend + + "Git Hash: {hashCode}; Build Time: {date and time}" + + + + + Gets current victory promise scores + + A VP Json + + + + Enum representing three possible wellness statuses. + GREEN - Healthy, no known contact/symptoms + YELLOW - Symptomatic or cautionary hold + RED - Quarantine/Isolation + + + + + Gets wellness status of current user + + A WellnessViewModel representing the most recent status of the user + + + + Gets question for wellness check from the back end + + A WellnessQuestionViewModel + + + + Stores the user's wellness status + + The current status of the user to post, of type WellnessStatusColor + The status that was stored in the database + + + + Whether the user wants their strengths to be private (not shown to other users) + + + + + Gordon ID Number + + + + + a job's unique id number + + + + + Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of the match, followed by the matched field. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The search input to match against + The match key if search matched a field, or null + + + + Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The first name of the search input to match against + The last name of the search input to match against + The match key if first and last name both matched a field, or null + + + + Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. + + + + + Stores the emergency contact information of a particular user + The object that stores the contact info + The students id number + The stored data + + + + Create the notes value for the database to be passed in with the rest of the data. + The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international + + The mobile phone of the contact + The home phone of the contact + The formatted notes parameter to be passed to the database + + + Stores the cellphone preferences for the current user + The phone number object for the user + The id of the student to be updated + The stored data + + + Stores the demographic data (race and ethnicity) of the current user + The race and ethnicity data for the user + The id of the user to be updated + The stored data + + + Gets the holds of the user with the given ID + The id of the user whose holds are to be found + The stored data + + + Sets the user as having been checked in + The id of the user who is to be marked as checked in + + + Gets the whether the user has completed Academic Checkin + The id of the user for which the data is to be found for + + + Formats a phone number for insertion into the database + The phone number to be formatted + The formatted number + + + + Service Class that facilitates data transactions between the AccountsController and the Account database model. + + + + + Fetches a single account record whose id matches the id provided as an argument + + The person's gordon id + AccountViewModel if found, null if not found + + + + Fetches all the account records from storage. + + AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the account id number + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the first account object which matches the email + + + + Fetches the account record with the specified username. + + The AD username associated with the account. + the student account information + + + + Get basic info for all accounts + + BasicInfoViewModel of all accounts + + + + Get basic info for all accounts except alumni + + BasicInfoViewModel of all accounts except alumni + + + + Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. + ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) + Activity Info and ACtivity may be talked about interchangeably. + + + + + Fetches a single activity record whose id matches the id provided as an argument + + The activity code + ActivityViewModel if found, null if not found + + + + Fetches the Activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the Activity types of activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches all activity records from storage. + + ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Checks to see if a specified activity is still open for this session + Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table + When an activity is closed out, the END_DTE is set to the date on which the closing happened + Otherwise, the END_DTE for all memberships of the activity will be null for that session + + The activity code for the activity in question + Code of the session to check + + + + + Gets a collection of all the current open activities, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current activities already closed out, by finding which activities have + memberships with an END_DTE that is not null + + The collection of activity codes for open activities + + + + Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is not null + + The user's id + The session we want to get the closed activities for + The collection of activity codes for open activities + + + + Updates the Activity Info + + The activity info resource with the updated information + The id of the activity info to be updated + The updated activity info resource + + + + Closes out a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Open a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Updates the image for the spcefied involvement + + The involvement to update the image of + The new image + The involvement with the updated image path + + + + Reset the path for the activity image + + The activity code + + + + change activty privacy + + The activity code + activity private or not + + + + Service class to facilitate interacting with the Admin table. + + + + + Fetches the admin resource whose id is specified as an argument. + + The admin ID.l + The Specified administrator. If none was found, a null value is returned. + + + + Fetches the admin resource whose username matches the specified argument + + The administrator's gordon id + The Specified administrator. If none was found, a null value is returned. + + + + Fetches all the administrators from the database + + Returns a list of administrators. If no administrators were found, an empty list is returned. + + + + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateAdmin() method. + + The admin to be added + The newly added Admin object + + + + Delete the admin whose id is specified by the parameter. + + The admin id + The admin that was just deleted + + + + Helper method to Validate an admin + + The admin to validate + True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter + + + + Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. + + + + + Fetches the dashboard slider content from the database. + + If found, returns a set of SliderViewModel's, based on each slide entry in the db. + If not returns an empty IEnumerable. + + + + Retrieve all banner slides from the database + + An IEnumerable of the slides in the database + + + + Inserts a banner slide in the database and uploads the image to the local slider folder + + The slide to add + The url of the server that the image is being posted to. + This is needed to save the image path into the database. The URL is different depending on where the API is running. + The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. + + The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. + The inserted slide + + + + Deletes a banner slide from the database and deletes the local image file + + The deleted slide + + + + Service that allows for meal control + + + + + + + + + + + + + Get information about the selected plan for the student user + + Student's Gordon ID + Current Session Code + + + + + Service class to facilitate getting emails for members of an activity. + + + + + Get a list of the emails for all members in the activity during the current session. + + The code of the activity to get emails for. + Optionally, the session to get emails for. Defaults to the current session + The participation type to get emails of. If unspecified, gets emails of all participation types. + A list of emails (along with first and last name) associated with that activity + + + + Send a email to a list of email addresses + + All addresses to send this email to + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Send a email to members of an activity + + The activity code to send this email to + The session of activity to select members from + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. + + + + + Adds a new error log to storage. + + The error log to be added + The newly added error_log object + + + + Adds a new error log to storage, after creating the timestamp. + + The error message for the error log to be added + The newly added error_log object + + + + Service that allows for event control + + + + URL to retrieve events from the 25Live API. + event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). + All other event types are not appropiate for the 360 events feed. + end_after parameter limits the request to events from the current academic year. + state parameter fetches only confirmed events + + + + Access the memory stream created by the cached task and parse it into events + Splits events with multiple repeated occurrences into individual records for each occurrence + + All events for the current academic year. + + + + Select only events that are marked for Public promotion + + All Public Events + + + + Select only events that are Approved to give CLAW credit + + All CLAW Events + + + + Returns all attended events for a student in a specific term + + The student's AD Username + The current term + + + + + Helper function to determine the current academic year + + + + + + Calls a stored procedure that returns a row in the staff whitelist which has the given user id, + if it is in the whitelist + + The id of the person using the page + Whether or not the user is on the staff whitelist + + + + Deletes the application with given id, + removing all rows that reference it. + + The id of the application to delete + Whether or not this was successful + + + + Gets all names of apartment halls + + AN array of hall names + + + + Calls a stored procedure that tries to get the id of an the application that a given user is + applicant on for a given session + + The student username to look for + Session for which the application would be + + The id of the application or + null if the user is not on an application for that session + + + + + Get the editor ID of a given application ID + + The application ID for which the editor ID would be + + The id of the editor or + null if the user is a member but not an editor of a given application + + + + + Saves student housing info + - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp + - second, it retrieves the application id of the application with the information we just inserted (because + the database creates the application ID so we have to ask it which number it generated for it) + - third, it inserts each applicant into the applicants table along with the application ID so we know + which application on which they are an applicant + + + The current session code + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Edit an existings apartment application + - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username + - second, it gets an array of the applicants that are already stored in the database for the given application ID + - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database + - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array + + + The student username of the user who is attempting to save the apartment application (retrieved via authentication token) + The current session code + The application ID number of the application to be edited + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Changes the student user who has permission to edit the given application + + + Whether or not all the queries succeeded + + + application ID number of the apartment application + boolean indicating whether the current user is an admin, permits access to restricted information such as birth date + Apartment Application formatted for display in the UI + + + Array of ApartmentApplicationViewModels + + + + "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked + + The application ID number of the application to be submitted + Returns whether the query succeeded + + + + Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. + + + + + Service class to facilitate data transactions between the MembershipRequestController and the database + + + + + Generate a new request to join an activity at a participation level higher than 'Guest' + + The membership request object + The membership request object once it is added + + + + Approves the request with the specified ID. + + The ID of the request to be approved + The approved membership + + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + + + + Denies the membership request object whose id is given in the parameters + + The membership request id + + + + + Get the membership request object whose Id is specified in the parameters. + + The membership request id + If found, returns MembershipRequestViewModel. If not found, returns null. + + + + Fetches all the membership request objects from the database. + + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this activity + + The activity id + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this student + + The AD Username of the user + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Update an existing membership request object + + The membership request id + The newly modified membership request + + + + + Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + + + + + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateMembership() method. + + The membership to be added + The newly added Membership object + + + + Delete the membership whose id is specified by the parameter. + + The membership id + The membership that was just deleted + + + + Fetch the membership whose id is specified by the parameter + + The membership id + MembershipViewModel if found, null if not found + + + + Fetches the memberships associated with the activity whose code is specified by the parameter. + + The activity code. + Optional code of session to get memberships for + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the leaders of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the advisors of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches all the membership information linked to the student whose id appears as a parameter. + + The student's AD Username. + A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the number of followers associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of memberships associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int. + + + + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int + + + + Updates the membership whose id is given as the first parameter to the contents of the second parameter. + + The updated membership. + The newly modified membership. + + + + Switches the group-admin property of the person whose membership id is given + + The corresponding membership object + The newly modified membership. + + + + Switches the privacy property of the person whose membership id is given + + The membership object passed. + The newly modified membership. + + + + Helper method to Validate a membership + + The membership to validate + True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Determines whether or not the given user is a Group Admin of some activity + + Username of the user to check + true if student is a Group Admin, else false + + + + Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. + + + + + Fetch the myschedule item whose id is specified by the parameter + + The myschedule id + AD Username + Myschedule if found, null if not found + + + + Fetch all myschedule items belonging to the given user + + The AD Username + Array of Myschedule if found, null if not found + + + + Adds a new mySchedule record to storage. + + The membership to be added + The newly added custom event + + + + Delete the myschedule whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Update the myschedule item. + + The schedule information + The original schedule + + + + Gets a news item entity by id + NOTE: Also a helper method, hence why it returns a StudentNews model + rather than a StudentNewsViewModel - must be casted as the latter in its own + controller + + The SNID (id of news item) + The news item + + + + Gets unapproved unexpired news submitted by user. + + username + Result of query + + + + Adds a news item record to storage. + + The news item to be added + username + The newly added Membership object + + + + (Service) Deletes a news item from the database + + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Service) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item's view model + The news item must be authored by the user and must not be expired and must be unapproved + + + + Helper method to verify that a given news item has not yet been approved + + The news item to verify + true if unapproved, otherwise throws some kind of meaningful exception + + + + Helper method to verify that a given news item has not expired + (see documentation for expiration definition) + + The news item to verify + true if unexpired, otherwise throws some kind of meaningful exception + + + + Helper method to validate a news item + + The news item to validate + True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Verifies that a student account exists + + The AD Username of the student + true if account exists, ResourceNotFoundException if null + + + + get student profile info + + username + StudentProfileViewModel if found, null if not found + + + + get faculty staff profile info + + username + FacultyStaffProfileViewModel if found, null if not found + + + + get alumni profile info + + username + AlumniProfileViewModel if found, null if not found + + + + get mailbox combination + + The current user's username + MailboxViewModel with the combination + + + + get a user's birthday + + The username of the person to get the birthdate of + Date the user's date of birth + + + + get advisors for particular student + + AD username + + + + Gets the clifton strengths of a particular user + The id of the user for which to retrieve info + Clifton strengths of the given user. + + + + Toggles the privacy of the Clifton Strengths data associated with the given id + + ID of the user whose Clifton Strengths privacy is toggled + The new privacy value + Thrown when the given ID doesn't match any Clifton Strengths rows + + + Gets the emergency contact information of a particular user + The username of the user for which to retrieve info + Emergency contact information of the given user. + + + + Get photo path for profile + + AD username + PhotoPathViewModel if found, null if not found + + + + Fetches a single profile whose username matches the username provided as an argument + + The username + ProfileViewModel if found, null if not found + + + + Sets the path for the profile image. + + AD Username + + + + + + Sets the path for the profile links. + + The username + + + + + + privacy setting of mobile phone. + + AD Username + Y or N + + + + mobile phone number setting + + The username for the user whose phone is to be updated + The new number to update the user's phone number to + + + + privacy setting user profile photo. + + AD Username + Y or N + + + + Fetch all upcoming ride items + + IEnumerable of ride items if found, null if not found + + + + Fetch the ride items a user is part of + + The ride id + ride items if found, null if not found + + + + Adds a new ride record to storage. + + The Save_Rides object to be added + The gordon_id of the user creating the ride + The newly added custom event + + + + Delete the ride whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Cancel the ride whose id is specified by the parameter. + + The ride id + The gordon id + The ride that was just deleted + + + + Adds a new booking record to storage. + + The Save_Bookings object to be added + The newly added custom event + + + + Delete the booking whose ids are specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. + + + + + privacy setting of schedule. + + AD Username + Y or N + + + + description of schedule. + + AD Username + New description + + + + Update timestamp of modification in schedule. + + AD Username + Modified Time + + + + Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. + + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the student + StudentScheduleViewModel if found, null if not found + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the instructor + StudentScheduleViewModel if found, null if not found + + + + Service class to facilitate data transactions between the Controller and the database model. + + + + + Get the session record whose sesssion code matches the parameter. + + The session code. + A SessionViewModel if found, null if not found. + + + + Fetches all the session records from the database. + + A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + get Student Employment records of given user + + AD Username of user to get employment + VictoryPromiseViewModel if found, null if not found + + + + get victory promise scores + + id + VictoryPromiseViewModel if found, null if not found + + + + Get the status of the user by id + + AD Username of the user to get the status of + The status of the user, a WellnessViewModel + + + + Stores wellness Status in database. + + AD Username of the user to post the status for + Status that is being posted, one of the WellnessStatusColors + Status that was successfully recorded + + + + gets the question for the wellness check from the back end + + A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. + + + + Creates an expiration date for a check in at the current time + + The time of the check in + When the check in should expire (the next 5AM). + + + + Service class for methods that are shared between all services. + + + + + Helper method that gets the current session we are in. + + The session code of the current session + + + + Deletes an image from the filesystem, if there is one. + + The path to which the image belonged. + + + + Takes an image path and returns the data of the image at that path. + If given path is null it returns an empty string. + + The path to the image + The base64 data of the image + + + + Uploads a news image + + + Takes base64 image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The base64 image data to be stored + The format to save the image as. Defaults to Jpeg + + + + Uploads image from HTTP FormFile + + + Takes image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The image data to be stored + + + + Takes a filepath for an image, navigates to it, collects the raw data + of the file and converts it to base64 format. + + The path to the image + The base64 content of the image + + + diff --git a/Gordon360/Models/CCT/ACCOUNT.cs b/Gordon360/Models/CCT/ACCOUNT.cs index 5b2757272..1be2a042d 100644 --- a/Gordon360/Models/CCT/ACCOUNT.cs +++ b/Gordon360/Models/CCT/ACCOUNT.cs @@ -1,55 +1,55 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class ACCOUNT - { - public int account_id { get; set; } - [Required] - [StringLength(10)] - [Unicode(false)] - public string gordon_id { get; set; } - [StringLength(14)] - [Unicode(false)] - public string barcode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string firstname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string lastname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string email { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - [StringLength(20)] - [Unicode(false)] - public string account_type { get; set; } - [StringLength(75)] - [Unicode(false)] - public string office_hours { get; set; } - public int Primary_Photo { get; set; } - public int Preferred_Photo { get; set; } - public int show_pic { get; set; } - public int Private { get; set; } - public int ReadOnly { get; set; } - public int is_police { get; set; } - public int? Chapel_Required { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - public int? Chapel_Attended { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Birth_Date { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class ACCOUNT + { + public int account_id { get; set; } + [Required] + [StringLength(10)] + [Unicode(false)] + public string gordon_id { get; set; } + [StringLength(14)] + [Unicode(false)] + public string barcode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string firstname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string lastname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string email { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + [StringLength(20)] + [Unicode(false)] + public string account_type { get; set; } + [StringLength(75)] + [Unicode(false)] + public string office_hours { get; set; } + public int Primary_Photo { get; set; } + public int Preferred_Photo { get; set; } + public int show_pic { get; set; } + public int Private { get; set; } + public int ReadOnly { get; set; } + public int is_police { get; set; } + public int? Chapel_Required { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + public int? Chapel_Attended { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Birth_Date { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs b/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs index 491177405..91a80570d 100644 --- a/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs +++ b/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ACTIVE_CLUBS_PER_SESS_IDResult - { - public string ACT_CDE { get; set; } - public string ACT_DESC { get; set; } - public string ACT_TYPE { get; set; } - public string ACT_TYPE_DESC { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ACTIVE_CLUBS_PER_SESS_IDResult + { + public string ACT_CDE { get; set; } + public string ACT_DESC { get; set; } + public string ACT_TYPE { get; set; } + public string ACT_TYPE_DESC { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ACT_INFO.cs b/Gordon360/Models/CCT/ACT_INFO.cs index 47d99c4c8..2f1e2947d 100644 --- a/Gordon360/Models/CCT/ACT_INFO.cs +++ b/Gordon360/Models/CCT/ACT_INFO.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ACT_INFO - { - [Key] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ACT_DESC { get; set; } - [Unicode(false)] - public string ACT_BLURB { get; set; } - [Unicode(false)] - public string ACT_URL { get; set; } - [Unicode(false)] - public string ACT_IMG_PATH { get; set; } - [StringLength(3)] - [Unicode(false)] - public string ACT_TYPE { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } - public bool? PRIVACY { get; set; } - [Unicode(false)] - public string ACT_JOIN_INFO { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ACT_INFO + { + [Key] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [Unicode(false)] + public string ACT_BLURB { get; set; } + [Unicode(false)] + public string ACT_URL { get; set; } + [Unicode(false)] + public string ACT_IMG_PATH { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + public bool? PRIVACY { get; set; } + [Unicode(false)] + public string ACT_JOIN_INFO { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ADMIN.cs b/Gordon360/Models/CCT/ADMIN.cs index f5bb0c8a1..cccde714c 100644 --- a/Gordon360/Models/CCT/ADMIN.cs +++ b/Gordon360/Models/CCT/ADMIN.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ADMIN - { - [Key] - public int ADMIN_ID { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string USER_NAME { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string EMAIL { get; set; } - public bool SUPER_ADMIN { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ADMIN + { + [Key] + public int ADMIN_ID { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string USER_NAME { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string EMAIL { get; set; } + public bool SUPER_ADMIN { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs index 424150b37..bea0c5dee 100644 --- a/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ADVISOR_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ADVISOR_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs b/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs index cb329f7d0..ea6aa58aa 100644 --- a/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs +++ b/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ADVISOR_SEPARATEResult - { - public string Advisor1 { get; set; } - public string Advisor2 { get; set; } - public string Advisor3 { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ADVISOR_SEPARATEResult + { + public string Advisor1 { get; set; } + public string Advisor2 { get; set; } + public string Advisor3 { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs b/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs index d32031ffa..9ae43c30e 100644 --- a/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs +++ b/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_BASIC_INFOResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Nickname { get; set; } - public string MaidenName { get; set; } - public string UserName { get; set; } - public string ConcatonatedInfo { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_BASIC_INFOResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Nickname { get; set; } + public string MaidenName { get; set; } + public string UserName { get; set; } + public string ConcatonatedInfo { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs b/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs index 27505aaed..db1241aa9 100644 --- a/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs +++ b/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_BASIC_INFO_NOT_ALUMNIResult - { - public string firstname { get; set; } - public string lastname { get; set; } - public string Nickname { get; set; } - public string MaidenName { get; set; } - public string Username { get; set; } - public string ConcatonatedInfo { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_BASIC_INFO_NOT_ALUMNIResult + { + public string firstname { get; set; } + public string lastname { get; set; } + public string Nickname { get; set; } + public string MaidenName { get; set; } + public string Username { get; set; } + public string ConcatonatedInfo { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs b/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs index 3613a78c3..25a30f17f 100644 --- a/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs +++ b/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs @@ -1,27 +1,27 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_MEMBERSHIPSResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_MEMBERSHIPSResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_REQUESTSResult.cs b/Gordon360/Models/CCT/ALL_REQUESTSResult.cs index 9cdf547c2..a6dfc4bd9 100644 --- a/Gordon360/Models/CCT/ALL_REQUESTSResult.cs +++ b/Gordon360/Models/CCT/ALL_REQUESTSResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_REQUESTSResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_REQUESTSResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs b/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs index c5bf59926..c0e72a483 100644 --- a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs +++ b/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_SUPERVISORSResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_SUPERVISORSResult + { + } +} diff --git a/Gordon360/Models/CCT/Alumni.cs b/Gordon360/Models/CCT/Alumni.cs index 09f249717..75ff8e724 100644 --- a/Gordon360/Models/CCT/Alumni.cs +++ b/Gordon360/Models/CCT/Alumni.cs @@ -1,129 +1,129 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Alumni - { - [Required] - [StringLength(25)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(25)] - [Unicode(false)] - public string WebUpdate { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string NickName { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(25)] - [Unicode(false)] - public string HomeFax { get; set; } - [StringLength(255)] - [Unicode(false)] - public string HomeEmail { get; set; } - [StringLength(50)] - [Unicode(false)] - public string JobTitle { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MaritalStatus { get; set; } - [StringLength(60)] - [Unicode(false)] - public string SpouseName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string College { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ClassYear { get; set; } - [StringLength(25)] - [Unicode(false)] - public string PreferredClassYear { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ShareName { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ShareAddress { get; set; } - [StringLength(10)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(50)] - [Unicode(false)] - public string GradDate { get; set; } - [StringLength(255)] - [Unicode(false)] - public string Email { get; set; } - [StringLength(1)] - [Unicode(false)] - public string grad_student { get; set; } - [StringLength(15)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int? show_pic { get; set; } - public int? preferred_photo { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1Description { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Alumni + { + [Required] + [StringLength(25)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(25)] + [Unicode(false)] + public string WebUpdate { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string NickName { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(25)] + [Unicode(false)] + public string HomeFax { get; set; } + [StringLength(255)] + [Unicode(false)] + public string HomeEmail { get; set; } + [StringLength(50)] + [Unicode(false)] + public string JobTitle { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MaritalStatus { get; set; } + [StringLength(60)] + [Unicode(false)] + public string SpouseName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string College { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ClassYear { get; set; } + [StringLength(25)] + [Unicode(false)] + public string PreferredClassYear { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ShareName { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ShareAddress { get; set; } + [StringLength(10)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(50)] + [Unicode(false)] + public string GradDate { get; set; } + [StringLength(255)] + [Unicode(false)] + public string Email { get; set; } + [StringLength(1)] + [Unicode(false)] + public string grad_student { get; set; } + [StringLength(15)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int? show_pic { get; set; } + public int? preferred_photo { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1Description { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Birthdays.cs b/Gordon360/Models/CCT/Birthdays.cs index 39b174050..a554d3e7a 100644 --- a/Gordon360/Models/CCT/Birthdays.cs +++ b/Gordon360/Models/CCT/Birthdays.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Birthdays - { - public int ID_NUM { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BIRTH_DTE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Birthdays + { + public int ID_NUM { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BIRTH_DTE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Buildings.cs b/Gordon360/Models/CCT/Buildings.cs index 754e0f747..1ded945d2 100644 --- a/Gordon360/Models/CCT/Buildings.cs +++ b/Gordon360/Models/CCT/Buildings.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Buildings - { - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_CDE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BUILDING_DESC { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Buildings + { + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BUILDING_DESC { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/CM_SESSION_MSTR.cs b/Gordon360/Models/CCT/CM_SESSION_MSTR.cs index e75a014f3..f7cf31955 100644 --- a/Gordon360/Models/CCT/CM_SESSION_MSTR.cs +++ b/Gordon360/Models/CCT/CM_SESSION_MSTR.cs @@ -1,36 +1,36 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class CM_SESSION_MSTR - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [StringLength(1000)] - [Unicode(false)] - public string SESS_DESC { get; set; } - [Column(TypeName = "datetime")] - public DateTime? SESS_BEGN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? SESS_END_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? WHEEL_BEGN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? WHEEL_END_DTE { get; set; } - [StringLength(32)] - [Unicode(false)] - public string YRTRM_CDE_2 { get; set; } - [StringLength(32)] - [Unicode(false)] - public string YRTRM_CDE_4 { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class CM_SESSION_MSTR + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SESS_DESC { get; set; } + [Column(TypeName = "datetime")] + public DateTime? SESS_BEGN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? SESS_END_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? WHEEL_BEGN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? WHEEL_END_DTE { get; set; } + [StringLength(32)] + [Unicode(false)] + public string YRTRM_CDE_2 { get; set; } + [StringLength(32)] + [Unicode(false)] + public string YRTRM_CDE_4 { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs b/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs index 0159e6686..31f29c176 100644 --- a/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs +++ b/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class COURSES_FOR_PROFESSORResult - { - public string YR_CDE { get; set; } - public string TRM_CDE { get; set; } - public string CRS_CDE { get; set; } - public string SUBTERM_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public string SATURDAY_CDE { get; set; } - public string SUNDAY_CDE { get; set; } - public DateTime? BEGIN_TIM { get; set; } - public DateTime? END_TIM { get; set; } - public string LOC_CDE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public int? PROFESSOR_ID_NUM { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class COURSES_FOR_PROFESSORResult + { + public string YR_CDE { get; set; } + public string TRM_CDE { get; set; } + public string CRS_CDE { get; set; } + public string SUBTERM_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public string SATURDAY_CDE { get; set; } + public string SUNDAY_CDE { get; set; } + public DateTime? BEGIN_TIM { get; set; } + public DateTime? END_TIM { get; set; } + public string LOC_CDE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public int? PROFESSOR_ID_NUM { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs b/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs index 02b3f26de..12a5ab7cb 100644 --- a/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs +++ b/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class CREATE_MESSAGE_ROOMResult - { - public bool group { get; set; } - public int id { get; set; } - public string name { get; set; } - public DateTime createdAt { get; set; } - public DateTime lastUpdated { get; set; } - public byte[] image { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class CREATE_MESSAGE_ROOMResult + { + public bool group { get; set; } + public int id { get; set; } + public string name { get; set; } + public DateTime createdAt { get; set; } + public DateTime lastUpdated { get; set; } + public byte[] image { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs b/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs index fcac67f93..53ef15490 100644 --- a/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs +++ b/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class CURRENT_SESSIONResult - { - public string DEFAULT_SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class CURRENT_SESSIONResult + { + public string DEFAULT_SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CUSTOM_PROFILE.cs b/Gordon360/Models/CCT/CUSTOM_PROFILE.cs index c5b64cf58..e0da6b707 100644 --- a/Gordon360/Models/CCT/CUSTOM_PROFILE.cs +++ b/Gordon360/Models/CCT/CUSTOM_PROFILE.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class CUSTOM_PROFILE - { - [Key] - [StringLength(50)] - [Unicode(false)] - public string username { get; set; } - [Unicode(false)] - public string facebook { get; set; } - [Unicode(false)] - public string twitter { get; set; } - [Unicode(false)] - public string instagram { get; set; } - [Unicode(false)] - public string linkedin { get; set; } - [Unicode(false)] - public string handshake { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class CUSTOM_PROFILE + { + [Key] + [StringLength(50)] + [Unicode(false)] + public string username { get; set; } + [Unicode(false)] + public string facebook { get; set; } + [Unicode(false)] + public string twitter { get; set; } + [Unicode(false)] + public string instagram { get; set; } + [Unicode(false)] + public string linkedin { get; set; } + [Unicode(false)] + public string handshake { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ChapelEvent.cs b/Gordon360/Models/CCT/ChapelEvent.cs index 42d924c4a..5bbc1d1f3 100644 --- a/Gordon360/Models/CCT/ChapelEvent.cs +++ b/Gordon360/Models/CCT/ChapelEvent.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class ChapelEvent - { - public int ROWID { get; set; } - [Required] - [StringLength(25)] - public string CHBarEventID { get; set; } - public int ID_NUM { get; set; } - [StringLength(14)] - public string CHBarcode { get; set; } - [StringLength(10)] - public string CHEventID { get; set; } - [StringLength(14)] - public string CHCheckerID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHDate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHTime { get; set; } - [StringLength(1)] - public string CHSource { get; set; } - [StringLength(4)] - public string CHTermCD { get; set; } - public int? Attended { get; set; } - public int? Required { get; set; } - public int? LiveID { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class ChapelEvent + { + public int ROWID { get; set; } + [Required] + [StringLength(25)] + public string CHBarEventID { get; set; } + public int ID_NUM { get; set; } + [StringLength(14)] + public string CHBarcode { get; set; } + [StringLength(10)] + public string CHEventID { get; set; } + [StringLength(14)] + public string CHCheckerID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHDate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHTime { get; set; } + [StringLength(1)] + public string CHSource { get; set; } + [StringLength(4)] + public string CHTermCD { get; set; } + public int? Attended { get; set; } + public int? Required { get; set; } + public int? LiveID { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Clifton_Strengths.cs b/Gordon360/Models/CCT/Clifton_Strengths.cs index 3078db591..40d705933 100644 --- a/Gordon360/Models/CCT/Clifton_Strengths.cs +++ b/Gordon360/Models/CCT/Clifton_Strengths.cs @@ -1,45 +1,45 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Clifton_Strengths - { - [Key] - public int ID_NUM { get; set; } - [Key] - [StringLength(25)] - [Unicode(false)] - public string ACCESS_CODE { get; set; } - [Required] - [StringLength(200)] - [Unicode(false)] - public string EMAIL { get; set; } - [Column(TypeName = "datetime")] - public DateTime? DTE_COMPLETED { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_1 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_2 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_3 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_4 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_5 { get; set; } - /// - /// Whether the user wants their strengths to be private (not shown to other users) - /// - public bool Private { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Clifton_Strengths + { + [Key] + public int ID_NUM { get; set; } + [Key] + [StringLength(25)] + [Unicode(false)] + public string ACCESS_CODE { get; set; } + [Required] + [StringLength(200)] + [Unicode(false)] + public string EMAIL { get; set; } + [Column(TypeName = "datetime")] + public DateTime? DTE_COMPLETED { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_1 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_2 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_3 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_4 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_5 { get; set; } + /// + /// Whether the user wants their strengths to be private (not shown to other users) + /// + public bool Private { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Config.cs b/Gordon360/Models/CCT/Config.cs index 1900c86e2..7231b9a9d 100644 --- a/Gordon360/Models/CCT/Config.cs +++ b/Gordon360/Models/CCT/Config.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Config - { - [Key] - public int ID { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string Key { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string Value { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Config + { + [Key] + public int ID { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string Key { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string Value { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Context/CCTContext.cs b/Gordon360/Models/CCT/Context/CCTContext.cs index 86c35a2a7..fd18e3954 100644 --- a/Gordon360/Models/CCT/Context/CCTContext.cs +++ b/Gordon360/Models/CCT/Context/CCTContext.cs @@ -1,468 +1,484 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata; -using Gordon360.Models.CCT; - -namespace Gordon360.Models.CCT.Context -{ - public partial class CCTContext : DbContext - { - public CCTContext() - { - } - - public CCTContext(DbContextOptions options) - : base(options) - { - } - - public virtual DbSet ACCOUNT { get; set; } - public virtual DbSet ACT_INFO { get; set; } - public virtual DbSet ADMIN { get; set; } - public virtual DbSet Alumni { get; set; } - public virtual DbSet Birthdays { get; set; } - public virtual DbSet Buildings { get; set; } - public virtual DbSet CM_SESSION_MSTR { get; set; } - public virtual DbSet CUSTOM_PROFILE { get; set; } - public virtual DbSet ChapelEvent { get; set; } - public virtual DbSet Clifton_Strengths { get; set; } - public virtual DbSet Config { get; set; } - public virtual DbSet Countries { get; set; } - public virtual DbSet DiningInfo { get; set; } - public virtual DbSet Dining_Meal_Choice_Desc { get; set; } - public virtual DbSet Dining_Meal_Plan_Change_History { get; set; } - public virtual DbSet Dining_Meal_Plan_Id_Mapping { get; set; } - public virtual DbSet Dining_Mealplans { get; set; } - public virtual DbSet Dining_Student_Meal_Choice { get; set; } - public virtual DbSet ERROR_LOG { get; set; } - public virtual DbSet EmergencyContact { get; set; } - public virtual DbSet FacStaff { get; set; } - public virtual DbSet Graduation { get; set; } - public virtual DbSet Health_Question { get; set; } - public virtual DbSet Health_Status { get; set; } - public virtual DbSet Health_Status_CTRL { get; set; } - public virtual DbSet Housing_Admins { get; set; } - public virtual DbSet Housing_Applicants { get; set; } - public virtual DbSet Housing_Applications { get; set; } - public virtual DbSet Housing_HallChoices { get; set; } - public virtual DbSet Housing_Halls { get; set; } - public virtual DbSet Information_Change_Request { get; set; } - public virtual DbSet Internships_as_Involvements { get; set; } - public virtual DbSet JENZ_ACT_CLUB_DEF { get; set; } - public virtual DbSet JNZB_ACTIVITIES { get; set; } - public virtual DbSet MEMBERSHIP { get; set; } - public virtual DbSet MYSCHEDULE { get; set; } - public virtual DbSet Mailboxes { get; set; } - public virtual DbSet Majors { get; set; } - public virtual DbSet MembershipView { get; set; } - public virtual DbSet Message_Rooms { get; set; } - public virtual DbSet Messages { get; set; } - public virtual DbSet PART_DEF { get; set; } - public virtual DbSet Police { get; set; } - public virtual DbSet REQUEST { get; set; } - public virtual DbSet RoomAssign { get; set; } - public virtual DbSet Rooms { get; set; } - public virtual DbSet Save_Bookings { get; set; } - public virtual DbSet Save_Rides { get; set; } - public virtual DbSet Schedule_Control { get; set; } - public virtual DbSet Slider_Images { get; set; } - public virtual DbSet States { get; set; } - public virtual DbSet Student { get; set; } - public virtual DbSet StudentNewsExpiration { get; set; } - public virtual DbSet Timesheets_Clock_In_Out { get; set; } - public virtual DbSet User_Connection_Ids { get; set; } - public virtual DbSet User_Rooms { get; set; } - public virtual DbSet Users { get; set; } - public virtual DbSet<_360_SLIDER> _360_SLIDER { get; set; } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToView("ACCOUNT"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.ACT_CDE) - .HasName("PK_Activity_Info"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.ACT_DESC).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.ADMIN_ID) - .HasName("PK_Admin"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Alumni"); - - entity.Property(e => e.Country).IsFixedLength(); - - entity.Property(e => e.grad_student).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Birthdays"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Buildings"); - - entity.Property(e => e.BLDG_CDE).IsFixedLength(); - - entity.Property(e => e.BUILDING_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("CM_SESSION_MSTR"); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("ChapelEvent"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.ID_NUM, e.ACCESS_CODE }) - .HasName("PK_CliftonStrengths"); - - entity.Property(e => e.Private).HasComment("Whether the user wants their strengths to be private (not shown to other users)"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Countries"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("DiningInfo"); - - entity.Property(e => e.ChoiceDescription).IsFixedLength(); - - entity.Property(e => e.SessionCode).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Choice_Desc"); - - entity.Property(e => e.Meal_Choice_Desc).IsFixedLength(); - - entity.Property(e => e.Meal_Choice_Id).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Plan_Change_History"); - - entity.Property(e => e.OLD_PLAN_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Plan_Id_Mapping"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Mealplans"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Student_Meal_Choice"); - - entity.Property(e => e.MEAL_CHOICE_ID).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("EmergencyContact"); - - entity.Property(e => e.AddressAddrCode).IsFixedLength(); - - entity.Property(e => e.ApprowVersion) - .IsRowVersion() - .IsConcurrencyToken(); - - entity.Property(e => e.EmailAddrCode).IsFixedLength(); - - entity.Property(e => e.HomeAddrCode).IsFixedLength(); - - entity.Property(e => e.HomeExt).IsFixedLength(); - - entity.Property(e => e.HomePhone).IsFixedLength(); - - entity.Property(e => e.MobileAddrCode).IsFixedLength(); - - entity.Property(e => e.MobileExt).IsFixedLength(); - - entity.Property(e => e.MobilePhone).IsFixedLength(); - - entity.Property(e => e.WorkAddrCode).IsFixedLength(); - - entity.Property(e => e.WorkExr).IsFixedLength(); - - entity.Property(e => e.WorkPhone).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("FacStaff"); - - entity.Property(e => e.BuildingDescription).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Graduation"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.Created, e.ID_Num }) - .HasName("PK__Health_S__6CC83B6815B808A2"); - - entity.HasOne(d => d.HealthStatus) - .WithMany(p => p.Health_Status) - .HasForeignKey(d => d.HealthStatusID) - .OnDelete(DeleteBehavior.ClientSetNull) - .HasConstraintName("FK_Health_Status_HealthStatus_CTRL"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.HousingAppID, e.Username }); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.HasOne(d => d.HousingApp) - .WithMany(p => p.Housing_Applicants) - .HasForeignKey(d => d.HousingAppID) - .HasConstraintName("FK_Applicants_HousingAppID"); - }); - - modelBuilder.Entity(entity => - { - entity.HasOne(d => d.HousingApp) - .WithMany() - .HasForeignKey(d => d.HousingAppID) - .HasConstraintName("FK_HallChoices_HousingAppID"); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.TimeStamp).HasDefaultValueSql("(getdate())"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Internships_as_Involvements"); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.TRM_CDE).IsFixedLength(); - - entity.Property(e => e.YR_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("JENZ_ACT_CLUB_DEF"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.ACT_DESC).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.INCL_PROFILE_RPT).IsFixedLength(); - - entity.Property(e => e.JOB_NAME).IsFixedLength(); - - entity.Property(e => e.MEMBERSHIP_STS).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.TRACK_MTG_ATTEND).IsFixedLength(); - - entity.Property(e => e.USER_NAME).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.MEMBERSHIP_ID) - .HasName("PK_Membership"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.JOB_NAME).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.USER_NAME).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.EVENT_ID, e.GORDON_ID }); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Mailboxes"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Majors"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("MembershipView"); - - entity.Property(e => e.ActivityCode).IsFixedLength(); - - entity.Property(e => e.ActivityDescription).IsFixedLength(); - - entity.Property(e => e.Participation).IsFixedLength(); - - entity.Property(e => e.ParticipationDescription).IsFixedLength(); - - entity.Property(e => e.SessionCode).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.room_id) - .HasName("PK__Message___19675A8A3E781488"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("PART_DEF"); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.PART_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Police"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.REQUEST_ID) - .HasName("PK_Request"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("RoomAssign"); - - entity.Property(e => e.BLDG_CDE).IsFixedLength(); - - entity.Property(e => e.BLDG_LOC_CDE).IsFixedLength(); - - entity.Property(e => e.ROOM_ASSIGN_STS).IsFixedLength(); - - entity.Property(e => e.ROOM_CDE).IsFixedLength(); - - entity.Property(e => e.ROOM_TYPE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.ID, e.rideID }); - - entity.HasOne(d => d.ride) - .WithMany(p => p.Save_Bookings) - .HasForeignKey(d => d.rideID) - .HasConstraintName("FK_booking_rides"); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.IsSchedulePrivate).HasDefaultValueSql("((1))"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("States"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Student"); - - entity.Property(e => e.BuildingDescription).IsFixedLength(); - - entity.Property(e => e.Country).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.SNID) - .HasName("PK_StudentNewsExpiration_SNID"); - - entity.Property(e => e.SNID).ValueGeneratedNever(); - }); - - modelBuilder.Entity<_360_SLIDER>(entity => - { - entity.ToView("360_SLIDER"); - }); - - modelBuilder.HasSequence("Information_Change_Request_Seq"); - - OnModelCreatingGeneratedProcedures(modelBuilder); - OnModelCreatingPartial(modelBuilder); - } - - partial void OnModelCreatingPartial(ModelBuilder modelBuilder); - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; +using Gordon360.Models.CCT; + +namespace Gordon360.Models.CCT.Context +{ + public partial class CCTContext : DbContext + { + public CCTContext() + { + } + + public CCTContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet ACCOUNT { get; set; } + public virtual DbSet ACT_INFO { get; set; } + public virtual DbSet ADMIN { get; set; } + public virtual DbSet Alumni { get; set; } + public virtual DbSet Birthdays { get; set; } + public virtual DbSet Buildings { get; set; } + public virtual DbSet CM_SESSION_MSTR { get; set; } + public virtual DbSet CUSTOM_PROFILE { get; set; } + public virtual DbSet ChapelEvent { get; set; } + public virtual DbSet Clifton_Strengths { get; set; } + public virtual DbSet Config { get; set; } + public virtual DbSet Countries { get; set; } + public virtual DbSet DiningInfo { get; set; } + public virtual DbSet Dining_Meal_Choice_Desc { get; set; } + public virtual DbSet Dining_Meal_Plan_Change_History { get; set; } + public virtual DbSet Dining_Meal_Plan_Id_Mapping { get; set; } + public virtual DbSet Dining_Mealplans { get; set; } + public virtual DbSet Dining_Student_Meal_Choice { get; set; } + public virtual DbSet ERROR_LOG { get; set; } + public virtual DbSet EmergencyContact { get; set; } + public virtual DbSet FacStaff { get; set; } + public virtual DbSet Graduation { get; set; } + public virtual DbSet Health_Question { get; set; } + public virtual DbSet Health_Status { get; set; } + public virtual DbSet Health_Status_CTRL { get; set; } + public virtual DbSet Housing_Admins { get; set; } + public virtual DbSet Housing_Applicants { get; set; } + public virtual DbSet Housing_Applications { get; set; } + public virtual DbSet Housing_HallChoices { get; set; } + public virtual DbSet Housing_Halls { get; set; } + public virtual DbSet Information_Change_Request { get; set; } + public virtual DbSet Internships_as_Involvements { get; set; } + public virtual DbSet InvolvementOffering { get; set; } + public virtual DbSet JENZ_ACT_CLUB_DEF { get; set; } + public virtual DbSet JNZB_ACTIVITIES { get; set; } + public virtual DbSet MEMBERSHIP { get; set; } + public virtual DbSet MYSCHEDULE { get; set; } + public virtual DbSet Mailboxes { get; set; } + public virtual DbSet Majors { get; set; } + public virtual DbSet MembershipView { get; set; } + public virtual DbSet Message_Rooms { get; set; } + public virtual DbSet Messages { get; set; } + public virtual DbSet PART_DEF { get; set; } + public virtual DbSet Police { get; set; } + public virtual DbSet REQUEST { get; set; } + public virtual DbSet RoomAssign { get; set; } + public virtual DbSet Rooms { get; set; } + public virtual DbSet Save_Bookings { get; set; } + public virtual DbSet Save_Rides { get; set; } + public virtual DbSet Schedule_Control { get; set; } + public virtual DbSet Slider_Images { get; set; } + public virtual DbSet States { get; set; } + public virtual DbSet Student { get; set; } + public virtual DbSet StudentNewsExpiration { get; set; } + public virtual DbSet Timesheets_Clock_In_Out { get; set; } + public virtual DbSet User_Connection_Ids { get; set; } + public virtual DbSet User_Rooms { get; set; } + public virtual DbSet Users { get; set; } + public virtual DbSet<_360_SLIDER> _360_SLIDER { get; set; } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToView("ACCOUNT"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ACT_CDE) + .HasName("PK_Activity_Info"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ADMIN_ID) + .HasName("PK_Admin"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Alumni"); + + entity.Property(e => e.Country).IsFixedLength(); + + entity.Property(e => e.grad_student).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Birthdays"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Buildings"); + + entity.Property(e => e.BLDG_CDE).IsFixedLength(); + + entity.Property(e => e.BUILDING_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("CM_SESSION_MSTR"); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("ChapelEvent"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.ID_NUM, e.ACCESS_CODE }) + .HasName("PK_CliftonStrengths"); + + entity.Property(e => e.Private).HasComment("Whether the user wants their strengths to be private (not shown to other users)"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Countries"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("DiningInfo"); + + entity.Property(e => e.ChoiceDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Choice_Desc"); + + entity.Property(e => e.Meal_Choice_Desc).IsFixedLength(); + + entity.Property(e => e.Meal_Choice_Id).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Plan_Change_History"); + + entity.Property(e => e.OLD_PLAN_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Plan_Id_Mapping"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Mealplans"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Student_Meal_Choice"); + + entity.Property(e => e.MEAL_CHOICE_ID).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("EmergencyContact"); + + entity.Property(e => e.AddressAddrCode).IsFixedLength(); + + entity.Property(e => e.ApprowVersion) + .IsRowVersion() + .IsConcurrencyToken(); + + entity.Property(e => e.EmailAddrCode).IsFixedLength(); + + entity.Property(e => e.HomeAddrCode).IsFixedLength(); + + entity.Property(e => e.HomeExt).IsFixedLength(); + + entity.Property(e => e.HomePhone).IsFixedLength(); + + entity.Property(e => e.MobileAddrCode).IsFixedLength(); + + entity.Property(e => e.MobileExt).IsFixedLength(); + + entity.Property(e => e.MobilePhone).IsFixedLength(); + + entity.Property(e => e.WorkAddrCode).IsFixedLength(); + + entity.Property(e => e.WorkExr).IsFixedLength(); + + entity.Property(e => e.WorkPhone).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("FacStaff"); + + entity.Property(e => e.BuildingDescription).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Graduation"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.Created, e.ID_Num }) + .HasName("PK__Health_S__6CC83B6815B808A2"); + + entity.HasOne(d => d.HealthStatus) + .WithMany(p => p.Health_Status) + .HasForeignKey(d => d.HealthStatusID) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Health_Status_HealthStatus_CTRL"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.HousingAppID, e.Username }); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.HasOne(d => d.HousingApp) + .WithMany(p => p.Housing_Applicants) + .HasForeignKey(d => d.HousingAppID) + .HasConstraintName("FK_Applicants_HousingAppID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasOne(d => d.HousingApp) + .WithMany() + .HasForeignKey(d => d.HousingAppID) + .HasConstraintName("FK_HallChoices_HousingAppID"); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.TimeStamp).HasDefaultValueSql("(getdate())"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Internships_as_Involvements"); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.TRM_CDE).IsFixedLength(); + + entity.Property(e => e.YR_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("InvolvementOffering"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("JENZ_ACT_CLUB_DEF"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.INCL_PROFILE_RPT).IsFixedLength(); + + entity.Property(e => e.JOB_NAME).IsFixedLength(); + + entity.Property(e => e.MEMBERSHIP_STS).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.TRACK_MTG_ATTEND).IsFixedLength(); + + entity.Property(e => e.USER_NAME).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.MEMBERSHIP_ID) + .HasName("PK_Membership"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.JOB_NAME).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.USER_NAME).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.EVENT_ID, e.GORDON_ID }); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Mailboxes"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Majors"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("MembershipView"); + + entity.Property(e => e.ActivityCode).IsFixedLength(); + + entity.Property(e => e.ActivityDescription).IsFixedLength(); + + entity.Property(e => e.Participation).IsFixedLength(); + + entity.Property(e => e.ParticipationDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.room_id) + .HasName("PK__Message___19675A8A3E781488"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("PART_DEF"); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.PART_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Police"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.REQUEST_ID) + .HasName("PK_Request"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("RoomAssign"); + + entity.Property(e => e.BLDG_CDE).IsFixedLength(); + + entity.Property(e => e.BLDG_LOC_CDE).IsFixedLength(); + + entity.Property(e => e.ROOM_ASSIGN_STS).IsFixedLength(); + + entity.Property(e => e.ROOM_CDE).IsFixedLength(); + + entity.Property(e => e.ROOM_TYPE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.ID, e.rideID }); + + entity.HasOne(d => d.ride) + .WithMany(p => p.Save_Bookings) + .HasForeignKey(d => d.rideID) + .HasConstraintName("FK_booking_rides"); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.IsSchedulePrivate).HasDefaultValueSql("((1))"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("States"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Student"); + + entity.Property(e => e.BuildingDescription).IsFixedLength(); + + entity.Property(e => e.Country).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.SNID) + .HasName("PK_StudentNewsExpiration_SNID"); + + entity.Property(e => e.SNID).ValueGeneratedNever(); + }); + + modelBuilder.Entity<_360_SLIDER>(entity => + { + entity.ToView("360_SLIDER"); + }); + + modelBuilder.HasSequence("Information_Change_Request_Seq"); + + OnModelCreatingGeneratedProcedures(modelBuilder); + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs index 7694bd6c8..ab8807634 100644 --- a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs @@ -1,3955 +1,3955 @@ -// This file has been auto generated by EF Core Power Tools. -using Gordon360.Models.CCT; -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public partial class CCTContext - { - private ICCTContextProcedures _procedures; - - public virtual ICCTContextProcedures Procedures - { - get - { - if (_procedures is null) _procedures = new CCTContextProcedures(this); - return _procedures; - } - set - { - _procedures = value; - } - } - - public ICCTContextProcedures GetProcedures() - { - return Procedures; - } - - protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) - { - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - } - } - - public partial class CCTContextProcedures : ICCTContextProcedures - { - private readonly CCTContext _context; - - public CCTContextProcedures(CCTContext context) - { - _context = context; - } - - public virtual async Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ACTIVE_CLUBS_PER_SESS_ID] @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_SEPARATE] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_MEMBERSHIPS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_REQUESTS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_SUPERVISORS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "username", - Size = 64, - Value = username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CAN_READ_STUDENT_SCHEDULES] @username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CANCEL_RIDE] @STUDENT_ID, @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = -1, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CHECK_ID] @_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "professor_id", - Value = professor_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[COURSES_FOR_PROFESSOR] @professor_id, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Size = 25, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "RIDEID", - Size = 10, - Value = RIDEID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ISDRIVER", - Value = ISDRIVER ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.TinyInt, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_BOOKING] @ID, @RIDEID, @ISDRIVER", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "name", - Size = -1, - Value = name ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "group", - Value = group ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "roomImage", - Size = -1, - Value = roomImage ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CREATE_MESSAGE_ROOM] @name, @group, @roomImage", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LOCATION", - Size = 50, - Value = LOCATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESCRIPTION", - Size = 50, - Value = DESCRIPTION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MON_CDE", - Size = 10, - Value = MON_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TUE_CDE", - Size = 10, - Value = TUE_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "WED_CDE", - Size = 10, - Value = WED_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "THU_CDE", - Size = 10, - Value = THU_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FRI_CDE", - Size = 10, - Value = FRI_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SAT_CDE", - Size = 10, - Value = SAT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SUN_CDE", - Size = 10, - Value = SUN_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "IS_ALLDAY", - Value = IS_ALLDAY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "BEGINTIME", - Scale = 7, - Value = BEGINTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Scale = 7, - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDEID", - Size = 10, - Value = RIDEID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESTINATION", - Size = 72, - Value = DESTINATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MEETINGPOINT", - Size = 72, - Value = MEETINGPOINT ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "STARTTIME", - Value = STARTTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "CAPACITY", - Value = CAPACITY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOTES", - Size = 500, - Value = NOTES ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CANCELED", - Value = CANCELED ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.TinyInt, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_RIDE] @RIDEID, @DESTINATION, @MEETINGPOINT, @STARTTIME, @ENDTIME, @CAPACITY, @NOTES, @CANCELED", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FACEBOOK", - Size = -1, - Value = FACEBOOK ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TWITTER", - Size = -1, - Value = TWITTER ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "INSTAGRAM", - Size = -1, - Value = INSTAGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LINKEDIN", - Size = -1, - Value = LINKEDIN ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "HANDSHAKE", - Size = -1, - Value = HANDSHAKE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_SOCIAL_LINKS] @USERNAME, @FACEBOOK, @TWITTER, @INSTAGRAM, @LINKEDIN, @HANDSHAKE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CURRENT_SESSION]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APARTMENT_CHOICE] @APPLICATION_ID, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APP_ID", - Value = APP_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICATION] @APP_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ID", - Size = 25, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKING] @RIDE_ID, @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKINGS] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_Num", - Size = 25, - Value = ID_Num ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_CLOCK_IN] @ID_Num", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_MYSCHEDULE] @EVENTID, @GORDONID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SNID", - Value = SNID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_NEWS_ITEM] @SNID, @Username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_RIDE] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "connection_id", - Size = 72, - Value = connection_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_CONNECTION_ID] @connection_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Size = -1, - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_ROOM] @room_id, @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DINING_INFO_BY_STUDENT_ID] @STUDENT_ID, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[DISTINCT_ACT_TYPE] @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GET_FINALIZATION_STATUS] @UserID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FeatureID", - Size = 255, - Value = FeatureID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETDEMOGRAPHIC] @UserID, @FeatureID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETHOLDSBYID] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED] @UserID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "PhoneUnformatted", - Size = 255, - Value = PhoneUnformatted ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DoNotPublish", - Value = DoNotPublish ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "NoneProvided", - Value = NoneProvided ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATECELLPHONE] @UserID, @PhoneUnformatted, @DoNotPublish, @NoneProvided", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "RaceValue", - Size = 50, - Value = RaceValue ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "EthnicityValue", - Value = EthnicityValue ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATEDEMOGRAPHIC] @UserID, @RaceValue, @EthnicityValue", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_HALLS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_NAME_AND_DATE] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "STUDENT_USERNAME", - Size = 50, - Value = STUDENT_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS] @SESS_CDE, @STUDENT_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_DETAILS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS_BY_ID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APP_IDS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APPLICATIONS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_EDITOR_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID] @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id_list", - Size = -1, - Value = user_id_list ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST] @user_id_list", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_MESSAGES_BY_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_ROOMS_BY_ID] @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_USERS_BY_ROOM_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Size = 10, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_BIRTH_DATE_BY_ID] @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_HEALTH_CHECK_QUESTION]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_LATEST_ROOM]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ROOM_BY_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "message_id", - Size = -1, - Value = message_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_SINGLE_MESSAGE_BY_ID] @room_id, @message_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RANKING", - Value = RANKING ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APARTMENT_CHOICE] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "APRT_PROGRAM", - Size = 50, - Value = APRT_PROGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICATION] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Question", - Size = -1, - Value = Question ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "YesPrompt", - Size = -1, - Value = YesPrompt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "NoPrompt", - Size = -1, - Value = NoPrompt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_HEALTH_QUESTION] @Question, @YesPrompt, @NoPrompt", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = 72, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "room_id", - Size = 72, - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "text", - Size = -1, - Value = text ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.NVarChar, - }, - new SqlParameter - { - ParameterName = "createdAt", - Value = createdAt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "image", - Size = -1, - Value = image ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "video", - Size = -1, - Value = video ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "audio", - Size = -1, - Value = audio ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "system", - Value = system ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "sent", - Value = sent ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "received", - Value = received ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "pending", - Value = pending ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_MESSAGE] @_id, @room_id, @text, @createdAt, @user_id, @image, @video, @audio, @system, @sent, @received, @pending", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CategoryID", - Value = CategoryID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Subject", - Size = 60, - Value = Subject ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Body", - Size = 6000, - Value = Body ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSERT_NEWS_ITEM] @Username, @CategoryID, @Subject, @Body", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "State", - Value = State ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM, @State", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = 72, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "name", - Size = 72, - Value = name ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "avatar", - Size = -1, - Value = avatar ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER] @_id, @name, @avatar", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "connection_id", - Size = 72, - Value = connection_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_CONNECTION_ID] @user_id, @connection_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "_id", - Size = -1, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_ROOMS] @user_id, @_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "instructor_id", - Value = instructor_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE] @instructor_id, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MYSCHEDULE_BY_ID] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_CATEGORIES]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NEW]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NOT_EXPIRED]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_PERSONAL_UNAPPROVED] @Username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[PHOTO_INFO_PER_USER_NAME] @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "REQUEST_ID", - Value = REQUEST_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUEST_PER_REQUEST_ID] @REQUEST_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 10, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[RIDERS_BY_RIDE_ID] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "id_num", - Value = id_num ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE] @id_num, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_JOBS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SUP_ID", - Value = SUP_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISOR_PER_SUP_ID] @SUP_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RANKING", - Value = RANKING ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APARTMENT_CHOICES] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "APRT_PROGRAM", - Size = 50, - Value = APRT_PROGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "NEW_EDITOR_USERNAME", - Size = 50, - Value = NEW_EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_EDITOR] @APPLICATION_ID, @EDITOR_USERNAME, @NOW, @NEW_EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ACT_INFO]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "PhoneUnformatted", - Size = 255, - Value = PhoneUnformatted ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPDATE_CELL_PHONE] @UserID, @PhoneUnformatted", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 200, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_DESCRIPTION] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "StudentID", - Value = StudentID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "ContactNum", - Value = ContactNum ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "ContactLastName", - Size = 30, - Value = ContactLastName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ContactFirstName", - Size = 15, - Value = ContactFirstName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ContactHomePhone", - Size = 20, - Value = ContactHomePhone ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "ContactMobilePhone", - Size = 20, - Value = ContactMobilePhone ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "ContactRelationship", - Size = 60, - Value = ContactRelationship ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Notes", - Size = 100, - Value = Notes ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 513, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "JobName", - Size = 30, - Value = JobName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_EMRGCONTACT] @StudentID, @ContactNum, @ContactLastName, @ContactFirstName, @ContactHomePhone, @ContactMobilePhone, @ContactRelationship, @Notes, @Username, @JobName", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ResponderEmail", - Size = 256, - Value = ResponderEmail ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[Update_Health_Status_Upon_Form_Completion] @ResponderEmail", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LOCATION", - Size = 50, - Value = LOCATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESCRIPTION", - Size = 50, - Value = DESCRIPTION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MON_CDE", - Size = 10, - Value = MON_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TUE_CDE", - Size = 10, - Value = TUE_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "WED_CDE", - Size = 10, - Value = WED_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "THU_CDE", - Size = 10, - Value = THU_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FRI_CDE", - Size = 10, - Value = FRI_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SAT_CDE", - Size = 10, - Value = SAT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SUN_CDE", - Size = 10, - Value = SUN_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "IS_ALLDAY", - Value = IS_ALLDAY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "BEGINTIME", - Scale = 7, - Value = BEGINTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Scale = 7, - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SNID", - Value = SNID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CategoryID", - Value = CategoryID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Subject", - Size = 60, - Value = Subject ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Body", - Size = 6000, - Value = Body ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Image", - Size = 100, - Value = Image ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_NEWS_ITEM] @SNID, @Username, @CategoryID, @Subject, @Body, @Image", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHONE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "FILE_PATH", - Size = 255, - Value = FILE_PATH ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FILE_NAME", - Size = 255, - Value = FILE_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHOTO_PATH] @ID, @FILE_PATH, @FILE_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ROOM] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SCHEDULE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACCOUNT_ID", - Value = ACCOUNT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SHOW_PIC] @ACCOUNT_ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_TIMESTAMP] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "DRIVERID", - Size = 25, - Value = DRIVERID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VALID_DRIVES_BY_ID] @DRIVERID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VICTORY_PROMISE_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - } -} +// This file has been auto generated by EF Core Power Tools. +using Gordon360.Models.CCT; +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public partial class CCTContext + { + private ICCTContextProcedures _procedures; + + public virtual ICCTContextProcedures Procedures + { + get + { + if (_procedures is null) _procedures = new CCTContextProcedures(this); + return _procedures; + } + set + { + _procedures = value; + } + } + + public ICCTContextProcedures GetProcedures() + { + return Procedures; + } + + protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) + { + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + } + } + + public partial class CCTContextProcedures : ICCTContextProcedures + { + private readonly CCTContext _context; + + public CCTContextProcedures(CCTContext context) + { + _context = context; + } + + public virtual async Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ACTIVE_CLUBS_PER_SESS_ID] @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_SEPARATE] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_MEMBERSHIPS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_REQUESTS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_SUPERVISORS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "username", + Size = 64, + Value = username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CAN_READ_STUDENT_SCHEDULES] @username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CANCEL_RIDE] @STUDENT_ID, @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = -1, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CHECK_ID] @_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "professor_id", + Value = professor_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[COURSES_FOR_PROFESSOR] @professor_id, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Size = 25, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "RIDEID", + Size = 10, + Value = RIDEID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ISDRIVER", + Value = ISDRIVER ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.TinyInt, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_BOOKING] @ID, @RIDEID, @ISDRIVER", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "name", + Size = -1, + Value = name ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "group", + Value = group ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "roomImage", + Size = -1, + Value = roomImage ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CREATE_MESSAGE_ROOM] @name, @group, @roomImage", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LOCATION", + Size = 50, + Value = LOCATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESCRIPTION", + Size = 50, + Value = DESCRIPTION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MON_CDE", + Size = 10, + Value = MON_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TUE_CDE", + Size = 10, + Value = TUE_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "WED_CDE", + Size = 10, + Value = WED_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "THU_CDE", + Size = 10, + Value = THU_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FRI_CDE", + Size = 10, + Value = FRI_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SAT_CDE", + Size = 10, + Value = SAT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SUN_CDE", + Size = 10, + Value = SUN_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "IS_ALLDAY", + Value = IS_ALLDAY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "BEGINTIME", + Scale = 7, + Value = BEGINTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Scale = 7, + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDEID", + Size = 10, + Value = RIDEID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESTINATION", + Size = 72, + Value = DESTINATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MEETINGPOINT", + Size = 72, + Value = MEETINGPOINT ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "STARTTIME", + Value = STARTTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "CAPACITY", + Value = CAPACITY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOTES", + Size = 500, + Value = NOTES ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CANCELED", + Value = CANCELED ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.TinyInt, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_RIDE] @RIDEID, @DESTINATION, @MEETINGPOINT, @STARTTIME, @ENDTIME, @CAPACITY, @NOTES, @CANCELED", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FACEBOOK", + Size = -1, + Value = FACEBOOK ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TWITTER", + Size = -1, + Value = TWITTER ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "INSTAGRAM", + Size = -1, + Value = INSTAGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LINKEDIN", + Size = -1, + Value = LINKEDIN ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "HANDSHAKE", + Size = -1, + Value = HANDSHAKE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_SOCIAL_LINKS] @USERNAME, @FACEBOOK, @TWITTER, @INSTAGRAM, @LINKEDIN, @HANDSHAKE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CURRENT_SESSION]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APARTMENT_CHOICE] @APPLICATION_ID, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APP_ID", + Value = APP_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICATION] @APP_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ID", + Size = 25, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKING] @RIDE_ID, @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKINGS] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_Num", + Size = 25, + Value = ID_Num ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_CLOCK_IN] @ID_Num", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_MYSCHEDULE] @EVENTID, @GORDONID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SNID", + Value = SNID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_NEWS_ITEM] @SNID, @Username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_RIDE] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "connection_id", + Size = 72, + Value = connection_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_CONNECTION_ID] @connection_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Size = -1, + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_ROOM] @room_id, @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DINING_INFO_BY_STUDENT_ID] @STUDENT_ID, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[DISTINCT_ACT_TYPE] @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GET_FINALIZATION_STATUS] @UserID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FeatureID", + Size = 255, + Value = FeatureID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETDEMOGRAPHIC] @UserID, @FeatureID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETHOLDSBYID] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED] @UserID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "PhoneUnformatted", + Size = 255, + Value = PhoneUnformatted ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DoNotPublish", + Value = DoNotPublish ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "NoneProvided", + Value = NoneProvided ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATECELLPHONE] @UserID, @PhoneUnformatted, @DoNotPublish, @NoneProvided", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "RaceValue", + Size = 50, + Value = RaceValue ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "EthnicityValue", + Value = EthnicityValue ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATEDEMOGRAPHIC] @UserID, @RaceValue, @EthnicityValue", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_HALLS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_NAME_AND_DATE] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "STUDENT_USERNAME", + Size = 50, + Value = STUDENT_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS] @SESS_CDE, @STUDENT_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_DETAILS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS_BY_ID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APP_IDS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APPLICATIONS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_EDITOR_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID] @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id_list", + Size = -1, + Value = user_id_list ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST] @user_id_list", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_MESSAGES_BY_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_ROOMS_BY_ID] @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_USERS_BY_ROOM_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Size = 10, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_BIRTH_DATE_BY_ID] @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_HEALTH_CHECK_QUESTION]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_LATEST_ROOM]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ROOM_BY_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "message_id", + Size = -1, + Value = message_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_SINGLE_MESSAGE_BY_ID] @room_id, @message_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RANKING", + Value = RANKING ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APARTMENT_CHOICE] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "APRT_PROGRAM", + Size = 50, + Value = APRT_PROGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICATION] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Question", + Size = -1, + Value = Question ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "YesPrompt", + Size = -1, + Value = YesPrompt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "NoPrompt", + Size = -1, + Value = NoPrompt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_HEALTH_QUESTION] @Question, @YesPrompt, @NoPrompt", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = 72, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "room_id", + Size = 72, + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "text", + Size = -1, + Value = text ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.NVarChar, + }, + new SqlParameter + { + ParameterName = "createdAt", + Value = createdAt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "image", + Size = -1, + Value = image ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "video", + Size = -1, + Value = video ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "audio", + Size = -1, + Value = audio ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "system", + Value = system ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "sent", + Value = sent ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "received", + Value = received ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "pending", + Value = pending ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_MESSAGE] @_id, @room_id, @text, @createdAt, @user_id, @image, @video, @audio, @system, @sent, @received, @pending", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CategoryID", + Value = CategoryID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Subject", + Size = 60, + Value = Subject ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Body", + Size = 6000, + Value = Body ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSERT_NEWS_ITEM] @Username, @CategoryID, @Subject, @Body", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "State", + Value = State ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM, @State", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = 72, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "name", + Size = 72, + Value = name ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "avatar", + Size = -1, + Value = avatar ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER] @_id, @name, @avatar", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "connection_id", + Size = 72, + Value = connection_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_CONNECTION_ID] @user_id, @connection_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "_id", + Size = -1, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_ROOMS] @user_id, @_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "instructor_id", + Value = instructor_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE] @instructor_id, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MYSCHEDULE_BY_ID] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_CATEGORIES]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NEW]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NOT_EXPIRED]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_PERSONAL_UNAPPROVED] @Username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[PHOTO_INFO_PER_USER_NAME] @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "REQUEST_ID", + Value = REQUEST_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUEST_PER_REQUEST_ID] @REQUEST_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 10, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[RIDERS_BY_RIDE_ID] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "id_num", + Value = id_num ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE] @id_num, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_JOBS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SUP_ID", + Value = SUP_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISOR_PER_SUP_ID] @SUP_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RANKING", + Value = RANKING ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APARTMENT_CHOICES] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "APRT_PROGRAM", + Size = 50, + Value = APRT_PROGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "NEW_EDITOR_USERNAME", + Size = 50, + Value = NEW_EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_EDITOR] @APPLICATION_ID, @EDITOR_USERNAME, @NOW, @NEW_EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ACT_INFO]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "PhoneUnformatted", + Size = 255, + Value = PhoneUnformatted ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPDATE_CELL_PHONE] @UserID, @PhoneUnformatted", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 200, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_DESCRIPTION] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "StudentID", + Value = StudentID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "ContactNum", + Value = ContactNum ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "ContactLastName", + Size = 30, + Value = ContactLastName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ContactFirstName", + Size = 15, + Value = ContactFirstName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ContactHomePhone", + Size = 20, + Value = ContactHomePhone ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "ContactMobilePhone", + Size = 20, + Value = ContactMobilePhone ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "ContactRelationship", + Size = 60, + Value = ContactRelationship ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Notes", + Size = 100, + Value = Notes ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 513, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "JobName", + Size = 30, + Value = JobName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_EMRGCONTACT] @StudentID, @ContactNum, @ContactLastName, @ContactFirstName, @ContactHomePhone, @ContactMobilePhone, @ContactRelationship, @Notes, @Username, @JobName", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ResponderEmail", + Size = 256, + Value = ResponderEmail ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[Update_Health_Status_Upon_Form_Completion] @ResponderEmail", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LOCATION", + Size = 50, + Value = LOCATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESCRIPTION", + Size = 50, + Value = DESCRIPTION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MON_CDE", + Size = 10, + Value = MON_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TUE_CDE", + Size = 10, + Value = TUE_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "WED_CDE", + Size = 10, + Value = WED_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "THU_CDE", + Size = 10, + Value = THU_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FRI_CDE", + Size = 10, + Value = FRI_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SAT_CDE", + Size = 10, + Value = SAT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SUN_CDE", + Size = 10, + Value = SUN_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "IS_ALLDAY", + Value = IS_ALLDAY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "BEGINTIME", + Scale = 7, + Value = BEGINTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Scale = 7, + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SNID", + Value = SNID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CategoryID", + Value = CategoryID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Subject", + Size = 60, + Value = Subject ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Body", + Size = 6000, + Value = Body ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Image", + Size = 100, + Value = Image ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_NEWS_ITEM] @SNID, @Username, @CategoryID, @Subject, @Body, @Image", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHONE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "FILE_PATH", + Size = 255, + Value = FILE_PATH ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FILE_NAME", + Size = 255, + Value = FILE_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHOTO_PATH] @ID, @FILE_PATH, @FILE_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ROOM] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SCHEDULE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACCOUNT_ID", + Value = ACCOUNT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SHOW_PIC] @ACCOUNT_ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_TIMESTAMP] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "DRIVERID", + Size = 25, + Value = DRIVERID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VALID_DRIVES_BY_ID] @DRIVERID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VICTORY_PROMISE_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + } +} diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index edaf41b6c..e7095d686 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,68 +1,68 @@ -// This file has been auto generated by EF Core Power Tools. -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data.Common; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public static class DbContextExtensions - { - public static async Task> SqlQueryAsync(this DbContext db, string sql, object[] parameters = null, CancellationToken cancellationToken = default) where T : class - { - if (parameters is null) - { - parameters = new object[] { }; - } - - if (typeof(T).GetProperties().Any()) - { - return await db.Set().FromSqlRaw(sql, parameters).ToListAsync(cancellationToken); - } - else - { - await db.Database.ExecuteSqlRawAsync(sql, parameters, cancellationToken); - return default; - } - } - - public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) - { - SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; - await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); - return (int)result.Value; - } - } - - public class OutputParameter - { - private bool _valueSet = false; - - public TValue _value; - - public TValue Value - { - get - { - if (!_valueSet) - throw new InvalidOperationException("Value not set."); - - return _value; - } - } - - internal void SetValue(object value) - { - _valueSet = true; - - _value = null == value || Convert.IsDBNull(value) ? default(TValue) : (TValue)value; - } - } -} +// This file has been auto generated by EF Core Power Tools. +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Common; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public static class DbContextExtensions + { + public static async Task> SqlQueryAsync(this DbContext db, string sql, object[] parameters = null, CancellationToken cancellationToken = default) where T : class + { + if (parameters is null) + { + parameters = new object[] { }; + } + + if (typeof(T).GetProperties().Any()) + { + return await db.Set().FromSqlRaw(sql, parameters).ToListAsync(cancellationToken); + } + else + { + await db.Database.ExecuteSqlRawAsync(sql, parameters, cancellationToken); + return default; + } + } + + public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) + { + SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; + await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); + return (int)result.Value; + } + } + + public class OutputParameter + { + private bool _valueSet = false; + + public TValue _value; + + public TValue Value + { + get + { + if (!_valueSet) + throw new InvalidOperationException("Value not set."); + + return _value; + } + } + + internal void SetValue(object value) + { + _valueSet = true; + + _value = null == value || Convert.IsDBNull(value) ? default(TValue) : (TValue)value; + } + } +} diff --git a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs index 71317783e..86af0ecca 100644 --- a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs @@ -1,133 +1,133 @@ -// This file has been auto generated by EF Core Power Tools. -using Gordon360.Models.CCT; -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public partial interface ICCTContextProcedures - { - Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - } -} +// This file has been auto generated by EF Core Power Tools. +using Gordon360.Models.CCT; +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public partial interface ICCTContextProcedures + { + Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + } +} diff --git a/Gordon360/Models/CCT/Context/efpt.CCT.config.json b/Gordon360/Models/CCT/Context/efpt.CCT.config.json index 0ac76dab1..49033b5a2 100644 --- a/Gordon360/Models/CCT/Context/efpt.CCT.config.json +++ b/Gordon360/Models/CCT/Context/efpt.CCT.config.json @@ -1,737 +1,741 @@ -{ - "CodeGenerationMode": 2, - "ContextClassName": "CCTContext", - "ContextNamespace": null, - "DefaultDacpacSchema": null, - "FilterSchemas": false, - "IncludeConnectionString": false, - "ModelNamespace": null, - "OutputContextPath": "Models\/CCT\/Context", - "OutputPath": "Models\/CCT", - "PreserveCasingWithRegex": true, - "ProjectRootNamespace": "Gordon360", - "Schemas": null, - "SelectedHandlebarsLanguage": 0, - "SelectedToBeGenerated": 0, - "Tables": [ - { - "Name": "[dbo].[ACT_INFO]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[ADMIN]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Clifton_Strengths]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Config]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[CUSTOM_PROFILE]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[ERROR_LOG]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Question]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Status]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Status_CTRL]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Admins]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Applicants]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Applications]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_HallChoices]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Halls]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Information_Change_Request]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[JNZB_ACTIVITIES]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[MEMBERSHIP]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Message_Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Messages]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[MYSCHEDULE]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[REQUEST]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Save_Bookings]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Save_Rides]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Schedule_Control]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Slider_Images]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[StudentNewsExpiration]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Timesheets_Clock_In_Out]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[User_Connection_Ids]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[User_Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Users]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[360_SLIDER]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ACCOUNT]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Alumni]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Birthdays]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Buildings]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ChapelEvent]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[CM_SESSION_MSTR]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Countries]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Choice_Desc]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Plan_Change_History]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Plan_Id_Mapping]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Mealplans]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Student_Meal_Choice]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[DiningInfo]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[EmergencyContact]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[FacStaff]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Graduation]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Internships_as_Involvements]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[JENZ_ACT_CLUB_DEF]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Mailboxes]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Majors]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[MembershipView]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[PART_DEF]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Police]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[RoomAssign]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[States]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Student]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ACTIVE_CLUBS_PER_SESS_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ADVISOR_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ADVISOR_SEPARATE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_BASIC_INFO]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_MEMBERSHIPS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_REQUESTS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_SUPERVISORS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CAN_READ_STUDENT_SCHEDULES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CANCEL_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CHECK_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[COURSES_FOR_PROFESSOR]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_BOOKING]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_MESSAGE_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_SOCIAL_LINKS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CURRENT_SESSION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APARTMENT_CHOICE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APPLICATION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_BOOKING]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_BOOKINGS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_CLOCK_IN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_USER_CONNECTION_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_USER_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DINING_INFO_BY_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DISTINCT_ACT_TYPE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GET_FINALIZATION_STATUS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GETDEMOGRAPHIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GETHOLDSBYID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_UPDATECELLPHONE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_UPDATEDEMOGRAPHIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APARTMENT_HALLS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPID_BY_NAME_AND_DATE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICANTS_BY_APPID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICANTS_DETAILS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICATIONS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICATIONS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_CURRENT_APP_IDS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_CURRENT_APPLICATIONS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_EDITOR_BY_APPID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_MESSAGES_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_ROOMS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_USERS_BY_ROOM_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_BIRTH_DATE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_HEALTH_CHECK_QUESTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_LATEST_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ROOM_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_SINGLE_MESSAGE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_TIMESHEETS_CLOCK_IN_OUT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APARTMENT_CHOICE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APPLICATION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_HEALTH_QUESTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_MESSAGE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER_CONNECTION_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER_ROOMS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[LEADER_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MEMBERSHIPS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MEMBERSHIPS_PER_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MYSCHEDULE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_CATEGORIES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_NEW]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_NOT_EXPIRED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_PERSONAL_UNAPPROVED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[PHOTO_INFO_PER_USER_NAME]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUEST_PER_REQUEST_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUESTS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUESTS_PER_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[RIDERS_BY_RIDE_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[STUDENT_JOBS_PER_ID_NUM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISOR_PER_SUP_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ID_NUM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPCOMING_RIDES_BY_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPCOMING_RIDES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APARTMENT_CHOICES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_EDITOR]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_ACT_INFO]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_CELL_PHONE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_DESCRIPTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_EMRGCONTACT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[Update_Health_Status_Upon_Form_Completion]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_PHONE_PRIVACY]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_PHOTO_PATH]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_SCHEDULE_PRIVACY]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_SHOW_PIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_TIMESTAMP]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[VALID_DRIVES_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[VICTORY_PROMISE_BY_STUDENT_ID]", - "ObjectType": 1 - } - ], - "UiHint": "SQLTrain1.CCT", - "UseBoolPropertiesWithoutDefaultSql": false, - "UseDatabaseNames": true, - "UseDbContextSplitting": false, - "UseFluentApiOnly": false, - "UseHandleBars": false, - "UseHierarchyId": false, - "UseInflector": false, - "UseLegacyPluralizer": false, - "UseManyToManyEntity": false, - "UseNoConstructor": false, - "UseNoDefaultConstructor": false, - "UseNoNavigations": false, - "UseNoObjectFilter": false, - "UseNodaTime": false, - "UseNullableReferences": false, - "UseSchemaFolders": false, - "UseSpatial": false, - "UseT4": false +{ + "CodeGenerationMode": 2, + "ContextClassName": "CCTContext", + "ContextNamespace": null, + "DefaultDacpacSchema": null, + "FilterSchemas": false, + "IncludeConnectionString": false, + "ModelNamespace": null, + "OutputContextPath": "Models\/CCT\/Context", + "OutputPath": "Models\/CCT", + "PreserveCasingWithRegex": true, + "ProjectRootNamespace": "Gordon360", + "Schemas": null, + "SelectedHandlebarsLanguage": 0, + "SelectedToBeGenerated": 0, + "Tables": [ + { + "Name": "[dbo].[ACT_INFO]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[ADMIN]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Clifton_Strengths]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Config]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[CUSTOM_PROFILE]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[ERROR_LOG]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Question]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Status]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Status_CTRL]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Admins]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Applicants]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Applications]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_HallChoices]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Halls]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Information_Change_Request]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[JNZB_ACTIVITIES]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[MEMBERSHIP]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Message_Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Messages]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[MYSCHEDULE]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[REQUEST]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Save_Bookings]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Save_Rides]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Schedule_Control]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Slider_Images]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[StudentNewsExpiration]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Timesheets_Clock_In_Out]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[User_Connection_Ids]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[User_Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Users]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[360_SLIDER]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ACCOUNT]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Alumni]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Birthdays]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Buildings]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ChapelEvent]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[CM_SESSION_MSTR]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Countries]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Choice_Desc]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Plan_Change_History]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Plan_Id_Mapping]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Mealplans]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Student_Meal_Choice]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[DiningInfo]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[EmergencyContact]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[FacStaff]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Graduation]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Internships_as_Involvements]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[InvolvementOffering]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[JENZ_ACT_CLUB_DEF]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Mailboxes]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Majors]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[MembershipView]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[PART_DEF]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Police]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[RoomAssign]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[States]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Student]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ACTIVE_CLUBS_PER_SESS_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ADVISOR_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ADVISOR_SEPARATE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_BASIC_INFO]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_MEMBERSHIPS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_REQUESTS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_SUPERVISORS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CAN_READ_STUDENT_SCHEDULES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CANCEL_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CHECK_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[COURSES_FOR_PROFESSOR]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_BOOKING]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_MESSAGE_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_SOCIAL_LINKS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CURRENT_SESSION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APARTMENT_CHOICE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APPLICATION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_BOOKING]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_BOOKINGS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_CLOCK_IN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_USER_CONNECTION_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_USER_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DINING_INFO_BY_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DISTINCT_ACT_TYPE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GET_FINALIZATION_STATUS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GETDEMOGRAPHIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GETHOLDSBYID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_UPDATECELLPHONE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_UPDATEDEMOGRAPHIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APARTMENT_HALLS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPID_BY_NAME_AND_DATE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICANTS_BY_APPID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICANTS_DETAILS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICATIONS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICATIONS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_CURRENT_APP_IDS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_CURRENT_APPLICATIONS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_EDITOR_BY_APPID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_MESSAGES_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_ROOMS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_USERS_BY_ROOM_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_BIRTH_DATE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_HEALTH_CHECK_QUESTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_LATEST_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ROOM_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_SINGLE_MESSAGE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_TIMESHEETS_CLOCK_IN_OUT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APARTMENT_CHOICE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APPLICATION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_HEALTH_QUESTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_MESSAGE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER_CONNECTION_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER_ROOMS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[LEADER_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MEMBERSHIPS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MEMBERSHIPS_PER_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MYSCHEDULE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_CATEGORIES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_NEW]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_NOT_EXPIRED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_PERSONAL_UNAPPROVED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[PHOTO_INFO_PER_USER_NAME]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUEST_PER_REQUEST_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUESTS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUESTS_PER_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[RIDERS_BY_RIDE_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[STUDENT_JOBS_PER_ID_NUM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISOR_PER_SUP_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISORS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISORS_PER_ID_NUM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPCOMING_RIDES_BY_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPCOMING_RIDES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APARTMENT_CHOICES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_EDITOR]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_ACT_INFO]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_CELL_PHONE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_DESCRIPTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_EMRGCONTACT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[Update_Health_Status_Upon_Form_Completion]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_PHONE_PRIVACY]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_PHOTO_PATH]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_SCHEDULE_PRIVACY]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_SHOW_PIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_TIMESTAMP]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[VALID_DRIVES_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[VICTORY_PROMISE_BY_STUDENT_ID]", + "ObjectType": 1 + } + ], + "UiHint": "SQLTrain1.CCT", + "UseBoolPropertiesWithoutDefaultSql": false, + "UseDatabaseNames": true, + "UseDbContextSplitting": false, + "UseFluentApiOnly": false, + "UseHandleBars": false, + "UseHierarchyId": false, + "UseInflector": false, + "UseLegacyPluralizer": false, + "UseManyToManyEntity": false, + "UseNoConstructor": false, + "UseNoDefaultConstructor": false, + "UseNoNavigations": false, + "UseNoObjectFilter": false, + "UseNodaTime": false, + "UseNullableReferences": false, + "UseSchemaFolders": false, + "UseSpatial": false, + "UseT4": false } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Countries.cs b/Gordon360/Models/CCT/Countries.cs index 4408ed953..050f8f9d9 100644 --- a/Gordon360/Models/CCT/Countries.cs +++ b/Gordon360/Models/CCT/Countries.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Countries - { - [Required] - [StringLength(31)] - [Unicode(false)] - public string CTY { get; set; } - [Required] - [StringLength(63)] - [Unicode(false)] - public string COUNTRY { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Countries + { + [Required] + [StringLength(31)] + [Unicode(false)] + public string CTY { get; set; } + [Required] + [StringLength(63)] + [Unicode(false)] + public string COUNTRY { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs b/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs index 157ee6e98..7ffbc1132 100644 --- a/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs +++ b/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class DISTINCT_ACT_TYPEResult - { - public string ACT_TYPE_DESC { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class DISTINCT_ACT_TYPEResult + { + public string ACT_TYPE_DESC { get; set; } + } +} diff --git a/Gordon360/Models/CCT/DiningInfo.cs b/Gordon360/Models/CCT/DiningInfo.cs index 5773b182f..0d6617691 100644 --- a/Gordon360/Models/CCT/DiningInfo.cs +++ b/Gordon360/Models/CCT/DiningInfo.cs @@ -1,34 +1,34 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class DiningInfo - { - public int StudentId { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SessionCode { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ChoiceDescription { get; set; } - [StringLength(150)] - [Unicode(false)] - public string PlanDescriptions { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string PlanId { get; set; } - [StringLength(10)] - [Unicode(false)] - public string PlanType { get; set; } - public int? InitialBalance { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class DiningInfo + { + public int StudentId { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ChoiceDescription { get; set; } + [StringLength(150)] + [Unicode(false)] + public string PlanDescriptions { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string PlanId { get; set; } + [StringLength(10)] + [Unicode(false)] + public string PlanType { get; set; } + public int? InitialBalance { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs b/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs index 33941b3f5..4ea2588b4 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Choice_Desc - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string Meal_Choice_Id { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Meal_Choice_Desc { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Choice_Desc + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string Meal_Choice_Id { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Meal_Choice_Desc { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs b/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs index 6f8a0714c..aa7f280af 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs @@ -1,33 +1,33 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Plan_Change_History - { - public int ID_NUM { get; set; } - [Unicode(false)] - public string OLD_PLAN { get; set; } - [StringLength(6)] - [Unicode(false)] - public string OLD_PLAN_ID { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OLD_PLAN_DESC { get; set; } - [Unicode(false)] - public string NEW_PLAN { get; set; } - [StringLength(6)] - [Unicode(false)] - public string NEW_PLAN_ID { get; set; } - [Unicode(false)] - public string SESS_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHANGE_DATE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Plan_Change_History + { + public int ID_NUM { get; set; } + [Unicode(false)] + public string OLD_PLAN { get; set; } + [StringLength(6)] + [Unicode(false)] + public string OLD_PLAN_ID { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OLD_PLAN_DESC { get; set; } + [Unicode(false)] + public string NEW_PLAN { get; set; } + [StringLength(6)] + [Unicode(false)] + public string NEW_PLAN_ID { get; set; } + [Unicode(false)] + public string SESS_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHANGE_DATE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs b/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs index 0ffaa836d..9a4c8ec17 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Plan_Id_Mapping - { - [Required] - [StringLength(6)] - [Unicode(false)] - public string meal_plan_id { get; set; } - [Required] - [StringLength(2)] - [Unicode(false)] - public string meal_choice_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Plan_Id_Mapping + { + [Required] + [StringLength(6)] + [Unicode(false)] + public string meal_plan_id { get; set; } + [Required] + [StringLength(2)] + [Unicode(false)] + public string meal_choice_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Mealplans.cs b/Gordon360/Models/CCT/Dining_Mealplans.cs index ae9327905..31f066582 100644 --- a/Gordon360/Models/CCT/Dining_Mealplans.cs +++ b/Gordon360/Models/CCT/Dining_Mealplans.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Mealplans - { - [StringLength(150)] - [Unicode(false)] - public string Meal_Plan_Description { get; set; } - [StringLength(10)] - [Unicode(false)] - public string Meal_Plan_Type { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string Meal_Plan_ID { get; set; } - public int? Meal_Plan_Initial_Balance { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Mealplans + { + [StringLength(150)] + [Unicode(false)] + public string Meal_Plan_Description { get; set; } + [StringLength(10)] + [Unicode(false)] + public string Meal_Plan_Type { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string Meal_Plan_ID { get; set; } + public int? Meal_Plan_Initial_Balance { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs b/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs index f2b78c446..238ab6bac 100644 --- a/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs +++ b/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Student_Meal_Choice - { - public int ID_NUM { get; set; } - [StringLength(2)] - [Unicode(false)] - public string MEAL_CHOICE_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Student_Meal_Choice + { + public int ID_NUM { get; set; } + [StringLength(2)] + [Unicode(false)] + public string MEAL_CHOICE_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs index f6328374c..c0dceb2ee 100644 --- a/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ERROR_LOG.cs b/Gordon360/Models/CCT/ERROR_LOG.cs index 614c5487d..7d05d6439 100644 --- a/Gordon360/Models/CCT/ERROR_LOG.cs +++ b/Gordon360/Models/CCT/ERROR_LOG.cs @@ -1,20 +1,20 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ERROR_LOG - { - [Key] - public int LOG_ID { get; set; } - [Column(TypeName = "datetime")] - public DateTime LOG_TIME { get; set; } - [Required] - public string LOG_MESSAGE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ERROR_LOG + { + [Key] + public int LOG_ID { get; set; } + [Column(TypeName = "datetime")] + public DateTime LOG_TIME { get; set; } + [Required] + public string LOG_MESSAGE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/EmergencyContact.cs b/Gordon360/Models/CCT/EmergencyContact.cs index 73749cee7..4f91fc778 100644 --- a/Gordon360/Models/CCT/EmergencyContact.cs +++ b/Gordon360/Models/CCT/EmergencyContact.cs @@ -1,108 +1,108 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class EmergencyContact - { - public int APPID { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int SEQ_NUM { get; set; } - public int ID_NUM { get; set; } - public int? ID_NUM_EMRG_CNTCT { get; set; } - [StringLength(3)] - [Unicode(false)] - public string prefix { get; set; } - [StringLength(30)] - [Unicode(false)] - public string lastname { get; set; } - [StringLength(15)] - [Unicode(false)] - public string firstname { get; set; } - [StringLength(15)] - [Unicode(false)] - public string middlename { get; set; } - [StringLength(3)] - [Unicode(false)] - public string suffix { get; set; } - [StringLength(20)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string HomeExt { get; set; } - [StringLength(20)] - [Unicode(false)] - public string WorkPhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string WorkExr { get; set; } - [StringLength(20)] - [Unicode(false)] - public string MobilePhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string MobileExt { get; set; } - [StringLength(100)] - [Unicode(false)] - public string notes { get; set; } - [StringLength(60)] - [Unicode(false)] - public string EmailAddress { get; set; } - [StringLength(4)] - [Unicode(false)] - public string HomeAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string WorkAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string MobileAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string EmailAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string AddressAddrCode { get; set; } - [StringLength(60)] - [Unicode(false)] - public string relationship { get; set; } - public int EMRG_PRIORITY { get; set; } - [StringLength(60)] - [Unicode(false)] - public string addr_1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string addr_2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string city { get; set; } - [StringLength(2)] - [Unicode(false)] - public string EMRG_STATE { get; set; } - [StringLength(12)] - [Unicode(false)] - public string zip { get; set; } - [StringLength(3)] - [Unicode(false)] - public string country { get; set; } - [Required] - public byte[] ApprowVersion { get; set; } - [StringLength(513)] - [Unicode(false)] - public string UserName { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JobName { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JobTime { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class EmergencyContact + { + public int APPID { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int SEQ_NUM { get; set; } + public int ID_NUM { get; set; } + public int? ID_NUM_EMRG_CNTCT { get; set; } + [StringLength(3)] + [Unicode(false)] + public string prefix { get; set; } + [StringLength(30)] + [Unicode(false)] + public string lastname { get; set; } + [StringLength(15)] + [Unicode(false)] + public string firstname { get; set; } + [StringLength(15)] + [Unicode(false)] + public string middlename { get; set; } + [StringLength(3)] + [Unicode(false)] + public string suffix { get; set; } + [StringLength(20)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string HomeExt { get; set; } + [StringLength(20)] + [Unicode(false)] + public string WorkPhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string WorkExr { get; set; } + [StringLength(20)] + [Unicode(false)] + public string MobilePhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string MobileExt { get; set; } + [StringLength(100)] + [Unicode(false)] + public string notes { get; set; } + [StringLength(60)] + [Unicode(false)] + public string EmailAddress { get; set; } + [StringLength(4)] + [Unicode(false)] + public string HomeAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string WorkAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string MobileAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string EmailAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string AddressAddrCode { get; set; } + [StringLength(60)] + [Unicode(false)] + public string relationship { get; set; } + public int EMRG_PRIORITY { get; set; } + [StringLength(60)] + [Unicode(false)] + public string addr_1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string addr_2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string city { get; set; } + [StringLength(2)] + [Unicode(false)] + public string EMRG_STATE { get; set; } + [StringLength(12)] + [Unicode(false)] + public string zip { get; set; } + [StringLength(3)] + [Unicode(false)] + public string country { get; set; } + [Required] + public byte[] ApprowVersion { get; set; } + [StringLength(513)] + [Unicode(false)] + public string UserName { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JobName { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JobTime { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs b/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs index 07e4180f7..d528e6485 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GETDEMOGRAPHICResult - { - public int Value { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GETDEMOGRAPHICResult + { + public int Value { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs b/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs index 9c5c6e525..be539e0a8 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GETHOLDSBYIDResult - { - public bool? FinancialHold { get; set; } - public bool? HighSchoolHold { get; set; } - public bool? MedicalHold { get; set; } - public bool? MajorHold { get; set; } - public bool? RegistrarHold { get; set; } - public bool? LaVidaHold { get; set; } - public bool? MustRegisterForClasses { get; set; } - public int NewStudent { get; set; } - public string FinancialHoldText { get; set; } - public string MeetingDate { get; set; } - public string MeetingLocations { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GETHOLDSBYIDResult + { + public bool? FinancialHold { get; set; } + public bool? HighSchoolHold { get; set; } + public bool? MedicalHold { get; set; } + public bool? MajorHold { get; set; } + public bool? RegistrarHold { get; set; } + public bool? LaVidaHold { get; set; } + public bool? MustRegisterForClasses { get; set; } + public int NewStudent { get; set; } + public string FinancialHoldText { get; set; } + public string MeetingDate { get; set; } + public string MeetingLocations { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs b/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs index fd45b34d7..1cd269ad0 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs @@ -1,20 +1,20 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GET_FINALIZATION_STATUSResult - { - public string UserID { get; set; } - public string Period { get; set; } - public bool FinalizationCompleted { get; set; } - public string RootQuery { get; set; } - public string BypassApprover { get; set; } - public DateTime? DateFinalized { get; set; } - public string IgnoreHoldsApprover { get; set; } - public DateTime DateInserted { get; set; } - public DateTime DateUpdated { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GET_FINALIZATION_STATUSResult + { + public string UserID { get; set; } + public string Period { get; set; } + public bool FinalizationCompleted { get; set; } + public string RootQuery { get; set; } + public string BypassApprover { get; set; } + public DateTime? DateFinalized { get; set; } + public string IgnoreHoldsApprover { get; set; } + public DateTime DateInserted { get; set; } + public DateTime DateUpdated { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs b/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs index 908fe2387..79d68e8c6 100644 --- a/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult - { - public string UserID { get; set; } - public string Period { get; set; } - public bool FinalizationCompleted { get; set; } - public string RootQuery { get; set; } - public string BypassApprover { get; set; } - public DateTime? DateFinalized { get; set; } - public string IgnoreHoldsApprover { get; set; } - public DateTime DateInserted { get; set; } - public DateTime DateUpdated { get; set; } - public string HeadcountsAsOfDateFinalized { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult + { + public string UserID { get; set; } + public string Period { get; set; } + public bool FinalizationCompleted { get; set; } + public string RootQuery { get; set; } + public string BypassApprover { get; set; } + public DateTime? DateFinalized { get; set; } + public string IgnoreHoldsApprover { get; set; } + public DateTime DateInserted { get; set; } + public DateTime DateUpdated { get; set; } + public string HeadcountsAsOfDateFinalized { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs b/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs index 7ad048383..ed8e6fde3 100644 --- a/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_UPDATECELLPHONEResult - { - public bool? Success { get; set; } - public string Message { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_UPDATECELLPHONEResult + { + public bool? Success { get; set; } + public string Message { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs b/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs index dbc3ad7ee..c85f4bef9 100644 --- a/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_UPDATEDEMOGRAPHICResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_UPDATEDEMOGRAPHICResult + { + } +} diff --git a/Gordon360/Models/CCT/FacStaff.cs b/Gordon360/Models/CCT/FacStaff.cs index db604258c..5317d0ff6 100644 --- a/Gordon360/Models/CCT/FacStaff.cs +++ b/Gordon360/Models/CCT/FacStaff.cs @@ -1,128 +1,128 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class FacStaff - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(20)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(20)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(25)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Nickname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string OnCampusDepartment { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusBuilding { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusRoom { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusPhone { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusPrivatePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(30)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(10)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(15)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HomeFax { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string KeepPrivate { get; set; } - [StringLength(100)] - [Unicode(false)] - public string JobTitle { get; set; } - [StringLength(20)] - [Unicode(false)] - public string SpouseName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Dept { get; set; } - [StringLength(14)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Email { get; set; } - public int? ActiveAccount { get; set; } - [StringLength(7)] - [Unicode(false)] - public string Type { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - [StringLength(75)] - [Unicode(false)] - public string office_hours { get; set; } - public int? preferred_photo { get; set; } - public int? show_pic { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BuildingDescription { get; set; } - [StringLength(63)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - [StringLength(100)] - [Unicode(false)] - public string Mail_Description { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class FacStaff + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(20)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(20)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(25)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Nickname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string OnCampusDepartment { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusBuilding { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusRoom { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusPhone { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusPrivatePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(30)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(10)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(15)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HomeFax { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string KeepPrivate { get; set; } + [StringLength(100)] + [Unicode(false)] + public string JobTitle { get; set; } + [StringLength(20)] + [Unicode(false)] + public string SpouseName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Dept { get; set; } + [StringLength(14)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Email { get; set; } + public int? ActiveAccount { get; set; } + [StringLength(7)] + [Unicode(false)] + public string Type { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + [StringLength(75)] + [Unicode(false)] + public string office_hours { get; set; } + public int? preferred_photo { get; set; } + public int? show_pic { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BuildingDescription { get; set; } + [StringLength(63)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + [StringLength(100)] + [Unicode(false)] + public string Mail_Description { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/GET_AA_ADMINResult.cs b/Gordon360/Models/CCT/GET_AA_ADMINResult.cs index a40683971..2aaac343e 100644 --- a/Gordon360/Models/CCT/GET_AA_ADMINResult.cs +++ b/Gordon360/Models/CCT/GET_AA_ADMINResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_ADMINResult - { - public string AdminID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_ADMINResult + { + public string AdminID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs b/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs index 3c2df4cbf..76189e0af 100644 --- a/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APARTMENT_CHOICES_BY_APP_IDResult - { - public int HousingAppID { get; set; } - public int Ranking { get; set; } - public string HallName { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APARTMENT_CHOICES_BY_APP_IDResult + { + public int HousingAppID { get; set; } + public int Ranking { get; set; } + public string HallName { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs b/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs index f8584f055..2ccf8a079 100644 --- a/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APARTMENT_HALLSResult - { - public string Name { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APARTMENT_HALLSResult + { + public string Name { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs b/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs index 4b12c3fec..234fcd69d 100644 --- a/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPID_BY_NAME_AND_DATEResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPID_BY_NAME_AND_DATEResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs b/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs index 46178cd32..e6e38975e 100644 --- a/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPID_BY_STU_ID_AND_SESSResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPID_BY_STU_ID_AND_SESSResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs index 073076dc1..88c1f4968 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs @@ -1,16 +1,16 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICANTS_BY_APPIDResult - { - public int HousingAppID { get; set; } - public string Username { get; set; } - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - public string SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICANTS_BY_APPIDResult + { + public int HousingAppID { get; set; } + public string Username { get; set; } + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + public string SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs index d8a35356c..6796ebc92 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs @@ -1,19 +1,19 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICANTS_DETAILSResult - { - public int HousingAppID { get; set; } - public string EditorUsername { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string Username { get; set; } - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - public string SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICANTS_DETAILSResult + { + public int HousingAppID { get; set; } + public string EditorUsername { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string Username { get; set; } + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + public string SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs index 612ba9a8b..7b50ae7ed 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICATIONSResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICATIONSResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs index f60fb98cb..63b8bb100 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICATIONS_BY_IDResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICATIONS_BY_IDResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs b/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs index 9cdff6d5f..21bc5d4fb 100644 --- a/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_CURRENT_APPLICATIONSResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_CURRENT_APPLICATIONSResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs b/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs index b87e61ce2..6d899594d 100644 --- a/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_CURRENT_APP_IDSResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_CURRENT_APP_IDSResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs b/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs index eb3cc4cb6..475d6a620 100644 --- a/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_EDITOR_BY_APPIDResult - { - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_EDITOR_BY_APPIDResult + { + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs index 531a14686..7a4a6c5c4 100644 --- a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_CONNECTION_IDS_BY_IDResult - { - public string connection_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_CONNECTION_IDS_BY_IDResult + { + public string connection_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs index e348f0c5c..899ad7c13 100644 --- a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_CONNECTION_IDS_BY_ID_LISTResult - { - public string connection_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_CONNECTION_IDS_BY_ID_LISTResult + { + public string connection_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs index a9584e92d..a34da8e6c 100644 --- a/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_MESSAGES_BY_IDResult - { - public string message_id { get; set; } - public string text { get; set; } - public DateTime createdAt { get; set; } - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_MESSAGES_BY_IDResult + { + public string message_id { get; set; } + public string text { get; set; } + public DateTime createdAt { get; set; } + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs index b6f0c0d0c..1c28c8ca2 100644 --- a/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_ROOMS_BY_IDResult - { - public string room_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_ROOMS_BY_IDResult + { + public string room_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs index 5512e1b4b..69df0edfe 100644 --- a/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_USERS_BY_ROOM_IDResult - { - public string user_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_USERS_BY_ROOM_IDResult + { + public string user_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs b/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs index 34756f463..306cb29cd 100644 --- a/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_BIRTH_DATE_BY_IDResult - { - public DateTime? Birth_Date { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_BIRTH_DATE_BY_IDResult + { + public DateTime? Birth_Date { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs b/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs index 3f38826dd..d354f439c 100644 --- a/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs +++ b/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_HEALTH_CHECK_QUESTIONResult - { - public string question { get; set; } - public string yesPrompt { get; set; } - public string noPrompt { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_HEALTH_CHECK_QUESTIONResult + { + public string question { get; set; } + public string yesPrompt { get; set; } + public string noPrompt { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs b/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs index 7fc19a968..284fa3502 100644 --- a/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs +++ b/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_LATEST_ROOMResult - { - public int room_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_LATEST_ROOMResult + { + public int room_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs index 2b0fd0069..c8cab9c79 100644 --- a/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ROOM_BY_IDResult - { - public int room_id { get; set; } - public string name { get; set; } - public bool group { get; set; } - public DateTime createdAt { get; set; } - public DateTime lastupdated { get; set; } - public byte[] roomImage { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ROOM_BY_IDResult + { + public int room_id { get; set; } + public string name { get; set; } + public bool group { get; set; } + public DateTime createdAt { get; set; } + public DateTime lastupdated { get; set; } + public byte[] roomImage { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs b/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs index 56273ce45..5cd6e5100 100644 --- a/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_SINGLE_MESSAGE_BY_IDResult - { - public string message_id { get; set; } - public string text { get; set; } - public DateTime createdAt { get; set; } - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_SINGLE_MESSAGE_BY_IDResult + { + public string message_id { get; set; } + public string text { get; set; } + public DateTime createdAt { get; set; } + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs b/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs index 2427afcba..fd1e36c17 100644 --- a/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs +++ b/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_TIMESHEETS_CLOCK_IN_OUTResult - { - public DateTime? timestamp { get; set; } - public bool? currentState { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_TIMESHEETS_CLOCK_IN_OUTResult + { + public DateTime? timestamp { get; set; } + public bool? currentState { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs index d63b288ab..ec2ca78aa 100644 --- a/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GRP_ADMIN_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GRP_ADMIN_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Graduation.cs b/Gordon360/Models/CCT/Graduation.cs index c247aad91..1721c2a9f 100644 --- a/Gordon360/Models/CCT/Graduation.cs +++ b/Gordon360/Models/CCT/Graduation.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Graduation - { - public int ID_NUM { get; set; } - [StringLength(4000)] - public string WHEN_GRAD { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HAS_GRADUATED { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Graduation + { + public int ID_NUM { get; set; } + [StringLength(4000)] + public string WHEN_GRAD { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HAS_GRADUATED { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Question.cs b/Gordon360/Models/CCT/Health_Question.cs index 0e7d10184..5ba8e3816 100644 --- a/Gordon360/Models/CCT/Health_Question.cs +++ b/Gordon360/Models/CCT/Health_Question.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Health_Question - { - [Required] - [Unicode(false)] - public string Question { get; set; } - [Required] - [Unicode(false)] - public string YesPrompt { get; set; } - [Required] - [Unicode(false)] - public string NoPrompt { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Timestamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Health_Question + { + [Required] + [Unicode(false)] + public string Question { get; set; } + [Required] + [Unicode(false)] + public string YesPrompt { get; set; } + [Required] + [Unicode(false)] + public string NoPrompt { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Timestamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Status.cs b/Gordon360/Models/CCT/Health_Status.cs index a296d7ded..f3d1ad658 100644 --- a/Gordon360/Models/CCT/Health_Status.cs +++ b/Gordon360/Models/CCT/Health_Status.cs @@ -1,31 +1,31 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Health_Status - { - [Key] - public int ID_Num { get; set; } - public byte HealthStatusID { get; set; } - [Key] - public DateTime Created { get; set; } - public DateTime? Expires { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string CreatedBy { get; set; } - public DateTime? Emailed { get; set; } - [Unicode(false)] - public string Notes { get; set; } - - [ForeignKey("HealthStatusID")] - [InverseProperty("Health_Status")] - public virtual Health_Status_CTRL HealthStatus { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Health_Status + { + [Key] + public int ID_Num { get; set; } + public byte HealthStatusID { get; set; } + [Key] + public DateTime Created { get; set; } + public DateTime? Expires { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string CreatedBy { get; set; } + public DateTime? Emailed { get; set; } + [Unicode(false)] + public string Notes { get; set; } + + [ForeignKey("HealthStatusID")] + [InverseProperty("Health_Status")] + public virtual Health_Status_CTRL HealthStatus { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Status_CTRL.cs b/Gordon360/Models/CCT/Health_Status_CTRL.cs index ee507faa9..ab58dc14b 100644 --- a/Gordon360/Models/CCT/Health_Status_CTRL.cs +++ b/Gordon360/Models/CCT/Health_Status_CTRL.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Health_Status_CTRL - { - public Health_Status_CTRL() - { - Health_Status = new HashSet(); - } - - [Key] - public byte HealthStatusID { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string HealthStatusColor { get; set; } - - [InverseProperty("HealthStatus")] - public virtual ICollection Health_Status { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Health_Status_CTRL + { + public Health_Status_CTRL() + { + Health_Status = new HashSet(); + } + + [Key] + public byte HealthStatusID { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string HealthStatusColor { get; set; } + + [InverseProperty("HealthStatus")] + public virtual ICollection Health_Status { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Admins.cs b/Gordon360/Models/CCT/Housing_Admins.cs index 3ef97f320..b9a46d67b 100644 --- a/Gordon360/Models/CCT/Housing_Admins.cs +++ b/Gordon360/Models/CCT/Housing_Admins.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Admins - { - [Key] - [StringLength(10)] - [Unicode(false)] - public string AdminID { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Admins + { + [Key] + [StringLength(10)] + [Unicode(false)] + public string AdminID { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Applicants.cs b/Gordon360/Models/CCT/Housing_Applicants.cs index 293cd1c33..6c455ad05 100644 --- a/Gordon360/Models/CCT/Housing_Applicants.cs +++ b/Gordon360/Models/CCT/Housing_Applicants.cs @@ -1,32 +1,32 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Applicants - { - [Key] - public int HousingAppID { get; set; } - [Key] - [StringLength(50)] - [Unicode(false)] - public string Username { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - - [ForeignKey("HousingAppID")] - [InverseProperty("Housing_Applicants")] - public virtual Housing_Applications HousingApp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Applicants + { + [Key] + public int HousingAppID { get; set; } + [Key] + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + + [ForeignKey("HousingAppID")] + [InverseProperty("Housing_Applicants")] + public virtual Housing_Applications HousingApp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Applications.cs b/Gordon360/Models/CCT/Housing_Applications.cs index 9ae5f8fae..908e42bf2 100644 --- a/Gordon360/Models/CCT/Housing_Applications.cs +++ b/Gordon360/Models/CCT/Housing_Applications.cs @@ -1,32 +1,32 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Applications - { - public Housing_Applications() - { - Housing_Applicants = new HashSet(); - } - - [Key] - public int HousingAppID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? DateSubmitted { get; set; } - [Column(TypeName = "datetime")] - public DateTime DateModified { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string EditorUsername { get; set; } - - [InverseProperty("HousingApp")] - public virtual ICollection Housing_Applicants { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Applications + { + public Housing_Applications() + { + Housing_Applicants = new HashSet(); + } + + [Key] + public int HousingAppID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? DateSubmitted { get; set; } + [Column(TypeName = "datetime")] + public DateTime DateModified { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string EditorUsername { get; set; } + + [InverseProperty("HousingApp")] + public virtual ICollection Housing_Applicants { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_HallChoices.cs b/Gordon360/Models/CCT/Housing_HallChoices.cs index 68a4fc628..bffce3c9e 100644 --- a/Gordon360/Models/CCT/Housing_HallChoices.cs +++ b/Gordon360/Models/CCT/Housing_HallChoices.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Housing_HallChoices - { - public int HousingAppID { get; set; } - public int Ranking { get; set; } - [Required] - [StringLength(15)] - [Unicode(false)] - public string HallName { get; set; } - - [ForeignKey("HousingAppID")] - public virtual Housing_Applications HousingApp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Housing_HallChoices + { + public int HousingAppID { get; set; } + public int Ranking { get; set; } + [Required] + [StringLength(15)] + [Unicode(false)] + public string HallName { get; set; } + + [ForeignKey("HousingAppID")] + public virtual Housing_Applications HousingApp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Halls.cs b/Gordon360/Models/CCT/Housing_Halls.cs index acfeb3240..f9b09d5ef 100644 --- a/Gordon360/Models/CCT/Housing_Halls.cs +++ b/Gordon360/Models/CCT/Housing_Halls.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Halls - { - [Key] - [StringLength(15)] - [Unicode(false)] - public string Name { get; set; } - [Required] - [StringLength(15)] - [Unicode(false)] - public string Type { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Halls + { + [Key] + [StringLength(15)] + [Unicode(false)] + public string Name { get; set; } + [Required] + [StringLength(15)] + [Unicode(false)] + public string Type { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs b/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs index 59f5b6c30..17d3b177e 100644 --- a/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs +++ b/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class INSERT_NEWS_ITEMResult - { - public int SNID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class INSERT_NEWS_ITEMResult + { + public int SNID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs b/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs index d7423058e..872925c79 100644 --- a/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs +++ b/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult - { - public int? ID_NUM { get; set; } - public string CRS_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult + { + public int? ID_NUM { get; set; } + public string CRS_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Information_Change_Request.cs b/Gordon360/Models/CCT/Information_Change_Request.cs index 84649fcf5..eab94ef4a 100644 --- a/Gordon360/Models/CCT/Information_Change_Request.cs +++ b/Gordon360/Models/CCT/Information_Change_Request.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Information_Change_Request - { - [Key] - public long ID { get; set; } - public long RequestNumber { get; set; } - [Required] - [StringLength(16)] - [Unicode(false)] - public string ID_Num { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string FieldName { get; set; } - [StringLength(128)] - [Unicode(false)] - public string FieldValue { get; set; } - [Column(TypeName = "datetime")] - public DateTime TimeStamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Information_Change_Request + { + [Key] + public long ID { get; set; } + public long RequestNumber { get; set; } + [Required] + [StringLength(16)] + [Unicode(false)] + public string ID_Num { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string FieldName { get; set; } + [StringLength(128)] + [Unicode(false)] + public string FieldValue { get; set; } + [Column(TypeName = "datetime")] + public DateTime TimeStamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Internships_as_Involvements.cs b/Gordon360/Models/CCT/Internships_as_Involvements.cs index bf98d8115..9af309725 100644 --- a/Gordon360/Models/CCT/Internships_as_Involvements.cs +++ b/Gordon360/Models/CCT/Internships_as_Involvements.cs @@ -1,38 +1,38 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Internships_as_Involvements - { - [Required] - [StringLength(6)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(4)] - [Unicode(false)] - public string YR_CDE { get; set; } - [Required] - [StringLength(2)] - [Unicode(false)] - public string TRM_CDE { get; set; } - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(8000)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Internships_as_Involvements + { + [Required] + [StringLength(6)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(4)] + [Unicode(false)] + public string YR_CDE { get; set; } + [Required] + [StringLength(2)] + [Unicode(false)] + public string TRM_CDE { get; set; } + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(8000)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/InvolvementOffering.cs b/Gordon360/Models/CCT/InvolvementOffering.cs new file mode 100644 index 000000000..59465420e --- /dev/null +++ b/Gordon360/Models/CCT/InvolvementOffering.cs @@ -0,0 +1,32 @@ +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class InvolvementOffering + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + } +} \ No newline at end of file diff --git a/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs b/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs index 6b089c520..ae536e5aa 100644 --- a/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs +++ b/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs @@ -1,36 +1,36 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class JENZ_ACT_CLUB_DEF - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string ACT_DESC { get; set; } - [StringLength(3)] - [Unicode(false)] - public string ACT_TYPE { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } - public int VPM_IM { get; set; } - public int VPM_CC { get; set; } - public int VPM_LS { get; set; } - public int VPM_LW { get; set; } - public int VPL_IM { get; set; } - public int VPL_CC { get; set; } - public int VPL_LS { get; set; } - public int VPL_LW { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class JENZ_ACT_CLUB_DEF + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + public int VPM_IM { get; set; } + public int VPM_CC { get; set; } + public int VPM_LS { get; set; } + public int VPM_LW { get; set; } + public int VPL_IM { get; set; } + public int VPL_CC { get; set; } + public int VPL_LS { get; set; } + public int VPL_LW { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs b/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs index 989ab942f..a93266061 100644 --- a/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs +++ b/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs @@ -1,57 +1,57 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Index("ACT_CDE", "SESS_CDE", "PART_CDE", "ID_NUM", Name = "IX_JNZB_ACTIVITIES", IsUnique = true)] - public partial class JNZB_ACTIVITIES - { - [Key] - public int ENTRY_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string MEMBERSHIP_STS { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string TRACK_MTG_ATTEND { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string INCL_PROFILE_RPT { get; set; } - [StringLength(15)] - [Unicode(false)] - public string USER_NAME { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JOB_NAME { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JOB_TIME { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Index("ACT_CDE", "SESS_CDE", "PART_CDE", "ID_NUM", Name = "IX_JNZB_ACTIVITIES", IsUnique = true)] + public partial class JNZB_ACTIVITIES + { + [Key] + public int ENTRY_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string MEMBERSHIP_STS { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string TRACK_MTG_ATTEND { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string INCL_PROFILE_RPT { get; set; } + [StringLength(15)] + [Unicode(false)] + public string USER_NAME { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JOB_NAME { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JOB_TIME { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs index 8d191b2dc..099bb7c4a 100644 --- a/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class LEADER_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class LEADER_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs index 376f14826..a485fe997 100644 --- a/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class LEADER_MEMBERSHIPS_PER_ACT_CDEResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class LEADER_MEMBERSHIPS_PER_ACT_CDEResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MEMBERSHIP.cs b/Gordon360/Models/CCT/MEMBERSHIP.cs index da8272303..02590d711 100644 --- a/Gordon360/Models/CCT/MEMBERSHIP.cs +++ b/Gordon360/Models/CCT/MEMBERSHIP.cs @@ -1,47 +1,47 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Index("ACT_CDE", "SESS_CDE", "ID_NUM", Name = "IX_MEMBERSHIP", IsUnique = true)] - public partial class MEMBERSHIP - { - [Key] - public int MEMBERSHIP_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [StringLength(15)] - [Unicode(false)] - public string USER_NAME { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JOB_NAME { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JOB_TIME { get; set; } - public bool? GRP_ADMIN { get; set; } - public bool? PRIVACY { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Index("ACT_CDE", "SESS_CDE", "ID_NUM", Name = "IX_MEMBERSHIP", IsUnique = true)] + public partial class MEMBERSHIP + { + [Key] + public int MEMBERSHIP_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [StringLength(15)] + [Unicode(false)] + public string USER_NAME { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JOB_NAME { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JOB_TIME { get; set; } + public bool? GRP_ADMIN { get; set; } + public bool? PRIVACY { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs index 9c0790e40..3313a53f7 100644 --- a/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MEMBERSHIPS_PER_ACT_CDEResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string AD_Username { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Mail_Location { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public int AccountPrivate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MEMBERSHIPS_PER_ACT_CDEResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string AD_Username { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Mail_Location { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public int AccountPrivate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs b/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs index 841b36d05..150accd3d 100644 --- a/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MEMBERSHIPS_PER_STUDENT_IDResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public string ActivityType { get; set; } - public string ActivityTypeDescription { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - public long? TotalSemesters { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MEMBERSHIPS_PER_STUDENT_IDResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public string ActivityType { get; set; } + public string ActivityTypeDescription { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + public long? TotalSemesters { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MYSCHEDULE.cs b/Gordon360/Models/CCT/MYSCHEDULE.cs index d4816f2a1..beb880b4c 100644 --- a/Gordon360/Models/CCT/MYSCHEDULE.cs +++ b/Gordon360/Models/CCT/MYSCHEDULE.cs @@ -1,52 +1,52 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class MYSCHEDULE - { - [Key] - [StringLength(10)] - [Unicode(false)] - public string EVENT_ID { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string GORDON_ID { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LOCATION { get; set; } - [StringLength(50)] - [Unicode(false)] - public string DESCRIPTION { get; set; } - [StringLength(10)] - [Unicode(false)] - public string MON_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string TUE_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string WED_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string THU_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string FRI_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string SAT_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string SUN_CDE { get; set; } - public int? IS_ALLDAY { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class MYSCHEDULE + { + [Key] + [StringLength(10)] + [Unicode(false)] + public string EVENT_ID { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string GORDON_ID { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LOCATION { get; set; } + [StringLength(50)] + [Unicode(false)] + public string DESCRIPTION { get; set; } + [StringLength(10)] + [Unicode(false)] + public string MON_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string TUE_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string WED_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string THU_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string FRI_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string SAT_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string SUN_CDE { get; set; } + public int? IS_ALLDAY { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs b/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs index f3ae9b667..b6d5551f2 100644 --- a/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs @@ -1,25 +1,25 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MYSCHEDULE_BY_IDResult - { - public string EVENT_ID { get; set; } - public string GORDON_ID { get; set; } - public string LOCATION { get; set; } - public string DESCRIPTION { get; set; } - public string MON_CDE { get; set; } - public string TUE_CDE { get; set; } - public string WED_CDE { get; set; } - public string THU_CDE { get; set; } - public string FRI_CDE { get; set; } - public string SAT_CDE { get; set; } - public string SUN_CDE { get; set; } - public int? IS_ALLDAY { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MYSCHEDULE_BY_IDResult + { + public string EVENT_ID { get; set; } + public string GORDON_ID { get; set; } + public string LOCATION { get; set; } + public string DESCRIPTION { get; set; } + public string MON_CDE { get; set; } + public string TUE_CDE { get; set; } + public string WED_CDE { get; set; } + public string THU_CDE { get; set; } + public string FRI_CDE { get; set; } + public string SAT_CDE { get; set; } + public string SUN_CDE { get; set; } + public int? IS_ALLDAY { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Mailboxes.cs b/Gordon360/Models/CCT/Mailboxes.cs index 8777a7da0..0aaf68105 100644 --- a/Gordon360/Models/CCT/Mailboxes.cs +++ b/Gordon360/Models/CCT/Mailboxes.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Mailboxes - { - public int BoxId { get; set; } - [Required] - [StringLength(32)] - [Unicode(false)] - public string BoxNo { get; set; } - [StringLength(16)] - [Unicode(false)] - public string Combination { get; set; } - [Required] - [StringLength(32)] - [Unicode(false)] - public string Type { get; set; } - public int? HolderAccountId { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Mailboxes + { + public int BoxId { get; set; } + [Required] + [StringLength(32)] + [Unicode(false)] + public string BoxNo { get; set; } + [StringLength(16)] + [Unicode(false)] + public string Combination { get; set; } + [Required] + [StringLength(32)] + [Unicode(false)] + public string Type { get; set; } + public int? HolderAccountId { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Majors.cs b/Gordon360/Models/CCT/Majors.cs index bb5c9f940..82c592392 100644 --- a/Gordon360/Models/CCT/Majors.cs +++ b/Gordon360/Models/CCT/Majors.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Majors - { - [StringLength(5)] - [Unicode(false)] - public string MajorCode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MajorDescription { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Majors + { + [StringLength(5)] + [Unicode(false)] + public string MajorCode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MajorDescription { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MembershipView.cs b/Gordon360/Models/CCT/MembershipView.cs index 68834347a..20a20da64 100644 --- a/Gordon360/Models/CCT/MembershipView.cs +++ b/Gordon360/Models/CCT/MembershipView.cs @@ -1,59 +1,59 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class MembershipView - { - public int MembershipID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ActivityCode { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ActivityDescription { get; set; } - [Unicode(false)] - public string ActivityImagePath { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SessionCode { get; set; } - [StringLength(1000)] - [Unicode(false)] - public string SessionDescription { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Username { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string Participation { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ParticipationDescription { get; set; } - [Column(TypeName = "datetime")] - public DateTime StartDate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? EndDate { get; set; } - [StringLength(45)] - [Unicode(false)] - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class MembershipView + { + public int MembershipID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ActivityCode { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ActivityDescription { get; set; } + [Unicode(false)] + public string ActivityImagePath { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SessionDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string Participation { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ParticipationDescription { get; set; } + [Column(TypeName = "datetime")] + public DateTime StartDate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? EndDate { get; set; } + [StringLength(45)] + [Unicode(false)] + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Message_Rooms.cs b/Gordon360/Models/CCT/Message_Rooms.cs index c8301a740..b3435376b 100644 --- a/Gordon360/Models/CCT/Message_Rooms.cs +++ b/Gordon360/Models/CCT/Message_Rooms.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Message_Rooms - { - [Key] - public int room_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public bool group { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Column(TypeName = "datetime")] - public DateTime lastUpdated { get; set; } - public byte[] roomImage { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Message_Rooms + { + [Key] + public int room_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public bool group { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Column(TypeName = "datetime")] + public DateTime lastUpdated { get; set; } + public byte[] roomImage { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Messages.cs b/Gordon360/Models/CCT/Messages.cs index 1e5b64105..a9c4d0e8e 100644 --- a/Gordon360/Models/CCT/Messages.cs +++ b/Gordon360/Models/CCT/Messages.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Messages - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string _id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - public string text { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Messages + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string _id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + public string text { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs b/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs index f410e11d2..eb0d76630 100644 --- a/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs +++ b/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_CATEGORIESResult - { - public int categoryID { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_CATEGORIESResult + { + public int categoryID { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_NEWResult.cs b/Gordon360/Models/CCT/NEWS_NEWResult.cs index 4c1072225..407a022a2 100644 --- a/Gordon360/Models/CCT/NEWS_NEWResult.cs +++ b/Gordon360/Models/CCT/NEWS_NEWResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_NEWResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_NEWResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs b/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs index 1c995a32b..32f45b074 100644 --- a/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs +++ b/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_NOT_EXPIREDResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_NOT_EXPIREDResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs b/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs index 774ea5f51..0bbad877e 100644 --- a/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs +++ b/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_PERSONAL_UNAPPROVEDResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_PERSONAL_UNAPPROVEDResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/PART_DEF.cs b/Gordon360/Models/CCT/PART_DEF.cs index 538e9e8ac..d1e94f69b 100644 --- a/Gordon360/Models/CCT/PART_DEF.cs +++ b/Gordon360/Models/CCT/PART_DEF.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class PART_DEF - { - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string PART_DESC { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class PART_DEF + { + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string PART_DESC { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs b/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs index be1607403..845c2aab5 100644 --- a/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs +++ b/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class PHOTO_INFO_PER_USER_NAMEResult - { - public string Img_Name { get; set; } - public string Img_Path { get; set; } - public string Pref_Img_Name { get; set; } - public string Pref_Img_Path { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class PHOTO_INFO_PER_USER_NAMEResult + { + public string Img_Name { get; set; } + public string Img_Path { get; set; } + public string Pref_Img_Name { get; set; } + public string Pref_Img_Path { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Police.cs b/Gordon360/Models/CCT/Police.cs index 0a81f69b1..81903c194 100644 --- a/Gordon360/Models/CCT/Police.cs +++ b/Gordon360/Models/CCT/Police.cs @@ -1,16 +1,16 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Police - { - public int? ID_NUM { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Police + { + public int? ID_NUM { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/REQUEST.cs b/Gordon360/Models/CCT/REQUEST.cs index 26340f9e4..086730653 100644 --- a/Gordon360/Models/CCT/REQUEST.cs +++ b/Gordon360/Models/CCT/REQUEST.cs @@ -1,38 +1,38 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class REQUEST - { - [Key] - public int REQUEST_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime DATE_SENT { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string STATUS { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class REQUEST + { + [Key] + public int REQUEST_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime DATE_SENT { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string STATUS { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs index f3f929f3d..a1eb08cc3 100644 --- a/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUESTS_PER_ACT_CDEResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUESTS_PER_ACT_CDEResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs b/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs index 4813301e6..3cff1fd59 100644 --- a/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUESTS_PER_STUDENT_IDResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUESTS_PER_STUDENT_IDResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs b/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs index 9d8abecb1..64dd98a96 100644 --- a/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs +++ b/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUEST_PER_REQUEST_IDResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUEST_PER_REQUEST_IDResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs b/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs index c68539dd2..ba1b3afcd 100644 --- a/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs +++ b/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class RIDERS_BY_RIDE_IDResult - { - public string rideID { get; set; } - public string ID { get; set; } - public byte isDriver { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class RIDERS_BY_RIDE_IDResult + { + public string rideID { get; set; } + public string ID { get; set; } + public byte isDriver { get; set; } + } +} diff --git a/Gordon360/Models/CCT/RoomAssign.cs b/Gordon360/Models/CCT/RoomAssign.cs index eddf14957..b052b67fd 100644 --- a/Gordon360/Models/CCT/RoomAssign.cs +++ b/Gordon360/Models/CCT/RoomAssign.cs @@ -1,42 +1,42 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class RoomAssign - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_LOC_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string ROOM_CDE { get; set; } - public int ROOM_SLOT_NUM { get; set; } - public int? ID_NUM { get; set; } - [StringLength(2)] - [Unicode(false)] - public string ROOM_TYPE { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string ROOM_ASSIGN_STS { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ASSIGN_DTE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class RoomAssign + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_LOC_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string ROOM_CDE { get; set; } + public int ROOM_SLOT_NUM { get; set; } + public int? ID_NUM { get; set; } + [StringLength(2)] + [Unicode(false)] + public string ROOM_TYPE { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string ROOM_ASSIGN_STS { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ASSIGN_DTE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Rooms.cs b/Gordon360/Models/CCT/Rooms.cs index 652b23568..69a1d980f 100644 --- a/Gordon360/Models/CCT/Rooms.cs +++ b/Gordon360/Models/CCT/Rooms.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Rooms - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public bool group { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Column(TypeName = "datetime")] - public DateTime lastUpdated { get; set; } - public byte[] roomImage { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Rooms + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public bool group { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Column(TypeName = "datetime")] + public DateTime lastUpdated { get; set; } + public byte[] roomImage { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs b/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs index 752f434af..5d06f737b 100644 --- a/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs +++ b/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult - { - public int ID_NUM { get; set; } - public string CRS_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult + { + public int ID_NUM { get; set; } + public string CRS_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs b/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs index 539a2193a..ed6a5faa9 100644 --- a/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs +++ b/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class STUDENT_JOBS_PER_ID_NUMResult - { - public string Job_Title { get; set; } - public string Job_Department { get; set; } - public string Job_Department_Name { get; set; } - public DateTime? Job_Start_Date { get; set; } - public DateTime? Job_End_Date { get; set; } - public DateTime? Job_Expected_End_Date { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class STUDENT_JOBS_PER_ID_NUMResult + { + public string Job_Title { get; set; } + public string Job_Department { get; set; } + public string Job_Department_Name { get; set; } + public DateTime? Job_Start_Date { get; set; } + public DateTime? Job_End_Date { get; set; } + public DateTime? Job_Expected_End_Date { get; set; } + } +} diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs index 32005ca47..38e7cada2 100644 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ACT_CDEResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISORS_PER_ACT_CDEResult + { + } +} diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs index 794cec48a..db6477480 100644 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs +++ b/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ID_NUMResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISORS_PER_ID_NUMResult + { + } +} diff --git a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs b/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs index 7cd66b8e8..4ce9968d8 100644 --- a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs +++ b/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISOR_PER_SUP_IDResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISOR_PER_SUP_IDResult + { + } +} diff --git a/Gordon360/Models/CCT/Save_Bookings.cs b/Gordon360/Models/CCT/Save_Bookings.cs index a59557986..a6b679c61 100644 --- a/Gordon360/Models/CCT/Save_Bookings.cs +++ b/Gordon360/Models/CCT/Save_Bookings.cs @@ -1,27 +1,27 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Save_Bookings - { - [Key] - [StringLength(25)] - [Unicode(false)] - public string ID { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string rideID { get; set; } - public byte isDriver { get; set; } - - [ForeignKey("rideID")] - [InverseProperty("Save_Bookings")] - public virtual Save_Rides ride { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Save_Bookings + { + [Key] + [StringLength(25)] + [Unicode(false)] + public string ID { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string rideID { get; set; } + public byte isDriver { get; set; } + + [ForeignKey("rideID")] + [InverseProperty("Save_Bookings")] + public virtual Save_Rides ride { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Save_Rides.cs b/Gordon360/Models/CCT/Save_Rides.cs index 23446cf14..037851348 100644 --- a/Gordon360/Models/CCT/Save_Rides.cs +++ b/Gordon360/Models/CCT/Save_Rides.cs @@ -1,44 +1,44 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Save_Rides - { - public Save_Rides() - { - Save_Bookings = new HashSet(); - } - - [Key] - [StringLength(10)] - [Unicode(false)] - public string rideID { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string destination { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string meetingPoint { get; set; } - [Column(TypeName = "datetime")] - public DateTime startTime { get; set; } - [Column(TypeName = "datetime")] - public DateTime endTime { get; set; } - public int capacity { get; set; } - [Required] - [StringLength(500)] - [Unicode(false)] - public string notes { get; set; } - public byte canceled { get; set; } - - [InverseProperty("ride")] - public virtual ICollection Save_Bookings { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Save_Rides + { + public Save_Rides() + { + Save_Bookings = new HashSet(); + } + + [Key] + [StringLength(10)] + [Unicode(false)] + public string rideID { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string destination { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string meetingPoint { get; set; } + [Column(TypeName = "datetime")] + public DateTime startTime { get; set; } + [Column(TypeName = "datetime")] + public DateTime endTime { get; set; } + public int capacity { get; set; } + [Required] + [StringLength(500)] + [Unicode(false)] + public string notes { get; set; } + public byte canceled { get; set; } + + [InverseProperty("ride")] + public virtual ICollection Save_Bookings { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Schedule_Control.cs b/Gordon360/Models/CCT/Schedule_Control.cs index 755ce81a0..6c94825ff 100644 --- a/Gordon360/Models/CCT/Schedule_Control.cs +++ b/Gordon360/Models/CCT/Schedule_Control.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Schedule_Control - { - public int IsSchedulePrivate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ModifiedTimeStamp { get; set; } - [StringLength(100)] - [Unicode(false)] - public string Description { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string gordon_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Schedule_Control + { + public int IsSchedulePrivate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ModifiedTimeStamp { get; set; } + [StringLength(100)] + [Unicode(false)] + public string Description { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string gordon_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Slider_Images.cs b/Gordon360/Models/CCT/Slider_Images.cs index 5bbfa8ca4..ecb46c63f 100644 --- a/Gordon360/Models/CCT/Slider_Images.cs +++ b/Gordon360/Models/CCT/Slider_Images.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Slider_Images - { - [Key] - public int ID { get; set; } - [Required] - [StringLength(150)] - [Unicode(false)] - public string Path { get; set; } - [Required] - [StringLength(255)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(500)] - [Unicode(false)] - public string LinkURL { get; set; } - public int Width { get; set; } - public int Height { get; set; } - public int SortOrder { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Slider_Images + { + [Key] + public int ID { get; set; } + [Required] + [StringLength(150)] + [Unicode(false)] + public string Path { get; set; } + [Required] + [StringLength(255)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(500)] + [Unicode(false)] + public string LinkURL { get; set; } + public int Width { get; set; } + public int Height { get; set; } + public int SortOrder { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/States.cs b/Gordon360/Models/CCT/States.cs index ec506a1cf..a218bebe3 100644 --- a/Gordon360/Models/CCT/States.cs +++ b/Gordon360/Models/CCT/States.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class States - { - [Required] - [StringLength(63)] - [Unicode(false)] - public string Name { get; set; } - [StringLength(31)] - [Unicode(false)] - public string Abbreviation { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class States + { + [Required] + [StringLength(63)] + [Unicode(false)] + public string Name { get; set; } + [StringLength(31)] + [Unicode(false)] + public string Abbreviation { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Student.cs b/Gordon360/Models/CCT/Student.cs index e4bd69501..92839eecf 100644 --- a/Gordon360/Models/CCT/Student.cs +++ b/Gordon360/Models/CCT/Student.cs @@ -1,195 +1,195 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Student - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(30)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(30)] - [Unicode(false)] - public string NickName { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnOffCampus { get; set; } - [StringLength(5)] - [Unicode(false)] - public string OnCampusBuilding { get; set; } - [StringLength(5)] - [Unicode(false)] - public string OnCampusRoom { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusPhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusPrivatePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OffCampusStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OffCampusStreet2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string OffCampusCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string OffCampusState { get; set; } - [StringLength(12)] - [Unicode(false)] - public string OffCampusPostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string OffCampusCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string OffCampusPhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OffCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(12)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HomeFax { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Cohort { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Class { get; set; } - [StringLength(10)] - [Unicode(false)] - public string KeepPrivate { get; set; } - [StringLength(14)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(92)] - [Unicode(false)] - public string AdvisorIDs { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Married { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Commuter { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major2 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major3 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Email { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(1)] - [Unicode(false)] - public string grad_student { get; set; } - [StringLength(255)] - [Unicode(false)] - public string GradDate { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor1 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor2 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor3 { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MobilePhone { get; set; } - public int IsMobilePhonePrivate { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int? show_pic { get; set; } - public int? preferred_photo { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BuildingDescription { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major3Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor1Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor3Description { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - public int? ChapelRequired { get; set; } - public int? ChapelAttended { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Student + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(30)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(30)] + [Unicode(false)] + public string NickName { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnOffCampus { get; set; } + [StringLength(5)] + [Unicode(false)] + public string OnCampusBuilding { get; set; } + [StringLength(5)] + [Unicode(false)] + public string OnCampusRoom { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusPhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusPrivatePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OffCampusStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OffCampusStreet2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string OffCampusCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string OffCampusState { get; set; } + [StringLength(12)] + [Unicode(false)] + public string OffCampusPostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string OffCampusCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string OffCampusPhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OffCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(12)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HomeFax { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Cohort { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Class { get; set; } + [StringLength(10)] + [Unicode(false)] + public string KeepPrivate { get; set; } + [StringLength(14)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(92)] + [Unicode(false)] + public string AdvisorIDs { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Married { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Commuter { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major2 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major3 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Email { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(1)] + [Unicode(false)] + public string grad_student { get; set; } + [StringLength(255)] + [Unicode(false)] + public string GradDate { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor1 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor2 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor3 { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MobilePhone { get; set; } + public int IsMobilePhonePrivate { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int? show_pic { get; set; } + public int? preferred_photo { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BuildingDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major3Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor1Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor3Description { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + public int? ChapelRequired { get; set; } + public int? ChapelAttended { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/StudentNewsExpiration.cs b/Gordon360/Models/CCT/StudentNewsExpiration.cs index 0de27c755..37c43e467 100644 --- a/Gordon360/Models/CCT/StudentNewsExpiration.cs +++ b/Gordon360/Models/CCT/StudentNewsExpiration.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class StudentNewsExpiration - { - [Key] - public int SNID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ManualExpirationDate { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class StudentNewsExpiration + { + [Key] + public int SNID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ManualExpirationDate { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs b/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs index cac5de35b..11dd9bde4 100644 --- a/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs +++ b/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs @@ -1,19 +1,19 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Timesheets_Clock_In_Out - { - public int ID_Num { get; set; } - public bool? CurrentState { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Timestamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Timesheets_Clock_In_Out + { + public int ID_Num { get; set; } + public bool? CurrentState { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Timestamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs b/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs index 57ccc2e83..a09f6c4a3 100644 --- a/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs +++ b/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPCOMING_RIDESResult - { - public string rideID { get; set; } - public int capacity { get; set; } - public string destination { get; set; } - public string meetingPoint { get; set; } - public DateTime startTime { get; set; } - public DateTime endTime { get; set; } - public byte isCanceled { get; set; } - public string notes { get; set; } - public byte isDriver { get; set; } - public int? seatsTaken { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPCOMING_RIDESResult + { + public string rideID { get; set; } + public int capacity { get; set; } + public string destination { get; set; } + public string meetingPoint { get; set; } + public DateTime startTime { get; set; } + public DateTime endTime { get; set; } + public byte isCanceled { get; set; } + public string notes { get; set; } + public byte isDriver { get; set; } + public int? seatsTaken { get; set; } + } +} diff --git a/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs b/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs index 3d82c5bac..a4badef69 100644 --- a/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPCOMING_RIDES_BY_STUDENT_IDResult - { - public string rideID { get; set; } - public int capacity { get; set; } - public string destination { get; set; } - public string meetingPoint { get; set; } - public DateTime startTime { get; set; } - public DateTime endTime { get; set; } - public byte isCanceled { get; set; } - public string notes { get; set; } - public byte isDriver { get; set; } - public int? seatsTaken { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPCOMING_RIDES_BY_STUDENT_IDResult + { + public string rideID { get; set; } + public int capacity { get; set; } + public string destination { get; set; } + public string meetingPoint { get; set; } + public DateTime startTime { get; set; } + public DateTime endTime { get; set; } + public byte isCanceled { get; set; } + public string notes { get; set; } + public byte isDriver { get; set; } + public int? seatsTaken { get; set; } + } +} diff --git a/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs b/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs index 5e4c591c4..ef2768716 100644 --- a/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs +++ b/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPDATE_CELL_PHONEResult - { - public bool? Success { get; set; } - public string Message { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPDATE_CELL_PHONEResult + { + public bool? Success { get; set; } + public string Message { get; set; } + } +} diff --git a/Gordon360/Models/CCT/User_Connection_Ids.cs b/Gordon360/Models/CCT/User_Connection_Ids.cs index e7f493f50..76948d61c 100644 --- a/Gordon360/Models/CCT/User_Connection_Ids.cs +++ b/Gordon360/Models/CCT/User_Connection_Ids.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class User_Connection_Ids - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string connection_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class User_Connection_Ids + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string connection_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/User_Rooms.cs b/Gordon360/Models/CCT/User_Rooms.cs index 46b1d73e5..d2b3e87c7 100644 --- a/Gordon360/Models/CCT/User_Rooms.cs +++ b/Gordon360/Models/CCT/User_Rooms.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class User_Rooms - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class User_Rooms + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Users.cs b/Gordon360/Models/CCT/Users.cs index c4853adf6..81ecfe82b 100644 --- a/Gordon360/Models/CCT/Users.cs +++ b/Gordon360/Models/CCT/Users.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Users - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string _id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public byte[] avatar { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Users + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string _id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public byte[] avatar { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs b/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs index 9c3275a0f..48184adbe 100644 --- a/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs +++ b/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class VALID_DRIVES_BY_IDResult - { - public int? numOccupiedRides { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class VALID_DRIVES_BY_IDResult + { + public int? numOccupiedRides { get; set; } + } +} diff --git a/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs b/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs index 6f0215f51..61541922c 100644 --- a/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class VICTORY_PROMISE_BY_STUDENT_IDResult - { - public int? TOTAL_VP_IM_SCORE { get; set; } - public int? TOTAL_VP_CC_SCORE { get; set; } - public int? TOTAL_VP_LS_SCORE { get; set; } - public int? TOTAL_VP_LW_SCORE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class VICTORY_PROMISE_BY_STUDENT_IDResult + { + public int? TOTAL_VP_IM_SCORE { get; set; } + public int? TOTAL_VP_CC_SCORE { get; set; } + public int? TOTAL_VP_LS_SCORE { get; set; } + public int? TOTAL_VP_LW_SCORE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/_360_SLIDER.cs b/Gordon360/Models/CCT/_360_SLIDER.cs index 25ac946c6..cbeb58312 100644 --- a/Gordon360/Models/CCT/_360_SLIDER.cs +++ b/Gordon360/Models/CCT/_360_SLIDER.cs @@ -1,52 +1,52 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class _360_SLIDER - { - [Required] - [StringLength(150)] - [Unicode(false)] - public string strFileName { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strFlashFileName { get; set; } - [Required] - [StringLength(255)] - [Unicode(false)] - public string strAltTag { get; set; } - [Required] - [StringLength(500)] - [Unicode(false)] - public string strLinkURL { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderSubTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderAction { get; set; } - public int iWidth { get; set; } - public int iHeight { get; set; } - [Required] - [StringLength(11)] - [Unicode(false)] - public string strExtensions { get; set; } - [Column(TypeName = "datetime")] - public DateTime dtModified { get; set; } - public int sortOrder { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class _360_SLIDER + { + [Required] + [StringLength(150)] + [Unicode(false)] + public string strFileName { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strFlashFileName { get; set; } + [Required] + [StringLength(255)] + [Unicode(false)] + public string strAltTag { get; set; } + [Required] + [StringLength(500)] + [Unicode(false)] + public string strLinkURL { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderTitle { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderSubTitle { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderAction { get; set; } + public int iWidth { get; set; } + public int iHeight { get; set; } + [Required] + [StringLength(11)] + [Unicode(false)] + public string strExtensions { get; set; } + [Column(TypeName = "datetime")] + public DateTime dtModified { get; set; } + public int sortOrder { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index b24bfd0e9..03b0e075d 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -4,7 +4,6 @@ namespace Gordon360.Models.CCT { public partial class MembershipUploadViewModel { - public int MembershipID { get; set; } public string ACTCode { get; set; } public string SessCode { get; set; } public string Username { get; set; } diff --git a/Gordon360/Services/AccountService.cs b/Gordon360/Services/AccountService.cs index c89aee35d..c4068ddb6 100644 --- a/Gordon360/Services/AccountService.cs +++ b/Gordon360/Services/AccountService.cs @@ -1,249 +1,249 @@ -using Gordon360.Authorization; -using Gordon360.Models.CCT.Context; -using Gordon360.Exceptions; -using Gordon360.Models.CCT; -using Gordon360.Models.ViewModels; -using Gordon360.Static.Names; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Services -{ - - /// - /// Service Class that facilitates data transactions between the AccountsController and the Account database model. - /// - public class AccountService : IAccountService - { - private readonly CCTContext _context; - - public AccountService(CCTContext context) - { - _context = context; - } - - /// - /// Fetches a single account record whose id matches the id provided as an argument - /// - /// The person's gordon id - /// AccountViewModel if found, null if not found - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.ACCOUNT)] - public AccountViewModel GetAccountByID(string id) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.gordon_id == id); - if (account == null) - { - // Custom Exception is thrown that will be cauth in the controller Exception filter. - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - /// - /// Fetches all the account records from storage. - /// - /// AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ACCOUNT)] - public IEnumerable GetAll() - { - return (IEnumerable)_context.ACCOUNT; //Map the database model to a more presentable version (a ViewModel) - } - - /// - /// Fetches the account record with the specified email. - /// - /// The email address associated with the account. - /// the account id number - public string GetGordonIDFromEmail(string email) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account.gordon_id; - } - - /// - /// Fetches the account record with the specified email. - /// - /// The email address associated with the account. - /// the first account object which matches the email - public AccountViewModel GetAccountByEmail(string email) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - /// - /// Fetches the account record with the specified username. - /// - /// The AD username associated with the account. - /// the student account information - public AccountViewModel GetAccountByUsername(string username) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username == username); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - public IEnumerable AdvancedSearch( - List accountTypes, - string firstname, - string lastname, - string major, - string minor, - string hall, - string classType, - string homeCity, - string state, - string country, - string department, - string building) - { - // Accept common town abbreviations in advanced people search - // East = E, West = W, South = S, North = N - if ( - !string.IsNullOrEmpty(homeCity) - && ( - homeCity.StartsWith("e ") || - homeCity.StartsWith("w ") || - homeCity.StartsWith("s ") || - homeCity.StartsWith("n ") - ) - ) - { - homeCity = - homeCity - .Replace("e ", "east ") - .Replace("w ", "west ") - .Replace("s ", "south ") - .Replace("n ", "north "); - } - - // Create accounts viewmodel to search - IEnumerable accounts = new List(); - if (accountTypes.Contains("student")) - { - accounts = accounts.Union(GetAllPublicStudentAccounts()); - } - - if (accountTypes.Contains("facstaff")) - { - if (string.IsNullOrEmpty(homeCity)) - { - accounts = accounts.Union(GetAllPublicFacultyStaffAccounts()); - } - else - { - accounts = accounts.Union(GetAllPublicFacultyStaffAccounts().Where(a => a.KeepPrivate == "0")); - } - } - - if (accountTypes.Contains("alumni")) - { - if (string.IsNullOrEmpty(homeCity)) - { - accounts = accounts.Union(GetAllPublicAlumniAccounts()); - } - else - { - accounts = accounts.Union(GetAllPublicAlumniAccounts().Where(a => a.ShareAddress.ToLower() != "n")); - } - } - - return accounts - .Where(a => - ( - a.FirstName.ToLower().StartsWith(firstname) - || a.NickName.ToLower().StartsWith(firstname) - ) - && ( - a.LastName.ToLower().StartsWith(lastname) - || a.MaidenName.ToLower().StartsWith(lastname) - ) - && ( - a.Major1Description.StartsWith(major) - || a.Major2Description.StartsWith(major) - || a.Major3Description.StartsWith(major) - ) - && ( - a.Minor1Description.StartsWith(minor) - || a.Minor2Description.StartsWith(minor) - || a.Minor3Description.StartsWith(minor) - ) - && a.Hall.StartsWith(hall) - && a.Class.StartsWith(classType) - && a.HomeCity.ToLower().StartsWith(homeCity) - && a.HomeState.StartsWith(state) - && a.Country.StartsWith(country) - && a.OnCampusDepartment.StartsWith(department) - && a.BuildingDescription.StartsWith(building) - ) - .OrderBy(a => a.LastName) - .ThenBy(a => a.FirstName); - } - - /// - /// Get basic info for all accounts - /// - /// BasicInfoViewModel of all accounts - public async Task> GetAllBasicInfoAsync() - { - - var basicInfo = await _context.Procedures.ALL_BASIC_INFOAsync(); - return basicInfo.Select( - b => new BasicInfoViewModel - { - FirstName = b.FirstName, - LastName = b.LastName, - Nickname = b.Nickname, - UserName = b.UserName - }); - } - - /// - /// Get basic info for all accounts except alumni - /// - /// BasicInfoViewModel of all accounts except alumni - public async Task> GetAllBasicInfoExceptAlumniAsync() - { - var basicInfo = await _context.Procedures.ALL_BASIC_INFO_NOT_ALUMNIAsync(); - return basicInfo.Select( - b => new BasicInfoViewModel - { - FirstName = b.firstname, - LastName = b.lastname, - Nickname = b.Nickname, - UserName = b.Username - }); - } - - private IEnumerable GetAllPublicStudentAccounts() - { - return _context.Student.Select(s => s); - } - - private IEnumerable GetAllPublicFacultyStaffAccounts() - { - return _context.FacStaff.Select(fs => fs); - } - - private IEnumerable GetAllPublicAlumniAccounts() - { - return _context.Alumni.Select(a => a); - } - } +using Gordon360.Authorization; +using Gordon360.Models.CCT.Context; +using Gordon360.Exceptions; +using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; +using Gordon360.Static.Names; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Services +{ + + /// + /// Service Class that facilitates data transactions between the AccountsController and the Account database model. + /// + public class AccountService : IAccountService + { + private readonly CCTContext _context; + + public AccountService(CCTContext context) + { + _context = context; + } + + /// + /// Fetches a single account record whose id matches the id provided as an argument + /// + /// The person's gordon id + /// AccountViewModel if found, null if not found + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.ACCOUNT)] + public AccountViewModel GetAccountByID(string id) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.gordon_id == id); + if (account == null) + { + // Custom Exception is thrown that will be cauth in the controller Exception filter. + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + /// + /// Fetches all the account records from storage. + /// + /// AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ACCOUNT)] + public IEnumerable GetAll() + { + return (IEnumerable)_context.ACCOUNT; //Map the database model to a more presentable version (a ViewModel) + } + + /// + /// Fetches the account record with the specified email. + /// + /// The email address associated with the account. + /// the account id number + public string GetGordonIDFromEmail(string email) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account.gordon_id; + } + + /// + /// Fetches the account record with the specified email. + /// + /// The email address associated with the account. + /// the first account object which matches the email + public AccountViewModel GetAccountByEmail(string email) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + /// + /// Fetches the account record with the specified username. + /// + /// The AD username associated with the account. + /// the student account information + public AccountViewModel GetAccountByUsername(string username) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username == username); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + public IEnumerable AdvancedSearch( + List accountTypes, + string firstname, + string lastname, + string major, + string minor, + string hall, + string classType, + string homeCity, + string state, + string country, + string department, + string building) + { + // Accept common town abbreviations in advanced people search + // East = E, West = W, South = S, North = N + if ( + !string.IsNullOrEmpty(homeCity) + && ( + homeCity.StartsWith("e ") || + homeCity.StartsWith("w ") || + homeCity.StartsWith("s ") || + homeCity.StartsWith("n ") + ) + ) + { + homeCity = + homeCity + .Replace("e ", "east ") + .Replace("w ", "west ") + .Replace("s ", "south ") + .Replace("n ", "north "); + } + + // Create accounts viewmodel to search + IEnumerable accounts = new List(); + if (accountTypes.Contains("student")) + { + accounts = accounts.Union(GetAllPublicStudentAccounts()); + } + + if (accountTypes.Contains("facstaff")) + { + if (string.IsNullOrEmpty(homeCity)) + { + accounts = accounts.Union(GetAllPublicFacultyStaffAccounts()); + } + else + { + accounts = accounts.Union(GetAllPublicFacultyStaffAccounts().Where(a => a.KeepPrivate == "0")); + } + } + + if (accountTypes.Contains("alumni")) + { + if (string.IsNullOrEmpty(homeCity)) + { + accounts = accounts.Union(GetAllPublicAlumniAccounts()); + } + else + { + accounts = accounts.Union(GetAllPublicAlumniAccounts().Where(a => a.ShareAddress.ToLower() != "n")); + } + } + + return accounts + .Where(a => + ( + a.FirstName.ToLower().StartsWith(firstname) + || a.NickName.ToLower().StartsWith(firstname) + ) + && ( + a.LastName.ToLower().StartsWith(lastname) + || a.MaidenName.ToLower().StartsWith(lastname) + ) + && ( + a.Major1Description.StartsWith(major) + || a.Major2Description.StartsWith(major) + || a.Major3Description.StartsWith(major) + ) + && ( + a.Minor1Description.StartsWith(minor) + || a.Minor2Description.StartsWith(minor) + || a.Minor3Description.StartsWith(minor) + ) + && a.Hall.StartsWith(hall) + && a.Class.StartsWith(classType) + && a.HomeCity.ToLower().StartsWith(homeCity) + && a.HomeState.StartsWith(state) + && a.Country.StartsWith(country) + && a.OnCampusDepartment.StartsWith(department) + && a.BuildingDescription.StartsWith(building) + ) + .OrderBy(a => a.LastName) + .ThenBy(a => a.FirstName); + } + + /// + /// Get basic info for all accounts + /// + /// BasicInfoViewModel of all accounts + public async Task> GetAllBasicInfoAsync() + { + + var basicInfo = await _context.Procedures.ALL_BASIC_INFOAsync(); + return basicInfo.Select( + b => new BasicInfoViewModel + { + FirstName = b.FirstName, + LastName = b.LastName, + Nickname = b.Nickname, + UserName = b.UserName + }); + } + + /// + /// Get basic info for all accounts except alumni + /// + /// BasicInfoViewModel of all accounts except alumni + public async Task> GetAllBasicInfoExceptAlumniAsync() + { + var basicInfo = await _context.Procedures.ALL_BASIC_INFO_NOT_ALUMNIAsync(); + return basicInfo.Select( + b => new BasicInfoViewModel + { + FirstName = b.firstname, + LastName = b.lastname, + Nickname = b.Nickname, + UserName = b.Username + }); + } + + private IEnumerable GetAllPublicStudentAccounts() + { + return _context.Student.Select(s => s); + } + + private IEnumerable GetAllPublicFacultyStaffAccounts() + { + return _context.FacStaff.Select(fs => fs); + } + + private IEnumerable GetAllPublicAlumniAccounts() + { + return _context.Alumni.Select(a => a); + } + } } \ No newline at end of file diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index bec1ed715..c7a6c101a 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -1,404 +1,404 @@ -using Gordon360.Models.CCT.Context; -using Gordon360.Exceptions; -using Gordon360.Models.CCT; -using Gordon360.Models.ViewModels; -using Gordon360.Static.Methods; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Services -{ - /// - /// Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - /// - public class MembershipService : IMembershipService - { - private readonly CCTContext _context; - private IAccountService _accountService; - - public MembershipService(CCTContext context, IAccountService accountService) - { - _context = context; - _accountService = accountService; - } - - /// - /// Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - /// we do it here by using the validateMembership() method. - /// - /// The membership to be added - /// The newly added Membership object - public async Task AddAsync(MembershipUploadViewModel membership) - { - // validate returns a boolean value. - await ValidateMembershipAsync(membership); - IsPersonAlreadyInActivity(membership); - - - // The Add() method returns the added membership. - var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); - - // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) - if (payload?.Entity == null) - { - throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; - } else - { - await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(payload.Entity); - } - - - } - - /// - /// Delete the membership whose id is specified by the parameter. - /// - /// The membership id - /// The membership that was just deleted - public MembershipView Delete(int membershipID) - { - var result = _context.MEMBERSHIP.Find(membershipID); - if (result == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - _context.MEMBERSHIP.Remove(result); - _context.SaveChanges(); - - return MEMBERSHIPToMembershipView(result); - } - - /// - /// Fetch the membership whose id is specified by the parameter - /// - /// The membership id - /// MembershipViewModel if found, null if not found - public MembershipView GetSpecificMembership(int membershipID) - { - MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); - if (result == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - return result; - } - - /// - /// Fetches the memberships associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// Optional code of session to get memberships for - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) - { - //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); - - return _context.MembershipView - .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) - .OrderByDescending(m => m.StartDate); - } - - /// - /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); - } - - /// - /// Fetches the leaders of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetLeaderMembershipsForActivity(string activityCode) - { - var leaderRole = Helpers.GetLeaderRoleCodes(); - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == leaderRole); - } - - /// - /// Fetches the advisors of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) - { - - var advisorRole = Helpers.GetAdvisorRoleCodes(); - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == advisorRole); - } - - /// - /// Fetches all the membership information linked to the student whose id appears as a parameter. - /// - /// The student's AD Username. - /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForStudent(string username) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); - } - - /// - /// Fetches the number of followers associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// int. - public int GetActivityFollowersCount(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); - } - - /// - /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// int. - public int GetActivityMembersCount(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); - } - - /// - /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - /// - /// The activity code. - /// The session code - /// int. - public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); - } - - /// - /// Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - /// - /// The activity code. - /// The session code - /// int - public int GetActivityMembersCountForSession(string activityCode, string sessionCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); - } - - /// - /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. - /// - /// The updated membership. - /// The newly modified membership. - public async Task UpdateAsync(MembershipUploadViewModel membership) - { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membership.MembershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - await ValidateMembershipAsync(membership); - - // One can only update certain fields within a membrship - //original.BEGIN_DTE = membership.BEGIN_DTE; - original.COMMENT_TXT = membership.CommentText; - //original.END_DTE = membership.END_DTE; - original.PART_CDE = membership.PartCode; - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - - } - /// - /// Switches the group-admin property of the person whose membership id is given - /// - /// The corresponding membership object - /// The newly modified membership. - public async Task ToggleGroupAdminAsync(MembershipUploadViewModel membership) - { - var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membership.MembershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - await ValidateMembershipAsync(membership); - - if (original.PART_CDE == "GUEST") - throw new ArgumentException("A guest cannot be assigned as an admin.", "Participation Level"); - - original.GRP_ADMIN = !original.GRP_ADMIN; - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - } - - /// - /// Switches the privacy property of the person whose membership id is given - /// - /// The membership object passed. - /// The newly modified membership. - public async Task TogglePrivacyAsync(MembershipUploadViewModel membership) - { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membership.MembershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - original.PRIVACY = !original.PRIVACY; - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - } - - - /// - /// Helper method to Validate a membership - /// - /// The membership to validate - /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) - { - var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username.ToString()).Any(); - if (!personExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; - } - var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); - if (!participationExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; - } - var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); - if (!sessionExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; - } - var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); - if (!activityExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; - } - - if (!_context.JNZB_ACTIVITIES.Any(a => a.SESS_CDE == membership.SessCode && a.ACT_CDE.Trim() == membership.ACTCode)) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; - } - - return true; - } - - private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) - { - var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && - x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); - - if (personAlreadyInActivity) - { - throw new ResourceCreationException() { ExceptionMessage = "The Person is already part of the activity." }; - } - - return true; - } - - /// - /// Determines whether or not the given user is a Group Admin of some activity - /// - /// Username of the user to check - /// true if student is a Group Admin, else false - public bool IsGroupAdmin(string username) - { - return _context.MembershipView.Any(membership => membership.Username == username && membership.GroupAdmin == true); - } - - public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null) - { - var memberships = _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode); - - if (participationCode != null) - { - if (participationCode == ParticipationType.GroupAdmin) - { - memberships = memberships.Where(m => m.GroupAdmin == true); - } - else - { - memberships = memberships.Where(m => m.Participation == participationCode.Value); - } - } - - return memberships.Join( - _context.ACCOUNT, - m => m.Username.ToString(), - a => a.AD_Username, - (m, a) => new EmailViewModel { - Email = a.email, - FirstName = a.firstname, - LastName = a.lastname - } - ); - } - - public class ParticipationType - { - private ParticipationType(string value) { Value = value; } - - public string Value { get; private set; } - - public static ParticipationType Leader { get { return new ParticipationType("LEAD"); } } - public static ParticipationType Guest { get { return new ParticipationType("GUEST"); } } - public static ParticipationType Member { get { return new ParticipationType("MEMBR"); } } - public static ParticipationType Advisor { get { return new ParticipationType("ADV"); } } - - // NOTE: Group admin is not strictly a participation type, it's a separate role that Advisors and Leaders can have, with a separate flag in the database - // BUT, it's convenient to treat it as a participation type in several places throughout the API - public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } - } - - private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) - { - var sessionCode = _context.CM_SESSION_MSTR - .Where(x => x.SESS_CDE.Equals(membership.SessCode)) - .FirstOrDefault(); - - return new MEMBERSHIP() { - MEMBERSHIP_ID = membership.MembershipID, - ACT_CDE = membership.ACTCode, - SESS_CDE = membership.SessCode, - ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), - BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, - PART_CDE = membership.PartCode, - COMMENT_TXT = membership.CommentText, - GRP_ADMIN = membership.GroupAdmin, - PRIVACY = membership.Privacy - }; - } - - private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) - { - var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); - - if (foundMembership == null) - { - throw new ResourceCreationException(); - } - - return foundMembership; - } - } +using Gordon360.Models.CCT.Context; +using Gordon360.Exceptions; +using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; +using Gordon360.Static.Methods; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Services +{ + /// + /// Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + /// + public class MembershipService : IMembershipService + { + private readonly CCTContext _context; + private IAccountService _accountService; + + public MembershipService(CCTContext context, IAccountService accountService) + { + _context = context; + _accountService = accountService; + } + + /// + /// Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + /// we do it here by using the validateMembership() method. + /// + /// The membership to be added + /// The newly added Membership object + public async Task AddAsync(MembershipUploadViewModel membership) + { + // validate returns a boolean value. + await ValidateMembershipAsync(membership); + IsPersonAlreadyInActivity(membership); + + + // The Add() method returns the added membership. + var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); + + // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) + if (payload?.Entity == null) + { + throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; + } else + { + await _context.SaveChangesAsync(); + return MEMBERSHIPToMembershipView(payload.Entity); + } + + + } + + /// + /// Delete the membership whose id is specified by the parameter. + /// + /// The membership id + /// The membership that was just deleted + public MembershipView Delete(int membershipID) + { + var result = _context.MEMBERSHIP.Find(membershipID); + if (result == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + MembershipView toReturn = MEMBERSHIPToMembershipView(result); + + _context.MEMBERSHIP.Remove(result); + _context.SaveChanges(); + + return toReturn; + } + + /// + /// Fetch the membership whose id is specified by the parameter + /// + /// The membership id + /// MembershipViewModel if found, null if not found + public MembershipView GetSpecificMembership(int membershipID) + { + MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); + if (result == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + return result; + } + + /// + /// Fetches the memberships associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// Optional code of session to get memberships for + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) + { + //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); + + return _context.MembershipView + .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) + .OrderByDescending(m => m.StartDate); + } + + /// + /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); + } + + /// + /// Fetches the leaders of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetLeaderMembershipsForActivity(string activityCode) + { + var leaderRole = Helpers.GetLeaderRoleCodes(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == leaderRole); + } + + /// + /// Fetches the advisors of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) + { + + var advisorRole = Helpers.GetAdvisorRoleCodes(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == advisorRole); + } + + /// + /// Fetches all the membership information linked to the student whose id appears as a parameter. + /// + /// The student's AD Username. + /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + public IEnumerable GetMembershipsForStudent(string username) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); + } + + /// + /// Fetches the number of followers associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// int. + public int GetActivityFollowersCount(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); + } + + /// + /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// int. + public int GetActivityMembersCount(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); + } + + /// + /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + /// + /// The activity code. + /// The session code + /// int. + public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); + } + + /// + /// Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + /// + /// The activity code. + /// The session code + /// int + public int GetActivityMembersCountForSession(string activityCode, string sessionCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); + } + + /// + /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. + /// + /// The updated membership. + /// The newly modified membership. + public async Task UpdateAsync(int membershipID, MembershipUploadViewModel membership) + { + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + // One can only update certain fields within a membrship + original.COMMENT_TXT = membership.CommentText; + original.PART_CDE = membership.PartCode; + if (membership.PartCode == ParticipationType.Guest.Value) + { + await SetGroupAdminAsync(membershipID, false); + } + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + + } + /// + /// Switches the group-admin property of the person whose membership id is given + /// + /// The corresponding membership object + /// The newly modified membership. + public async Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin) + { + var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + if (original.PART_CDE == "GUEST" && isGroupAdmin) + throw new ArgumentException("A guest cannot be assigned as an admin.", "Participation Level"); + + original.GRP_ADMIN = isGroupAdmin; + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + } + + /// + /// Switches the privacy property of the person whose membership id is given + /// + /// The membership object passed. + /// The newly modified membership. + public async Task SetPrivacyAsync(int membershipID, bool isPrivate) + { + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + original.PRIVACY = isPrivate; + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + } + + + /// + /// Helper method to Validate a membership + /// + /// The membership to validate + /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) + { + var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username).Any(); + if (!personExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; + } + var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); + if (!participationExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; + } + var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); + if (!sessionExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; + } + var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); + if (!activityExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; + } + + if (!_context.InvolvementOffering.Any(i => i.SESS_CDE == membership.SessCode && i.ACT_CDE.Trim() == membership.ACTCode)) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; + } + + return true; + } + + private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) + { + var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && + x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); + + if (personAlreadyInActivity) + { + throw new ResourceCreationException() { ExceptionMessage = "The Person is already part of the activity." }; + } + + return true; + } + + /// + /// Determines whether or not the given user is a Group Admin of some activity + /// + /// Username of the user to check + /// true if student is a Group Admin, else false + public bool IsGroupAdmin(string username) + { + return _context.MembershipView.Any(membership => membership.Username == username && membership.GroupAdmin == true); + } + + public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null) + { + var memberships = _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode); + + if (participationCode != null) + { + if (participationCode == ParticipationType.GroupAdmin) + { + memberships = memberships.Where(m => m.GroupAdmin == true); + } + else + { + memberships = memberships.Where(m => m.Participation == participationCode.Value); + } + } + + return memberships.AsEnumerable().Select(m => + { + var account = _accountService.GetAccountByUsername(m.Username); + return new EmailViewModel + { + Email = account.Email, + FirstName = account.FirstName, + LastName = account.LastName + }; + }); + } + + public class ParticipationType + { + private ParticipationType(string value) { Value = value; } + + public string Value { get; private set; } + + public static ParticipationType Leader { get { return new ParticipationType("LEAD"); } } + public static ParticipationType Guest { get { return new ParticipationType("GUEST"); } } + public static ParticipationType Member { get { return new ParticipationType("MEMBR"); } } + public static ParticipationType Advisor { get { return new ParticipationType("ADV"); } } + + // NOTE: Group admin is not strictly a participation type, it's a separate role that Advisors and Leaders can have, with a separate flag in the database + // BUT, it's convenient to treat it as a participation type in several places throughout the API + public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } + } + + private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) + { + var sessionCode = _context.CM_SESSION_MSTR + .Where(x => x.SESS_CDE.Equals(membership.SessCode)) + .FirstOrDefault(); + + return new MEMBERSHIP() { + ACT_CDE = membership.ACTCode, + SESS_CDE = membership.SessCode, + ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), + BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, + PART_CDE = membership.PartCode, + COMMENT_TXT = membership.CommentText, + GRP_ADMIN = membership.GroupAdmin, + PRIVACY = membership.Privacy + }; + } + + private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) + { + var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); + + if (foundMembership == null) + { + throw new ResourceCreationException(); + } + + return foundMembership; + } + } } \ No newline at end of file diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index cbf0b3dca..aa775a8a7 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -1,307 +1,300 @@ -using Gordon360.Models.CCT; -using Gordon360.Models.MyGordon; -using Gordon360.Models.ViewModels; -using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using static Gordon360.Controllers.WellnessController; -using static Gordon360.Services.MembershipService; - -// -// Namespace with all the Service Interfaces that are to be implemented. I don't think making this interface is required, the services can work fine on their own. -// However, building the interfaces first does give a general sense of structure to their implementations. A certain cohesiveness :p. -// -namespace Gordon360.Services -{ - public interface IProfileService - { - StudentProfileViewModel? GetStudentProfileByUsername(string username); - FacultyStaffProfileViewModel? GetFacultyStaffProfileByUsername(string username); - AlumniProfileViewModel? GetAlumniProfileByUsername(string username); - MailboxViewModel GetMailboxCombination(string username); - DateTime GetBirthdate(string username); - Task> GetAdvisorsAsync(string username); - CliftonStrengthsViewModel? GetCliftonStrengths(int id); - Task ToggleCliftonStrengthsPrivacyAsync(int id); - IEnumerable GetEmergencyContact(string username); - ProfileCustomViewModel? GetCustomUserInfo(string username); - Task GetPhotoPathAsync(string username); - Task UpdateProfileLinkAsync(string username, string type, CUSTOM_PROFILE path); - Task UpdateMobilePhoneNumberAsync(string username, string newMobilePhoneNumber); - Task UpdateMobilePrivacyAsync(string username, string value); - Task UpdateImagePrivacyAsync(string username, string value); - Task UpdateProfileImageAsync(string username, string path, string name); - ProfileViewModel? ComposeProfile(object? student, object? alumni, object? faculty, object? customInfo); - Task InformationChangeRequest(string username, ProfileFieldViewModel[] updatedField); - } - - public interface IAddressesService - { - IEnumerable GetAllStates(); - IEnumerable GetAllCountries(); - } - - public interface IEventService - { - IEnumerable GetEventsForStudentByTerm(string username, string term); - IEnumerable GetAllEvents(); - IEnumerable GetPublicEvents(); - IEnumerable GetCLAWEvents(); - } - - public interface IDiningService - { - DiningViewModel GetDiningPlanInfo(int id, string sessionCode); - } - - public interface IAccountService - { - AccountViewModel GetAccountByID(string id); - IEnumerable GetAll(); - string GetGordonIDFromEmail(string email); - AccountViewModel GetAccountByEmail(string email); - AccountViewModel GetAccountByUsername(string username); - IEnumerable AdvancedSearch(List accountTypes, - string firstname, - string lastname, - string major, - string minor, - string hall, - string classType, - string homeCity, - string state, - string country, - string department, - string building); - Task> GetAllBasicInfoAsync(); - Task> GetAllBasicInfoExceptAlumniAsync(); - } - - public interface IWellnessService - { - WellnessViewModel GetStatus(string username); - WellnessQuestionViewModel GetQuestion(); - WellnessViewModel PostStatus(WellnessStatusColor status, string username); - } - - public interface IDirectMessageService - { - CreateGroupViewModel CreateGroup(String name, bool group, string image, List usernames, SendTextViewModel initialMessage, string userId); - bool SendMessage(SendTextViewModel textInfo, string user_id); - bool StoreUserRooms(String userId, String roomId); - bool StoreUserConnectionIds(String userId, String connectionId); - bool DeleteUserConnectionIds(String connectionId); - List> GetUserConnectionIds(List userIds); - IEnumerable GetMessages(string roomId); - IEnumerable GetRooms(string userId); - List GetRoomById(string userId); - MessageViewModel GetSingleMessage(string messageID, string roomID); - object GetSingleRoom(int roomId); - } - - public interface IActivityService - { - ActivityInfoViewModel Get(string activityCode); - Task> GetActivitiesForSessionAsync(string sessionCode); - Task> GetActivityTypesForSessionAsync(string sessionCode); - IEnumerable GetAll(); - bool IsOpen(string activityCode, string sessionCode); - IEnumerable GetOpenActivities(string sess_cde); - IEnumerable GetOpenActivities(string sess_cde, int gordonID); - IEnumerable GetClosedActivities(string sess_cde); - IEnumerable GetClosedActivities(string sess_cde, int gordonID); - ACT_INFO Update(string activityCode, InvolvementUpdateViewModel activity); - void CloseOutActivityForSession(string activityCode, string sess_cde); - void OpenActivityForSession(string activityCode, string sess_cde); - Task UpdateActivityImageAsync(ACT_INFO involvement, IFormFile image); - void ResetActivityImage(string activityCode); - void TogglePrivacy(string activityCode, bool isPrivate); - } - public interface IVictoryPromiseService - { - Task> GetVPScoresAsync(string username); - } - public interface IStudentEmploymentService - { - Task> GetEmploymentAsync(string username); - } - - public interface IActivityInfoService - { - ActivityInfoViewModel Get(string username); - IEnumerable GetAll(); - } - - public interface IAdministratorService - { - ADMIN Get(int id); - ADMIN Get(string gordon_id); - IEnumerable GetAll(); - ADMIN Add(ADMIN admin); - ADMIN Delete(int id); - } - - public interface IEmailService - { - Task> GetEmailsForActivityAsync(string activityCode, string? sessionCode, ParticipationType? participationType); - void SendEmails(string[] to_emails, string to_email, string subject, string email_content, string password); - Task SendEmailToActivityAsync(string activityCode, string sessionCode, string from_email, string subject, string email_content, string password); - } - - public interface IErrorLogService - { - ERROR_LOG Add(ERROR_LOG error_log); - ERROR_LOG Log(string error_message); - } - - public interface ISessionService - { - SessionViewModel Get(string sessionCode); - public SessionViewModel GetCurrentSession(); - public double[] GetDaysLeft(); - IEnumerable GetAll(); - } - - public interface IJenzibarActivityService - { - JNZB_ACTIVITIES Get(int id); - IEnumerable GetAll(); - } - - - public interface IMembershipService - { - IEnumerable GetLeaderMembershipsForActivity(string activityCode); - IEnumerable GetAdvisorMembershipsForActivity(string activityCode); - IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); - IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); - IEnumerable GetMembershipsForStudent(string username); - int GetActivityFollowersCountForSession(string activityCode, string sessionCode); - int GetActivityMembersCountForSession(string activityCode, string sessionCode); - MembershipView GetSpecificMembership(int membershipID); - int GetActivityFollowersCount(string idactivityCode); - int GetActivityMembersCount(string activityCode); - Task AddAsync(MembershipUploadViewModel membership); - Task UpdateAsync(MembershipUploadViewModel membership); - Task ToggleGroupAdminAsync(MembershipUploadViewModel membership); - Task TogglePrivacyAsync(MembershipUploadViewModel membership); - MembershipView Delete(int membershipID); - bool IsGroupAdmin(string username); - public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); - } - - public interface IJobsService - { - IEnumerable getSavedShiftsForUser(int ID_NUM); - Task SaveShiftForUserAsync(int studentID, int jobID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string shiftNotes, string lastChangedBy); - StudentTimesheetsViewModel EditShift(int rowID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string username); - void DeleteShiftForUser(int rowID, int studentID); - Task SubmitShiftForUserAsync(int studentID, int jobID, DateTime shiftEnd, int submittedTo, string lastChangedBy); - Task> GetsupervisorNameForJobAsync(int supervisorID); - Task> GetActiveJobsAsync(DateTime shiftStart, DateTime shiftEnd, int studentID); - Task> EditShiftOverlapCheckAsync(int studentID, DateTime shiftStart, DateTime shiftEnd, int rowID); - Task> CheckForOverlappingShiftAsync(int studentID, DateTime shiftStart, DateTime shiftEnd); - Task> ClockOutAsync(string id); - Task ClockInAsync(bool state, string id); - Task DeleteClockInAsync(string id); - } - - public interface IParticipationService - { - ParticipationViewModel Get(string id); - IEnumerable GetAll(); - } - - public interface IMembershipRequestService - { - Task GetAsync(int requestID); - Task> GetAllAsync(); - Task> GetMembershipRequestsForActivityAsync(string activityCode); - Task> GetMembershipRequestsForStudentAsync(string usernamne); - REQUEST Add(REQUEST membershipRequest); - REQUEST Update(int requestID, REQUEST membershipRequest); - // The ODD one out. When we approve a request, we would like to get back the new membership. - MEMBERSHIP ApproveRequest(int requestID); - REQUEST DenyRequest(int requestID); - REQUEST Delete(int requestID); - } - public interface IScheduleService - { - Task> GetScheduleStudentAsync(string username); - Task> GetScheduleFacultyAsync(string username); - } - - public interface IScheduleControlService - { - Task UpdateSchedulePrivacyAsync(string username, string value); - Task UpdateDescriptionAsync(string username, string value); - Task UpdateModifiedTimeStampAsync(string username, DateTime value); - } - - public interface IMyScheduleService - { - MYSCHEDULE GetForID(string eventID, string username); - IEnumerable GetAllForUser(string username); - MYSCHEDULE Add(MYSCHEDULE myschedule); - MYSCHEDULE Update(MYSCHEDULE myschedule); - MYSCHEDULE Delete(string eventID, string username); - } - - public interface ISaveService - { - IEnumerable GetUpcoming(string gordon_id); - IEnumerable GetUpcomingForUser(string gordon_id); - Task AddRideAsync(Save_Rides newRide, string gordon_id); - Task DeleteRideAsync(string rideID, string gordon_id); - Task CancelRideAsync(string rideID, string gordon_id); - Task AddBookingAsync(Save_Bookings newBooking); - Task DeleteBookingAsync(string rideID, string gordon_id); - } - - public interface IContentManagementService - { - IEnumerable DEPRECATED_GetSliderContent(); - IEnumerable GetBannerSlides(); - Slider_Images AddBannerSlide(BannerSlidePostViewModel slide, string serverURL, string contentRootPath); - Slider_Images DeleteBannerSlide(int slideID); - } - - public interface INewsService - { - StudentNews Get(int newsID); - Task> GetNewsNotExpiredAsync(); - Task> GetNewsNewAsync(); - IEnumerable GetNewsCategories(); - Task> GetNewsPersonalUnapprovedAsync(string username); - StudentNews SubmitNews(StudentNews newsItem, string username); - StudentNews DeleteNews(int newsID); - StudentNewsViewModel EditPosting(int newsID, StudentNews newsItem); - } - - public interface IHousingService - { - bool CheckIfHousingAdmin(string gordonID); - bool DeleteApplication(int applicationID); - string[] GetAllApartmentHalls(); - string GetEditorUsername(int applicationID); - int? GetApplicationID(string username, string sess_cde); - ApartmentApplicationViewModel GetApartmentApplication(int applicationID, bool isAdmin = false); - ApartmentApplicationViewModel[] GetAllApartmentApplication(); - int SaveApplication(string sess_cde, string editorUsername, List apartmentApplicants, List apartmentChoices); - int EditApplication(string username, string sess_cde, int applicationID, string newEditorUsername, List newApartmentApplicants, List newApartmentChoices); - bool ChangeApplicationEditor(string username, int applicationID, string newEditorUsername); - bool ChangeApplicationDateSubmitted(int applicationID); - } - - public interface IAcademicCheckInService - { - Task PutCellPhoneAsync(string id, AcademicCheckInViewModel data); - Task PutEmergencyContactAsync(EmergencyContactViewModel data, string id, string username); - Task> GetHoldsAsync(string id); - Task SetStatusAsync(string id); - Task PutDemographicAsync(string id, AcademicCheckInViewModel data); - Task GetStatusAsync(string id); - } - -} +using Gordon360.Models.CCT; +using Gordon360.Models.MyGordon; +using Gordon360.Models.ViewModels; +using Microsoft.AspNetCore.Http; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using static Gordon360.Controllers.WellnessController; +using static Gordon360.Services.MembershipService; + +// +// Namespace with all the Service Interfaces that are to be implemented. I don't think making this interface is required, the services can work fine on their own. +// However, building the interfaces first does give a general sense of structure to their implementations. A certain cohesiveness :p. +// +namespace Gordon360.Services +{ + public interface IProfileService + { + StudentProfileViewModel? GetStudentProfileByUsername(string username); + FacultyStaffProfileViewModel? GetFacultyStaffProfileByUsername(string username); + AlumniProfileViewModel? GetAlumniProfileByUsername(string username); + MailboxViewModel GetMailboxCombination(string username); + DateTime GetBirthdate(string username); + Task> GetAdvisorsAsync(string username); + CliftonStrengthsViewModel? GetCliftonStrengths(int id); + Task ToggleCliftonStrengthsPrivacyAsync(int id); + IEnumerable GetEmergencyContact(string username); + ProfileCustomViewModel? GetCustomUserInfo(string username); + Task GetPhotoPathAsync(string username); + Task UpdateProfileLinkAsync(string username, string type, CUSTOM_PROFILE path); + Task UpdateMobilePhoneNumberAsync(string username, string newMobilePhoneNumber); + Task UpdateMobilePrivacyAsync(string username, string value); + Task UpdateImagePrivacyAsync(string username, string value); + Task UpdateProfileImageAsync(string username, string path, string name); + ProfileViewModel? ComposeProfile(object? student, object? alumni, object? faculty, object? customInfo); + Task InformationChangeRequest(string username, ProfileFieldViewModel[] updatedField); + } + + public interface IAddressesService + { + IEnumerable GetAllStates(); + IEnumerable GetAllCountries(); + } + + public interface IEventService + { + IEnumerable GetEventsForStudentByTerm(string username, string term); + IEnumerable GetAllEvents(); + IEnumerable GetPublicEvents(); + IEnumerable GetCLAWEvents(); + } + + public interface IDiningService + { + DiningViewModel GetDiningPlanInfo(int id, string sessionCode); + } + + public interface IAccountService + { + AccountViewModel GetAccountByID(string id); + IEnumerable GetAll(); + string GetGordonIDFromEmail(string email); + AccountViewModel GetAccountByEmail(string email); + AccountViewModel GetAccountByUsername(string username); + IEnumerable AdvancedSearch(List accountTypes, + string firstname, + string lastname, + string major, + string minor, + string hall, + string classType, + string homeCity, + string state, + string country, + string department, + string building); + Task> GetAllBasicInfoAsync(); + Task> GetAllBasicInfoExceptAlumniAsync(); + } + + public interface IWellnessService + { + WellnessViewModel GetStatus(string username); + WellnessQuestionViewModel GetQuestion(); + WellnessViewModel PostStatus(WellnessStatusColor status, string username); + } + + public interface IDirectMessageService + { + CreateGroupViewModel CreateGroup(String name, bool group, string image, List usernames, SendTextViewModel initialMessage, string userId); + bool SendMessage(SendTextViewModel textInfo, string user_id); + bool StoreUserRooms(String userId, String roomId); + bool StoreUserConnectionIds(String userId, String connectionId); + bool DeleteUserConnectionIds(String connectionId); + List> GetUserConnectionIds(List userIds); + IEnumerable GetMessages(string roomId); + IEnumerable GetRooms(string userId); + List GetRoomById(string userId); + MessageViewModel GetSingleMessage(string messageID, string roomID); + object GetSingleRoom(int roomId); + } + + public interface IActivityService + { + ActivityInfoViewModel Get(string activityCode); + Task> GetActivitiesForSessionAsync(string sessionCode); + Task> GetActivityTypesForSessionAsync(string sessionCode); + IEnumerable GetAll(); + bool IsOpen(string activityCode, string sessionCode); + IEnumerable GetOpenActivities(string sess_cde); + IEnumerable GetOpenActivities(string sess_cde, int gordonID); + IEnumerable GetClosedActivities(string sess_cde); + IEnumerable GetClosedActivities(string sess_cde, int gordonID); + ACT_INFO Update(string activityCode, InvolvementUpdateViewModel activity); + void CloseOutActivityForSession(string activityCode, string sess_cde); + void OpenActivityForSession(string activityCode, string sess_cde); + Task UpdateActivityImageAsync(ACT_INFO involvement, IFormFile image); + void ResetActivityImage(string activityCode); + void TogglePrivacy(string activityCode, bool isPrivate); + } + public interface IVictoryPromiseService + { + Task> GetVPScoresAsync(string username); + } + public interface IStudentEmploymentService + { + Task> GetEmploymentAsync(string username); + } + + public interface IActivityInfoService + { + ActivityInfoViewModel Get(string username); + IEnumerable GetAll(); + } + + public interface IAdministratorService + { + ADMIN Get(int id); + ADMIN Get(string gordon_id); + IEnumerable GetAll(); + ADMIN Add(ADMIN admin); + ADMIN Delete(int id); + } + + public interface IEmailService + { + Task> GetEmailsForActivityAsync(string activityCode, string? sessionCode, ParticipationType? participationType); + void SendEmails(string[] to_emails, string to_email, string subject, string email_content, string password); + Task SendEmailToActivityAsync(string activityCode, string sessionCode, string from_email, string subject, string email_content, string password); + } + + public interface IErrorLogService + { + ERROR_LOG Add(ERROR_LOG error_log); + ERROR_LOG Log(string error_message); + } + + public interface ISessionService + { + SessionViewModel Get(string sessionCode); + public SessionViewModel GetCurrentSession(); + public double[] GetDaysLeft(); + IEnumerable GetAll(); + } + + public interface IMembershipService + { + IEnumerable GetLeaderMembershipsForActivity(string activityCode); + IEnumerable GetAdvisorMembershipsForActivity(string activityCode); + IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); + IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); + IEnumerable GetMembershipsForStudent(string username); + int GetActivityFollowersCountForSession(string activityCode, string sessionCode); + int GetActivityMembersCountForSession(string activityCode, string sessionCode); + MembershipView GetSpecificMembership(int membershipID); + int GetActivityFollowersCount(string idactivityCode); + int GetActivityMembersCount(string activityCode); + Task AddAsync(MembershipUploadViewModel membership); + Task UpdateAsync(int membershipID, MembershipUploadViewModel membership); + Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin); + Task SetPrivacyAsync(int membershipID, bool isPrivate); + MembershipView Delete(int membershipID); + bool IsGroupAdmin(string username); + public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); + } + + public interface IJobsService + { + IEnumerable getSavedShiftsForUser(int ID_NUM); + Task SaveShiftForUserAsync(int studentID, int jobID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string shiftNotes, string lastChangedBy); + StudentTimesheetsViewModel EditShift(int rowID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string username); + void DeleteShiftForUser(int rowID, int studentID); + Task SubmitShiftForUserAsync(int studentID, int jobID, DateTime shiftEnd, int submittedTo, string lastChangedBy); + Task> GetsupervisorNameForJobAsync(int supervisorID); + Task> GetActiveJobsAsync(DateTime shiftStart, DateTime shiftEnd, int studentID); + Task> EditShiftOverlapCheckAsync(int studentID, DateTime shiftStart, DateTime shiftEnd, int rowID); + Task> CheckForOverlappingShiftAsync(int studentID, DateTime shiftStart, DateTime shiftEnd); + Task> ClockOutAsync(string id); + Task ClockInAsync(bool state, string id); + Task DeleteClockInAsync(string id); + } + + public interface IParticipationService + { + ParticipationViewModel Get(string id); + IEnumerable GetAll(); + } + + public interface IMembershipRequestService + { + Task GetAsync(int requestID); + Task> GetAllAsync(); + Task> GetMembershipRequestsForActivityAsync(string activityCode); + Task> GetMembershipRequestsForStudentAsync(string usernamne); + REQUEST Add(REQUEST membershipRequest); + REQUEST Update(int requestID, REQUEST membershipRequest); + // The ODD one out. When we approve a request, we would like to get back the new membership. + MEMBERSHIP ApproveRequest(int requestID); + REQUEST DenyRequest(int requestID); + REQUEST Delete(int requestID); + } + public interface IScheduleService + { + Task> GetScheduleStudentAsync(string username); + Task> GetScheduleFacultyAsync(string username); + } + + public interface IScheduleControlService + { + Task UpdateSchedulePrivacyAsync(string username, string value); + Task UpdateDescriptionAsync(string username, string value); + Task UpdateModifiedTimeStampAsync(string username, DateTime value); + } + + public interface IMyScheduleService + { + MYSCHEDULE GetForID(string eventID, string username); + IEnumerable GetAllForUser(string username); + MYSCHEDULE Add(MYSCHEDULE myschedule); + MYSCHEDULE Update(MYSCHEDULE myschedule); + MYSCHEDULE Delete(string eventID, string username); + } + + public interface ISaveService + { + IEnumerable GetUpcoming(string gordon_id); + IEnumerable GetUpcomingForUser(string gordon_id); + Task AddRideAsync(Save_Rides newRide, string gordon_id); + Task DeleteRideAsync(string rideID, string gordon_id); + Task CancelRideAsync(string rideID, string gordon_id); + Task AddBookingAsync(Save_Bookings newBooking); + Task DeleteBookingAsync(string rideID, string gordon_id); + } + + public interface IContentManagementService + { + IEnumerable DEPRECATED_GetSliderContent(); + IEnumerable GetBannerSlides(); + Slider_Images AddBannerSlide(BannerSlidePostViewModel slide, string serverURL, string contentRootPath); + Slider_Images DeleteBannerSlide(int slideID); + } + + public interface INewsService + { + StudentNews Get(int newsID); + Task> GetNewsNotExpiredAsync(); + Task> GetNewsNewAsync(); + IEnumerable GetNewsCategories(); + Task> GetNewsPersonalUnapprovedAsync(string username); + StudentNews SubmitNews(StudentNews newsItem, string username); + StudentNews DeleteNews(int newsID); + StudentNewsViewModel EditPosting(int newsID, StudentNews newsItem); + } + + public interface IHousingService + { + bool CheckIfHousingAdmin(string gordonID); + bool DeleteApplication(int applicationID); + string[] GetAllApartmentHalls(); + string GetEditorUsername(int applicationID); + int? GetApplicationID(string username, string sess_cde); + ApartmentApplicationViewModel GetApartmentApplication(int applicationID, bool isAdmin = false); + ApartmentApplicationViewModel[] GetAllApartmentApplication(); + int SaveApplication(string sess_cde, string editorUsername, List apartmentApplicants, List apartmentChoices); + int EditApplication(string username, string sess_cde, int applicationID, string newEditorUsername, List newApartmentApplicants, List newApartmentChoices); + bool ChangeApplicationEditor(string username, int applicationID, string newEditorUsername); + bool ChangeApplicationDateSubmitted(int applicationID); + } + + public interface IAcademicCheckInService + { + Task PutCellPhoneAsync(string id, AcademicCheckInViewModel data); + Task PutEmergencyContactAsync(EmergencyContactViewModel data, string id, string username); + Task> GetHoldsAsync(string id); + Task SetStatusAsync(string id); + Task PutDemographicAsync(string id, AcademicCheckInViewModel data); + Task GetStatusAsync(string id); + } + +} From 8115d504d7b9e817604f52fa383d4b6063643f8d Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 09:30:45 -0400 Subject: [PATCH 04/49] cleaning up logic for checking matching records --- Gordon360/Authorization/StateYourBusiness.cs | 1567 +++++++++--------- 1 file changed, 780 insertions(+), 787 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index a519868d6..b96cae1ac 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -1,787 +1,780 @@ -using Gordon360.Models.CCT; -using Gordon360.Models.CCT.Context; -using Gordon360.Models.MyGordon.Context; -using Gordon360.Services; -using Gordon360.Static.Methods; -using Gordon360.Static.Names; -using Gordon360.Utilities; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.Extensions.Configuration; - -namespace Gordon360.Authorization -{ - /* Authorization Filter. - * It is actually an action filter masquerading as an authorization filter. This is because I need access to the - * parameters passed to the controller. Authorization Filters don't have that access. Action Filters do. - * - * Because of the nature of how we authorize people, this code might seem very odd, so I'll try to explain. - * Proceed at your own risk. If you can understand this code, you can understand the whole project. - * - * 1st Observation: You can't authorize access to a resource that isn't owned by someone. Resources like Sessions, Participations, - * and Activity Definitions are accessibile by anyone. - * 2nd Observation: To Authorize someone to perform an action on a resource, you need to know the following: - * 1. Who is to be authorized? 2.What resource are they trying to access? 3. What operation are they trying to make on the resource? - * This "algorithm" uses those three points and decides through a series of switch statements if the current user - * is authorized. - */ - public class StateYourBusiness : ActionFilterAttribute - { - // Resource to be accessed: Will get as parameters to the attribute - public string resource { get; set; } - // Operation to be performed: Will get as parameters to the attribute - public string operation { get; set; } - - private ActionExecutingContext context; - private IWebHostEnvironment _webHostEnvironment; - private CCTContext _CCTContext; - private MyGordonContext _MyGordonContext; - private IMembershipService _membershipService; - private IAccountService _accountService; - - // User position at the college and their id. - private IEnumerable user_groups { get; set; } - private string user_id { get; set; } - private string user_name { get; set; } - - public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) - { - context = actionContext; - _webHostEnvironment = context.HttpContext.RequestServices.GetService(); - // Step 1: Who is to be authorized - var authenticatedUser = actionContext.HttpContext.User; - - var optionsBuilderCCT = new DbContextOptionsBuilder(); - optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); - _CCTContext = new CCTContext(optionsBuilderCCT.Options); - - var optionsBuilderMyGordon = new DbContextOptionsBuilder(); - optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); - _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); - - - _accountService = new AccountService(_CCTContext); - _membershipService = new MembershipService(_CCTContext, _accountService); - - user_name = AuthUtils.GetUsername(authenticatedUser); - user_groups = AuthUtils.GetGroups(authenticatedUser); - user_id = _accountService.GetAccountByUsername(user_name).GordonID; - - if (user_groups.Contains(AuthGroup.SiteAdmin)) - { - await next(); - return; - } - - bool isAuthorized = await CanPerformOperationAsync(resource, operation); - if (!isAuthorized) - { - throw new UnauthorizedAccessException("Authorization has been denied for this request."); - } - - await next(); - } - - - private async Task CanPerformOperationAsync(string resource, string operation) - => operation switch - { - Operation.READ_ONE => await CanReadOneAsync(resource), - Operation.READ_ALL => CanReadAll(resource), - Operation.READ_PARTIAL => await CanReadPartialAsync(resource), - Operation.ADD => await CanAddAsync(resource), - Operation.DENY_ALLOW => await CanDenyAllowAsync(resource), - Operation.UPDATE => await CanUpdateAsync(resource), - Operation.DELETE => await CanDeleteAsync(resource), - Operation.READ_PUBLIC => CanReadPublic(resource), - _ => false, - }; - - /* - * Operations - */ - // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't - // Fit in nicely with the REST specification which is why there is a seperate case for them. - private async Task CanDenyAllowAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - - case Resource.MEMBERSHIP_REQUEST: - { - var mrID = (int)context.ActionArguments["id"]; - // Get the view model from the repository - var mrService = new MembershipRequestService(_CCTContext); - var mrToConsider = await mrService.GetAsync(mrID); - // Populate the membershipRequest manually. Omit fields I don't need. - var activityCode = mrToConsider.ActivityCode; - var is_activityLeader = (_membershipService.GetLeaderMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (is_activityLeader) // If user is the leader of the activity that the request is sent to. - return true; - var is_activityAdvisor = (_membershipService.GetAdvisorMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. - return true; - - return false; - } - default: return false; - - } - } - - private async Task CanReadOneAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - case Resource.PROFILE: - return true; - case Resource.EMERGENCY_CONTACT: - if (user_groups.Contains(AuthGroup.Police)) - return true; - else - { - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name.ToLower()); - return isSelf; - } - case Resource.MEMBERSHIP: - return true; - case Resource.MEMBERSHIP_REQUEST: - { - // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; // User_id is an instance variable. - - if (is_mrOwner) // If user owns the request - return true; - - var activityCode = mrToConsider.ActivityCode; - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - - return false; - } - case Resource.STUDENT: - // To add a membership for a student, you need to have the students identifier. - // NOTE: I don't believe the 'student' resource is currently being used in API - { - return true; - } - case Resource.ADVISOR: - return true; - case Resource.ACCOUNT: - { - // Membership group admins can access ID of members using their email - // NOTE: In the future, probably only email addresses should be stored - // in memberships, since we would rather not give students access to - // other students' account information - var isGroupAdmin = _membershipService.IsGroupAdmin(user_name); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - - // faculty and police can access student account information - if (user_groups.Contains(AuthGroup.FacStaff) - || user_groups.Contains(AuthGroup.Police)) - return true; - - return false; - } - case Resource.HOUSING: - { - // The members of the apartment application can only read their application - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - HousingService housingService = new HousingService(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID.Value == requestedApplicationID) - { - return true; - } - return false; - } - case Resource.NEWS: - return true; - default: return false; - - } - } - // For reads that access a group of resources filterd in a specific way - private async Task CanReadPartialAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - case Resource.MEMBERSHIP_BY_ACTIVITY: - { - // Only people that are part of the activity should be able to see members - var activityCode = (string)context.ActionArguments["activityCode"]; - var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); - var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); - if (is_personAMember) - return true; - return false; - } - case Resource.MEMBERSHIP_BY_STUDENT: - { - // Only the person itself or an admin can see someone's memberships - return (string)context.ActionArguments["id"] == user_id; - } - - case Resource.EVENTS_BY_STUDENT_ID: - { - // Only the person itself or an admin can see someone's chapel attendance - var username_requested = context.ActionArguments["username"]; - var is_creditOwner = username_requested.ToString().Equals(user_name); - return is_creditOwner; - } - - - case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: - { - // An activity leader should be able to see the membership requests that belong to the activity he is leading. - var activityCode = (string)context.ActionArguments["id"]; - var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - return false; - } - // Since the API only allows asking for your requests (no ID argument), it's always OK. - case Resource.MEMBERSHIP_REQUEST_BY_STUDENT: - { - return true; - } - case Resource.EMAILS_BY_ACTIVITY: - { - // Anyone can view group-admin and advisor emails - var participationType = context.ActionArguments.ContainsKey("participationType") ? context.ActionArguments["participationType"] : null; - if (participationType != null && participationType.In("group-admin", "advisor", "leader")) - return true; - - // Only leaders, advisors, and group admins - var activityCode = (string?)context.ActionArguments["activityCode"]; - - var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); - var is_activity_leader = leaders.Any(x => x.Username == user_name); - if (is_activity_leader) - return true; - - var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - var is_activityAdvisor = advisors.Any(x => x.Username == user_name); - if (is_activityAdvisor) - return true; - - var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); - if (is_groupAdmin) - return true; - - return false; - } - case Resource.ADVISOR_BY_ACTIVITY: - { - return true; - } - case Resource.LEADER_BY_ACTIVITY: - { - return true; - } - case Resource.GROUP_ADMIN_BY_ACTIVITY: - { - return true; - } - case Resource.NEWS: - { - return true; - } - default: return false; - } - } - private bool CanReadAll(string resource) - { - switch (resource) - { - case Resource.MEMBERSHIP: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.ChapelEvent: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.EVENTS_BY_STUDENT_ID: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - - case Resource.MEMBERSHIP_REQUEST: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.STUDENT: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; // See reasons for this in CanReadOne(). No one (except for super admin) should be able to access student records through - // our API. - case Resource.ADVISOR: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.GROUP_ADMIN: - // User is site-wide admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.ACCOUNT: - return false; - case Resource.ADMIN: - return false; - case Resource.HOUSING: - { - // Only the housing admin and super admin can read all of the received applications. - // Super admin has unrestricted access by default, so no need to check. - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - return false; - } - case Resource.NEWS: - return true; - default: return false; - } - } - - private bool CanReadPublic(string resource) - { - switch (resource) - { - case Resource.SLIDER: - return true; - case Resource.NEWS: - return false; - default: return false; - - } - } - private async Task CanAddAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - { - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - } - case Resource.CLIFTON_STRENGTHS: - { - return user_groups.Contains(AuthGroup.SiteAdmin); - } - - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - // A membership can always be added if it is of type "GUEST" - var isFollower = (membershipToConsider.PART_CDE == Activity_Roles.GUEST) && (user_id == membershipToConsider.ID_NUM.ToString()); - if (isFollower) - return true; - - var activityCode = membershipToConsider.ACT_CDE; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; - if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. - return true; - return false; - } - - case Resource.MEMBERSHIP_REQUEST: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipRequestToConsider = (REQUEST)context.ActionArguments["membershipRequest"]; - // A membership request belonging to the currently logged in student - var is_Owner = (membershipRequestToConsider.ID_NUM.ToString() == user_id); - if (is_Owner) - return true; - // No one should be able to add requests on behalf of another person. - return false; - } - case Resource.STUDENT: - return false; // No one should be able to add students through this API - case Resource.ADVISOR: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; // Only super admin can add Advisors through this API - case Resource.HOUSING_ADMIN: - //only superadmins can add a HOUSING_ADMIN - return false; - case Resource.HOUSING: - { - // The user must be a student and not a member of an existing application - if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - var housingService = new HousingService(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - if (!applicationID.HasValue) - { - return true; - } - return false; - } - return false; - } - case Resource.ADMIN: - return false; - case Resource.ERROR_LOG: - return true; - case Resource.NEWS: - return true; - default: return false; - } - } - private async Task CanUpdateAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - { - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - } - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - - - //var is_membershipLeader = membershipService.GetLeaderMembershipsForActivity(activityCode).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; - //if (is_membershipLeader) - // return true; // Activity Leaders can update memberships of people in their activity. - - //var is_membershipAdvisor = membershipService.GetAdvisorMembershipsForActivity(activityCode).Where(x => x.IDNumber.ToString() == user_id).Count() > 0; - //if (is_membershipAdvisor) - // return true; // Activity Advisors can update memberships of people in their activity. - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Where(x => x.Username == user_name).Count() > 0; - if (isGroupAdmin) - return true; // Activity Advisors can update memberships of people in their activity. - - var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; - if (is_membershipOwner) - { - // Restrict what a regular owner can edit. - var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); - // If they are not trying to change their participation level, then it is ok - if (originalMembership.Participation == membershipToConsider.PART_CDE) - return true; - } - - - return false; - } - - case Resource.MEMBERSHIP_REQUEST: - { - // Once a request is sent, no one should be able to edit its contents. - // If a mistake is made in creating the original request, the user can always delete it and make a new one. - return false; - } - case Resource.MEMBERSHIP_PRIVACY: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipID = (int)context.ActionArguments["id"]; - - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; - if (is_membershipOwner) - return true; - - var activityCode = membershipToConsider.ActivityCode; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - return false; - } - case Resource.STUDENT: - return false; // No one should be able to update a student through this API - case Resource.HOUSING: - { - // The housing admins can update the application information (i.e. probation, offcampus program, etc.) - // If the user is a student, then the user must be on an application and be an editor to update the application - HousingService housingService = new HousingService(_CCTContext); - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - else if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID == requestedApplicationID) - { - string editorUsername = housingService.GetEditorUsername(applicationID.Value); - if (editorUsername.ToLower() == user_name.ToLower()) - return true; - return false; - } - return false; - } - return false; - } - case Resource.ADVISOR: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - - var is_advisor = (_membershipService.GetAdvisorMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (is_advisor) - return true; // Activity Advisors can update memberships of people in their activity. - - return false; - } - case Resource.PROFILE: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); - return isSelf; - } - - case Resource.ACTIVITY_INFO: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var activityCode = (string)context.ActionArguments["id"]; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - return false; - - } - - case Resource.ACTIVITY_STATUS: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var activityCode = (string)context.ActionArguments["id"]; - var sessionCode = (string)context.ActionArguments["sess_cde"]; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - { - var activityService = context.HttpContext.RequestServices.GetRequiredService(); - // If an activity is currently open, then a group admin has the ability to close it - if (activityService.IsOpen(activityCode, sessionCode)) - { - return true; - } - } - - // If an activity is currently closed, only super admin has permission to edit its closed/open status - - return false; - } - case Resource.EMERGENCY_CONTACT: - { - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); - return isSelf; - } - - case Resource.NEWS: - var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); - // only unapproved posts may be updated - var approved = newsItem.Accepted; - if (approved == null || approved == true) - return false; - // can update if user is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // can update if user is news item author - string newsAuthor = newsItem.ADUN; - if (user_name == newsAuthor) - return true; - return false; - default: return false; - } - } - private async Task CanDeleteAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipID = (int)context.ActionArguments["id"]; - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; - if (is_membershipOwner) - return true; - - var activityCode = membershipToConsider.ActivityCode; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - return false; - } - case Resource.MEMBERSHIP_REQUEST: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; - if (is_mrOwner) - return true; - - var activityCode = mrToConsider.ActivityCode; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - - return false; - } - case Resource.STUDENT: - return false; // No one should be able to delete a student through our API - case Resource.HOUSING: - { - // The housing admins can update the application information (i.e. probation, offcampus program, etc.) - // If the user is a student, then the user must be on an application and be an editor to update the application - HousingService housingService = new HousingService(_CCTContext); - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - else if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID.Value == requestedApplicationID) - { - var editorUsername = housingService.GetEditorUsername(applicationID.Value); - if (editorUsername.ToLower() == user_name.ToLower()) - return true; - return false; - } - return false; - } - return false; - } - case Resource.ADVISOR: - return false; - case Resource.ADMIN: - return false; - case Resource.HOUSING_ADMIN: - { - // Only the superadmins can remove a housing admin from the whitelist - // Super admins have unrestricted access by default: no need to check - return false; - } - case Resource.NEWS: - { - var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); - // only expired news items may be deleted - var newsDate = newsItem.Entered; - if (!newsDate.HasValue || (System.DateTime.Now - newsDate.Value).Days >= 14) - { - return false; - } - // user is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // user is news item author - string newsAuthor = newsItem.ADUN; - if (user_name == newsAuthor) - return true; - return false; - } - case Resource.SLIDER: - { - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - return false; - } - default: return false; - } - } - - - } -} +using Gordon360.Models.CCT; +using Gordon360.Models.CCT.Context; +using Gordon360.Models.MyGordon.Context; +using Gordon360.Services; +using Gordon360.Static.Methods; +using Gordon360.Static.Names; +using Gordon360.Utilities; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; + +namespace Gordon360.Authorization +{ + /* Authorization Filter. + * It is actually an action filter masquerading as an authorization filter. This is because I need access to the + * parameters passed to the controller. Authorization Filters don't have that access. Action Filters do. + * + * Because of the nature of how we authorize people, this code might seem very odd, so I'll try to explain. + * Proceed at your own risk. If you can understand this code, you can understand the whole project. + * + * 1st Observation: You can't authorize access to a resource that isn't owned by someone. Resources like Sessions, Participations, + * and Activity Definitions are accessibile by anyone. + * 2nd Observation: To Authorize someone to perform an action on a resource, you need to know the following: + * 1. Who is to be authorized? 2.What resource are they trying to access? 3. What operation are they trying to make on the resource? + * This "algorithm" uses those three points and decides through a series of switch statements if the current user + * is authorized. + */ + public class StateYourBusiness : ActionFilterAttribute + { + // Resource to be accessed: Will get as parameters to the attribute + public string resource { get; set; } + // Operation to be performed: Will get as parameters to the attribute + public string operation { get; set; } + + private ActionExecutingContext context; + private IWebHostEnvironment _webHostEnvironment; + private CCTContext _CCTContext; + private MyGordonContext _MyGordonContext; + private IMembershipService _membershipService; + private IAccountService _accountService; + + // User position at the college and their id. + private IEnumerable user_groups { get; set; } + private string user_id { get; set; } + private string user_name { get; set; } + + public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) + { + context = actionContext; + _webHostEnvironment = context.HttpContext.RequestServices.GetService(); + // Step 1: Who is to be authorized + var authenticatedUser = actionContext.HttpContext.User; + + var optionsBuilderCCT = new DbContextOptionsBuilder(); + optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); + _CCTContext = new CCTContext(optionsBuilderCCT.Options); + + var optionsBuilderMyGordon = new DbContextOptionsBuilder(); + optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); + _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); + + + _accountService = new AccountService(_CCTContext); + _membershipService = new MembershipService(_CCTContext, _accountService); + + user_name = AuthUtils.GetUsername(authenticatedUser); + user_groups = AuthUtils.GetGroups(authenticatedUser); + user_id = _accountService.GetAccountByUsername(user_name).GordonID; + + if (user_groups.Contains(AuthGroup.SiteAdmin)) + { + await next(); + return; + } + + bool isAuthorized = await CanPerformOperationAsync(resource, operation); + if (!isAuthorized) + { + throw new UnauthorizedAccessException("Authorization has been denied for this request."); + } + + await next(); + } + + + private async Task CanPerformOperationAsync(string resource, string operation) + => operation switch + { + Operation.READ_ONE => await CanReadOneAsync(resource), + Operation.READ_ALL => CanReadAll(resource), + Operation.READ_PARTIAL => await CanReadPartialAsync(resource), + Operation.ADD => await CanAddAsync(resource), + Operation.DENY_ALLOW => await CanDenyAllowAsync(resource), + Operation.UPDATE => await CanUpdateAsync(resource), + Operation.DELETE => await CanDeleteAsync(resource), + Operation.READ_PUBLIC => CanReadPublic(resource), + _ => false, + }; + + /* + * Operations + */ + // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't + // Fit in nicely with the REST specification which is why there is a seperate case for them. + private async Task CanDenyAllowAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + + case Resource.MEMBERSHIP_REQUEST: + { + var mrID = (int)context.ActionArguments["id"]; + // Get the view model from the repository + var mrService = new MembershipRequestService(_CCTContext); + var mrToConsider = await mrService.GetAsync(mrID); + // Populate the membershipRequest manually. Omit fields I don't need. + var activityCode = mrToConsider.ActivityCode; + var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_activityLeader) // If user is the leader of the activity that the request is sent to. + return true; + var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. + return true; + + return false; + } + default: return false; + + } + } + + private async Task CanReadOneAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + case Resource.PROFILE: + return true; + case Resource.EMERGENCY_CONTACT: + if (user_groups.Contains(AuthGroup.Police)) + return true; + else + { + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name.ToLower()); + return isSelf; + } + case Resource.MEMBERSHIP: + return true; + case Resource.MEMBERSHIP_REQUEST: + { + // membershipRequest = mr + var mrService = new MembershipRequestService(_CCTContext); + var mrID = (int)context.ActionArguments["id"]; + var mrToConsider = await mrService.GetAsync(mrID); + var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; // User_id is an instance variable. + + if (is_mrOwner) // If user owns the request + return true; + + var activityCode = mrToConsider.ActivityCode; + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + + return false; + } + case Resource.STUDENT: + // To add a membership for a student, you need to have the students identifier. + // NOTE: I don't believe the 'student' resource is currently being used in API + { + return true; + } + case Resource.ADVISOR: + return true; + case Resource.ACCOUNT: + { + // Membership group admins can access ID of members using their email + // NOTE: In the future, probably only email addresses should be stored + // in memberships, since we would rather not give students access to + // other students' account information + var isGroupAdmin = _membershipService.IsGroupAdmin(user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + + // faculty and police can access student account information + if (user_groups.Contains(AuthGroup.FacStaff) + || user_groups.Contains(AuthGroup.Police)) + return true; + + return false; + } + case Resource.HOUSING: + { + // The members of the apartment application can only read their application + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + HousingService housingService = new HousingService(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID.Value == requestedApplicationID) + { + return true; + } + return false; + } + case Resource.NEWS: + return true; + default: return false; + + } + } + // For reads that access a group of resources filterd in a specific way + private async Task CanReadPartialAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + case Resource.MEMBERSHIP_BY_ACTIVITY: + { + // Only people that are part of the activity should be able to see members + var activityCode = (string)context.ActionArguments["activityCode"]; + var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); + var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); + if (is_personAMember) + return true; + return false; + } + case Resource.MEMBERSHIP_BY_STUDENT: + { + // Only the person itself or an admin can see someone's memberships + return (string)context.ActionArguments["id"] == user_id; + } + + case Resource.EVENTS_BY_STUDENT_ID: + { + // Only the person itself or an admin can see someone's chapel attendance + var username_requested = context.ActionArguments["username"]; + var is_creditOwner = username_requested.ToString().Equals(user_name); + return is_creditOwner; + } + + + case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: + { + // An activity leader should be able to see the membership requests that belong to the activity he is leading. + var activityCode = (string)context.ActionArguments["id"]; + var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + return false; + } + // Since the API only allows asking for your requests (no ID argument), it's always OK. + case Resource.MEMBERSHIP_REQUEST_BY_STUDENT: + { + return true; + } + case Resource.EMAILS_BY_ACTIVITY: + { + // Anyone can view group-admin and advisor emails + var participationType = context.ActionArguments.ContainsKey("participationType") ? context.ActionArguments["participationType"] : null; + if (participationType != null && participationType.In("group-admin", "advisor", "leader")) + return true; + + // Only leaders, advisors, and group admins + var activityCode = (string?)context.ActionArguments["activityCode"]; + + var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); + var is_activity_leader = leaders.Any(x => x.Username == user_name); + if (is_activity_leader) + return true; + + var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); + var is_activityAdvisor = advisors.Any(x => x.Username == user_name); + if (is_activityAdvisor) + return true; + + var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); + if (is_groupAdmin) + return true; + + return false; + } + case Resource.ADVISOR_BY_ACTIVITY: + { + return true; + } + case Resource.LEADER_BY_ACTIVITY: + { + return true; + } + case Resource.GROUP_ADMIN_BY_ACTIVITY: + { + return true; + } + case Resource.NEWS: + { + return true; + } + default: return false; + } + } + private bool CanReadAll(string resource) + { + switch (resource) + { + case Resource.MEMBERSHIP: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.ChapelEvent: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.EVENTS_BY_STUDENT_ID: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + + case Resource.MEMBERSHIP_REQUEST: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.STUDENT: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; // See reasons for this in CanReadOne(). No one (except for super admin) should be able to access student records through + // our API. + case Resource.ADVISOR: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.GROUP_ADMIN: + // User is site-wide admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.ACCOUNT: + return false; + case Resource.ADMIN: + return false; + case Resource.HOUSING: + { + // Only the housing admin and super admin can read all of the received applications. + // Super admin has unrestricted access by default, so no need to check. + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + return false; + } + case Resource.NEWS: + return true; + default: return false; + } + } + + private bool CanReadPublic(string resource) + { + switch (resource) + { + case Resource.SLIDER: + return true; + case Resource.NEWS: + return false; + default: return false; + + } + } + private async Task CanAddAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + { + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + } + case Resource.CLIFTON_STRENGTHS: + { + return user_groups.Contains(AuthGroup.SiteAdmin); + } + + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + // A membership can always be added if it is of type "GUEST" + var isFollower = membershipToConsider.PART_CDE == Activity_Roles.GUEST && user_id == membershipToConsider.ID_NUM.ToString(); + if (isFollower) + return true; + + var activityCode = membershipToConsider.ACT_CDE; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. + return true; + return false; + } + + case Resource.MEMBERSHIP_REQUEST: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipRequestToConsider = (REQUEST)context.ActionArguments["membershipRequest"]; + // A membership request belonging to the currently logged in student + var is_Owner = membershipRequestToConsider.ID_NUM.ToString() == user_id; + if (is_Owner) + return true; + // No one should be able to add requests on behalf of another person. + return false; + } + case Resource.STUDENT: + return false; // No one should be able to add students through this API + case Resource.ADVISOR: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; // Only super admin can add Advisors through this API + case Resource.HOUSING_ADMIN: + //only superadmins can add a HOUSING_ADMIN + return false; + case Resource.HOUSING: + { + // The user must be a student and not a member of an existing application + if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + var housingService = new HousingService(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + if (!applicationID.HasValue) + { + return true; + } + return false; + } + return false; + } + case Resource.ADMIN: + return false; + case Resource.ERROR_LOG: + return true; + case Resource.NEWS: + return true; + default: return false; + } + } + private async Task CanUpdateAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + { + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + } + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + var activityCode = membershipToConsider.ACT_CDE; + + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; // Activity Advisors can update memberships of people in their activity. + + var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; + if (is_membershipOwner) + { + // Restrict what a regular owner can edit. + var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); + // If they are not trying to change their participation level, then it is ok + if (originalMembership.Participation == membershipToConsider.PART_CDE) + return true; + } + + + return false; + } + + case Resource.MEMBERSHIP_REQUEST: + { + // Once a request is sent, no one should be able to edit its contents. + // If a mistake is made in creating the original request, the user can always delete it and make a new one. + return false; + } + case Resource.MEMBERSHIP_PRIVACY: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipID = (int)context.ActionArguments["id"]; + + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; + + var activityCode = membershipToConsider.ActivityCode; + + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + return false; + } + case Resource.STUDENT: + return false; // No one should be able to update a student through this API + case Resource.HOUSING: + { + // The housing admins can update the application information (i.e. probation, offcampus program, etc.) + // If the user is a student, then the user must be on an application and be an editor to update the application + HousingService housingService = new HousingService(_CCTContext); + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + else if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID == requestedApplicationID) + { + string editorUsername = housingService.GetEditorUsername(applicationID.Value); + if (editorUsername.ToLower() == user_name.ToLower()) + return true; + return false; + } + return false; + } + return false; + } + case Resource.ADVISOR: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + var activityCode = membershipToConsider.ACT_CDE; + + var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_advisor) + return true; // Activity Advisors can update memberships of people in their activity. + + return false; + } + case Resource.PROFILE: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name); + return isSelf; + } + + case Resource.ACTIVITY_INFO: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var activityCode = (string)context.ActionArguments["id"]; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + return false; + + } + + case Resource.ACTIVITY_STATUS: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var activityCode = (string)context.ActionArguments["id"]; + var sessionCode = (string)context.ActionArguments["sess_cde"]; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + { + var activityService = context.HttpContext.RequestServices.GetRequiredService(); + // If an activity is currently open, then a group admin has the ability to close it + if (activityService.IsOpen(activityCode, sessionCode)) + { + return true; + } + } + + // If an activity is currently closed, only super admin has permission to edit its closed/open status + + return false; + } + case Resource.EMERGENCY_CONTACT: + { + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name); + return isSelf; + } + + case Resource.NEWS: + var newsID = context.ActionArguments["newsID"]; + var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); + var newsItem = newsService.Get((int)newsID); + // only unapproved posts may be updated + var approved = newsItem.Accepted; + if (approved == null || approved == true) + return false; + // can update if user is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // can update if user is news item author + string newsAuthor = newsItem.ADUN; + if (user_name == newsAuthor) + return true; + return false; + default: return false; + } + } + private async Task CanDeleteAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipID = (int)context.ActionArguments["id"]; + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; + + var activityCode = membershipToConsider.ActivityCode; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + return false; + } + case Resource.MEMBERSHIP_REQUEST: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // membershipRequest = mr + var mrService = new MembershipRequestService(_CCTContext); + var mrID = (int)context.ActionArguments["id"]; + var mrToConsider = await mrService.GetAsync(mrID); + var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; + if (is_mrOwner) + return true; + + var activityCode = mrToConsider.ActivityCode; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + + return false; + } + case Resource.STUDENT: + return false; // No one should be able to delete a student through our API + case Resource.HOUSING: + { + // The housing admins can update the application information (i.e. probation, offcampus program, etc.) + // If the user is a student, then the user must be on an application and be an editor to update the application + HousingService housingService = new HousingService(_CCTContext); + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + else if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID.Value == requestedApplicationID) + { + var editorUsername = housingService.GetEditorUsername(applicationID.Value); + if (editorUsername.ToLower() == user_name.ToLower()) + return true; + return false; + } + return false; + } + return false; + } + case Resource.ADVISOR: + return false; + case Resource.ADMIN: + return false; + case Resource.HOUSING_ADMIN: + { + // Only the superadmins can remove a housing admin from the whitelist + // Super admins have unrestricted access by default: no need to check + return false; + } + case Resource.NEWS: + { + var newsID = context.ActionArguments["newsID"]; + var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); + var newsItem = newsService.Get((int)newsID); + // only expired news items may be deleted + var newsDate = newsItem.Entered; + if (!newsDate.HasValue || (System.DateTime.Now - newsDate.Value).Days >= 14) + { + return false; + } + // user is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // user is news item author + string newsAuthor = newsItem.ADUN; + if (user_name == newsAuthor) + return true; + return false; + } + case Resource.SLIDER: + { + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + return false; + } + default: return false; + } + } + + + } +} From ea077cb6625b65cdf6b2026b58e13217075b9a13 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 09:34:33 -0400 Subject: [PATCH 05/49] Switching to LF --- Gordon360/Authorization/StateYourBusiness.cs | 1560 +++++++++--------- 1 file changed, 780 insertions(+), 780 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index b96cae1ac..b94961133 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -1,780 +1,780 @@ -using Gordon360.Models.CCT; -using Gordon360.Models.CCT.Context; -using Gordon360.Models.MyGordon.Context; -using Gordon360.Services; -using Gordon360.Static.Methods; -using Gordon360.Static.Names; -using Gordon360.Utilities; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.Extensions.Configuration; - -namespace Gordon360.Authorization -{ - /* Authorization Filter. - * It is actually an action filter masquerading as an authorization filter. This is because I need access to the - * parameters passed to the controller. Authorization Filters don't have that access. Action Filters do. - * - * Because of the nature of how we authorize people, this code might seem very odd, so I'll try to explain. - * Proceed at your own risk. If you can understand this code, you can understand the whole project. - * - * 1st Observation: You can't authorize access to a resource that isn't owned by someone. Resources like Sessions, Participations, - * and Activity Definitions are accessibile by anyone. - * 2nd Observation: To Authorize someone to perform an action on a resource, you need to know the following: - * 1. Who is to be authorized? 2.What resource are they trying to access? 3. What operation are they trying to make on the resource? - * This "algorithm" uses those three points and decides through a series of switch statements if the current user - * is authorized. - */ - public class StateYourBusiness : ActionFilterAttribute - { - // Resource to be accessed: Will get as parameters to the attribute - public string resource { get; set; } - // Operation to be performed: Will get as parameters to the attribute - public string operation { get; set; } - - private ActionExecutingContext context; - private IWebHostEnvironment _webHostEnvironment; - private CCTContext _CCTContext; - private MyGordonContext _MyGordonContext; - private IMembershipService _membershipService; - private IAccountService _accountService; - - // User position at the college and their id. - private IEnumerable user_groups { get; set; } - private string user_id { get; set; } - private string user_name { get; set; } - - public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) - { - context = actionContext; - _webHostEnvironment = context.HttpContext.RequestServices.GetService(); - // Step 1: Who is to be authorized - var authenticatedUser = actionContext.HttpContext.User; - - var optionsBuilderCCT = new DbContextOptionsBuilder(); - optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); - _CCTContext = new CCTContext(optionsBuilderCCT.Options); - - var optionsBuilderMyGordon = new DbContextOptionsBuilder(); - optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); - _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); - - - _accountService = new AccountService(_CCTContext); - _membershipService = new MembershipService(_CCTContext, _accountService); - - user_name = AuthUtils.GetUsername(authenticatedUser); - user_groups = AuthUtils.GetGroups(authenticatedUser); - user_id = _accountService.GetAccountByUsername(user_name).GordonID; - - if (user_groups.Contains(AuthGroup.SiteAdmin)) - { - await next(); - return; - } - - bool isAuthorized = await CanPerformOperationAsync(resource, operation); - if (!isAuthorized) - { - throw new UnauthorizedAccessException("Authorization has been denied for this request."); - } - - await next(); - } - - - private async Task CanPerformOperationAsync(string resource, string operation) - => operation switch - { - Operation.READ_ONE => await CanReadOneAsync(resource), - Operation.READ_ALL => CanReadAll(resource), - Operation.READ_PARTIAL => await CanReadPartialAsync(resource), - Operation.ADD => await CanAddAsync(resource), - Operation.DENY_ALLOW => await CanDenyAllowAsync(resource), - Operation.UPDATE => await CanUpdateAsync(resource), - Operation.DELETE => await CanDeleteAsync(resource), - Operation.READ_PUBLIC => CanReadPublic(resource), - _ => false, - }; - - /* - * Operations - */ - // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't - // Fit in nicely with the REST specification which is why there is a seperate case for them. - private async Task CanDenyAllowAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - - case Resource.MEMBERSHIP_REQUEST: - { - var mrID = (int)context.ActionArguments["id"]; - // Get the view model from the repository - var mrService = new MembershipRequestService(_CCTContext); - var mrToConsider = await mrService.GetAsync(mrID); - // Populate the membershipRequest manually. Omit fields I don't need. - var activityCode = mrToConsider.ActivityCode; - var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (is_activityLeader) // If user is the leader of the activity that the request is sent to. - return true; - var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. - return true; - - return false; - } - default: return false; - - } - } - - private async Task CanReadOneAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - case Resource.PROFILE: - return true; - case Resource.EMERGENCY_CONTACT: - if (user_groups.Contains(AuthGroup.Police)) - return true; - else - { - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name.ToLower()); - return isSelf; - } - case Resource.MEMBERSHIP: - return true; - case Resource.MEMBERSHIP_REQUEST: - { - // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; // User_id is an instance variable. - - if (is_mrOwner) // If user owns the request - return true; - - var activityCode = mrToConsider.ActivityCode; - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - - return false; - } - case Resource.STUDENT: - // To add a membership for a student, you need to have the students identifier. - // NOTE: I don't believe the 'student' resource is currently being used in API - { - return true; - } - case Resource.ADVISOR: - return true; - case Resource.ACCOUNT: - { - // Membership group admins can access ID of members using their email - // NOTE: In the future, probably only email addresses should be stored - // in memberships, since we would rather not give students access to - // other students' account information - var isGroupAdmin = _membershipService.IsGroupAdmin(user_name); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - - // faculty and police can access student account information - if (user_groups.Contains(AuthGroup.FacStaff) - || user_groups.Contains(AuthGroup.Police)) - return true; - - return false; - } - case Resource.HOUSING: - { - // The members of the apartment application can only read their application - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - HousingService housingService = new HousingService(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID.Value == requestedApplicationID) - { - return true; - } - return false; - } - case Resource.NEWS: - return true; - default: return false; - - } - } - // For reads that access a group of resources filterd in a specific way - private async Task CanReadPartialAsync(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - case Resource.MEMBERSHIP_BY_ACTIVITY: - { - // Only people that are part of the activity should be able to see members - var activityCode = (string)context.ActionArguments["activityCode"]; - var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); - var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); - if (is_personAMember) - return true; - return false; - } - case Resource.MEMBERSHIP_BY_STUDENT: - { - // Only the person itself or an admin can see someone's memberships - return (string)context.ActionArguments["id"] == user_id; - } - - case Resource.EVENTS_BY_STUDENT_ID: - { - // Only the person itself or an admin can see someone's chapel attendance - var username_requested = context.ActionArguments["username"]; - var is_creditOwner = username_requested.ToString().Equals(user_name); - return is_creditOwner; - } - - - case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: - { - // An activity leader should be able to see the membership requests that belong to the activity he is leading. - var activityCode = (string)context.ActionArguments["id"]; - var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; - return false; - } - // Since the API only allows asking for your requests (no ID argument), it's always OK. - case Resource.MEMBERSHIP_REQUEST_BY_STUDENT: - { - return true; - } - case Resource.EMAILS_BY_ACTIVITY: - { - // Anyone can view group-admin and advisor emails - var participationType = context.ActionArguments.ContainsKey("participationType") ? context.ActionArguments["participationType"] : null; - if (participationType != null && participationType.In("group-admin", "advisor", "leader")) - return true; - - // Only leaders, advisors, and group admins - var activityCode = (string?)context.ActionArguments["activityCode"]; - - var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); - var is_activity_leader = leaders.Any(x => x.Username == user_name); - if (is_activity_leader) - return true; - - var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - var is_activityAdvisor = advisors.Any(x => x.Username == user_name); - if (is_activityAdvisor) - return true; - - var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); - if (is_groupAdmin) - return true; - - return false; - } - case Resource.ADVISOR_BY_ACTIVITY: - { - return true; - } - case Resource.LEADER_BY_ACTIVITY: - { - return true; - } - case Resource.GROUP_ADMIN_BY_ACTIVITY: - { - return true; - } - case Resource.NEWS: - { - return true; - } - default: return false; - } - } - private bool CanReadAll(string resource) - { - switch (resource) - { - case Resource.MEMBERSHIP: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.ChapelEvent: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.EVENTS_BY_STUDENT_ID: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - - case Resource.MEMBERSHIP_REQUEST: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.STUDENT: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; // See reasons for this in CanReadOne(). No one (except for super admin) should be able to access student records through - // our API. - case Resource.ADVISOR: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.GROUP_ADMIN: - // User is site-wide admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; - case Resource.ACCOUNT: - return false; - case Resource.ADMIN: - return false; - case Resource.HOUSING: - { - // Only the housing admin and super admin can read all of the received applications. - // Super admin has unrestricted access by default, so no need to check. - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - return false; - } - case Resource.NEWS: - return true; - default: return false; - } - } - - private bool CanReadPublic(string resource) - { - switch (resource) - { - case Resource.SLIDER: - return true; - case Resource.NEWS: - return false; - default: return false; - - } - } - private async Task CanAddAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - { - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - } - case Resource.CLIFTON_STRENGTHS: - { - return user_groups.Contains(AuthGroup.SiteAdmin); - } - - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - // A membership can always be added if it is of type "GUEST" - var isFollower = membershipToConsider.PART_CDE == Activity_Roles.GUEST && user_id == membershipToConsider.ID_NUM.ToString(); - if (isFollower) - return true; - - var activityCode = membershipToConsider.ACT_CDE; - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. - return true; - return false; - } - - case Resource.MEMBERSHIP_REQUEST: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipRequestToConsider = (REQUEST)context.ActionArguments["membershipRequest"]; - // A membership request belonging to the currently logged in student - var is_Owner = membershipRequestToConsider.ID_NUM.ToString() == user_id; - if (is_Owner) - return true; - // No one should be able to add requests on behalf of another person. - return false; - } - case Resource.STUDENT: - return false; // No one should be able to add students through this API - case Resource.ADVISOR: - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - else - return false; // Only super admin can add Advisors through this API - case Resource.HOUSING_ADMIN: - //only superadmins can add a HOUSING_ADMIN - return false; - case Resource.HOUSING: - { - // The user must be a student and not a member of an existing application - if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - var housingService = new HousingService(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - if (!applicationID.HasValue) - { - return true; - } - return false; - } - return false; - } - case Resource.ADMIN: - return false; - case Resource.ERROR_LOG: - return true; - case Resource.NEWS: - return true; - default: return false; - } - } - private async Task CanUpdateAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - { - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - } - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; // Activity Advisors can update memberships of people in their activity. - - var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; - if (is_membershipOwner) - { - // Restrict what a regular owner can edit. - var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); - // If they are not trying to change their participation level, then it is ok - if (originalMembership.Participation == membershipToConsider.PART_CDE) - return true; - } - - - return false; - } - - case Resource.MEMBERSHIP_REQUEST: - { - // Once a request is sent, no one should be able to edit its contents. - // If a mistake is made in creating the original request, the user can always delete it and make a new one. - return false; - } - case Resource.MEMBERSHIP_PRIVACY: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipID = (int)context.ActionArguments["id"]; - - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; - if (is_membershipOwner) - return true; - - var activityCode = membershipToConsider.ActivityCode; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - return false; - } - case Resource.STUDENT: - return false; // No one should be able to update a student through this API - case Resource.HOUSING: - { - // The housing admins can update the application information (i.e. probation, offcampus program, etc.) - // If the user is a student, then the user must be on an application and be an editor to update the application - HousingService housingService = new HousingService(_CCTContext); - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - else if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID == requestedApplicationID) - { - string editorUsername = housingService.GetEditorUsername(applicationID.Value); - if (editorUsername.ToLower() == user_name.ToLower()) - return true; - return false; - } - return false; - } - return false; - } - case Resource.ADVISOR: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - - var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (is_advisor) - return true; // Activity Advisors can update memberships of people in their activity. - - return false; - } - case Resource.PROFILE: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); - return isSelf; - } - - case Resource.ACTIVITY_INFO: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var activityCode = (string)context.ActionArguments["id"]; - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - return false; - - } - - case Resource.ACTIVITY_STATUS: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var activityCode = (string)context.ActionArguments["id"]; - var sessionCode = (string)context.ActionArguments["sess_cde"]; - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) - { - var activityService = context.HttpContext.RequestServices.GetRequiredService(); - // If an activity is currently open, then a group admin has the ability to close it - if (activityService.IsOpen(activityCode, sessionCode)) - { - return true; - } - } - - // If an activity is currently closed, only super admin has permission to edit its closed/open status - - return false; - } - case Resource.EMERGENCY_CONTACT: - { - var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); - return isSelf; - } - - case Resource.NEWS: - var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); - // only unapproved posts may be updated - var approved = newsItem.Accepted; - if (approved == null || approved == true) - return false; - // can update if user is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // can update if user is news item author - string newsAuthor = newsItem.ADUN; - if (user_name == newsAuthor) - return true; - return false; - default: return false; - } - } - private async Task CanDeleteAsync(string resource) - { - switch (resource) - { - case Resource.SHIFT: - if (user_groups.Contains(AuthGroup.Student)) - return true; - return false; - case Resource.MEMBERSHIP: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipID = (int)context.ActionArguments["id"]; - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; - if (is_membershipOwner) - return true; - - var activityCode = membershipToConsider.ActivityCode; - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - return false; - } - case Resource.MEMBERSHIP_REQUEST: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; - if (is_mrOwner) - return true; - - var activityCode = mrToConsider.ActivityCode; - - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; - - - return false; - } - case Resource.STUDENT: - return false; // No one should be able to delete a student through our API - case Resource.HOUSING: - { - // The housing admins can update the application information (i.e. probation, offcampus program, etc.) - // If the user is a student, then the user must be on an application and be an editor to update the application - HousingService housingService = new HousingService(_CCTContext); - if (user_groups.Contains(AuthGroup.HousingAdmin)) - { - return true; - } - else if (user_groups.Contains(AuthGroup.Student)) - { - var sess_cde = Helpers.GetCurrentSession(_CCTContext); - int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID.Value == requestedApplicationID) - { - var editorUsername = housingService.GetEditorUsername(applicationID.Value); - if (editorUsername.ToLower() == user_name.ToLower()) - return true; - return false; - } - return false; - } - return false; - } - case Resource.ADVISOR: - return false; - case Resource.ADMIN: - return false; - case Resource.HOUSING_ADMIN: - { - // Only the superadmins can remove a housing admin from the whitelist - // Super admins have unrestricted access by default: no need to check - return false; - } - case Resource.NEWS: - { - var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); - // only expired news items may be deleted - var newsDate = newsItem.Entered; - if (!newsDate.HasValue || (System.DateTime.Now - newsDate.Value).Days >= 14) - { - return false; - } - // user is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - // user is news item author - string newsAuthor = newsItem.ADUN; - if (user_name == newsAuthor) - return true; - return false; - } - case Resource.SLIDER: - { - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - return false; - } - default: return false; - } - } - - - } -} +using Gordon360.Models.CCT; +using Gordon360.Models.CCT.Context; +using Gordon360.Models.MyGordon.Context; +using Gordon360.Services; +using Gordon360.Static.Methods; +using Gordon360.Static.Names; +using Gordon360.Utilities; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; + +namespace Gordon360.Authorization +{ + /* Authorization Filter. + * It is actually an action filter masquerading as an authorization filter. This is because I need access to the + * parameters passed to the controller. Authorization Filters don't have that access. Action Filters do. + * + * Because of the nature of how we authorize people, this code might seem very odd, so I'll try to explain. + * Proceed at your own risk. If you can understand this code, you can understand the whole project. + * + * 1st Observation: You can't authorize access to a resource that isn't owned by someone. Resources like Sessions, Participations, + * and Activity Definitions are accessibile by anyone. + * 2nd Observation: To Authorize someone to perform an action on a resource, you need to know the following: + * 1. Who is to be authorized? 2.What resource are they trying to access? 3. What operation are they trying to make on the resource? + * This "algorithm" uses those three points and decides through a series of switch statements if the current user + * is authorized. + */ + public class StateYourBusiness : ActionFilterAttribute + { + // Resource to be accessed: Will get as parameters to the attribute + public string resource { get; set; } + // Operation to be performed: Will get as parameters to the attribute + public string operation { get; set; } + + private ActionExecutingContext context; + private IWebHostEnvironment _webHostEnvironment; + private CCTContext _CCTContext; + private MyGordonContext _MyGordonContext; + private IMembershipService _membershipService; + private IAccountService _accountService; + + // User position at the college and their id. + private IEnumerable user_groups { get; set; } + private string user_id { get; set; } + private string user_name { get; set; } + + public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) + { + context = actionContext; + _webHostEnvironment = context.HttpContext.RequestServices.GetService(); + // Step 1: Who is to be authorized + var authenticatedUser = actionContext.HttpContext.User; + + var optionsBuilderCCT = new DbContextOptionsBuilder(); + optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); + _CCTContext = new CCTContext(optionsBuilderCCT.Options); + + var optionsBuilderMyGordon = new DbContextOptionsBuilder(); + optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); + _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); + + + _accountService = new AccountService(_CCTContext); + _membershipService = new MembershipService(_CCTContext, _accountService); + + user_name = AuthUtils.GetUsername(authenticatedUser); + user_groups = AuthUtils.GetGroups(authenticatedUser); + user_id = _accountService.GetAccountByUsername(user_name).GordonID; + + if (user_groups.Contains(AuthGroup.SiteAdmin)) + { + await next(); + return; + } + + bool isAuthorized = await CanPerformOperationAsync(resource, operation); + if (!isAuthorized) + { + throw new UnauthorizedAccessException("Authorization has been denied for this request."); + } + + await next(); + } + + + private async Task CanPerformOperationAsync(string resource, string operation) + => operation switch + { + Operation.READ_ONE => await CanReadOneAsync(resource), + Operation.READ_ALL => CanReadAll(resource), + Operation.READ_PARTIAL => await CanReadPartialAsync(resource), + Operation.ADD => await CanAddAsync(resource), + Operation.DENY_ALLOW => await CanDenyAllowAsync(resource), + Operation.UPDATE => await CanUpdateAsync(resource), + Operation.DELETE => await CanDeleteAsync(resource), + Operation.READ_PUBLIC => CanReadPublic(resource), + _ => false, + }; + + /* + * Operations + */ + // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't + // Fit in nicely with the REST specification which is why there is a seperate case for them. + private async Task CanDenyAllowAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + + case Resource.MEMBERSHIP_REQUEST: + { + var mrID = (int)context.ActionArguments["id"]; + // Get the view model from the repository + var mrService = new MembershipRequestService(_CCTContext); + var mrToConsider = await mrService.GetAsync(mrID); + // Populate the membershipRequest manually. Omit fields I don't need. + var activityCode = mrToConsider.ActivityCode; + var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_activityLeader) // If user is the leader of the activity that the request is sent to. + return true; + var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. + return true; + + return false; + } + default: return false; + + } + } + + private async Task CanReadOneAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + case Resource.PROFILE: + return true; + case Resource.EMERGENCY_CONTACT: + if (user_groups.Contains(AuthGroup.Police)) + return true; + else + { + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name.ToLower()); + return isSelf; + } + case Resource.MEMBERSHIP: + return true; + case Resource.MEMBERSHIP_REQUEST: + { + // membershipRequest = mr + var mrService = new MembershipRequestService(_CCTContext); + var mrID = (int)context.ActionArguments["id"]; + var mrToConsider = await mrService.GetAsync(mrID); + var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; // User_id is an instance variable. + + if (is_mrOwner) // If user owns the request + return true; + + var activityCode = mrToConsider.ActivityCode; + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + + return false; + } + case Resource.STUDENT: + // To add a membership for a student, you need to have the students identifier. + // NOTE: I don't believe the 'student' resource is currently being used in API + { + return true; + } + case Resource.ADVISOR: + return true; + case Resource.ACCOUNT: + { + // Membership group admins can access ID of members using their email + // NOTE: In the future, probably only email addresses should be stored + // in memberships, since we would rather not give students access to + // other students' account information + var isGroupAdmin = _membershipService.IsGroupAdmin(user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + + // faculty and police can access student account information + if (user_groups.Contains(AuthGroup.FacStaff) + || user_groups.Contains(AuthGroup.Police)) + return true; + + return false; + } + case Resource.HOUSING: + { + // The members of the apartment application can only read their application + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + HousingService housingService = new HousingService(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID.Value == requestedApplicationID) + { + return true; + } + return false; + } + case Resource.NEWS: + return true; + default: return false; + + } + } + // For reads that access a group of resources filterd in a specific way + private async Task CanReadPartialAsync(string resource) + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + switch (resource) + { + case Resource.MEMBERSHIP_BY_ACTIVITY: + { + // Only people that are part of the activity should be able to see members + var activityCode = (string)context.ActionArguments["activityCode"]; + var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); + var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); + if (is_personAMember) + return true; + return false; + } + case Resource.MEMBERSHIP_BY_STUDENT: + { + // Only the person itself or an admin can see someone's memberships + return (string)context.ActionArguments["id"] == user_id; + } + + case Resource.EVENTS_BY_STUDENT_ID: + { + // Only the person itself or an admin can see someone's chapel attendance + var username_requested = context.ActionArguments["username"]; + var is_creditOwner = username_requested.ToString().Equals(user_name); + return is_creditOwner; + } + + + case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: + { + // An activity leader should be able to see the membership requests that belong to the activity he is leading. + var activityCode = (string)context.ActionArguments["id"]; + var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + return false; + } + // Since the API only allows asking for your requests (no ID argument), it's always OK. + case Resource.MEMBERSHIP_REQUEST_BY_STUDENT: + { + return true; + } + case Resource.EMAILS_BY_ACTIVITY: + { + // Anyone can view group-admin and advisor emails + var participationType = context.ActionArguments.ContainsKey("participationType") ? context.ActionArguments["participationType"] : null; + if (participationType != null && participationType.In("group-admin", "advisor", "leader")) + return true; + + // Only leaders, advisors, and group admins + var activityCode = (string?)context.ActionArguments["activityCode"]; + + var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); + var is_activity_leader = leaders.Any(x => x.Username == user_name); + if (is_activity_leader) + return true; + + var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); + var is_activityAdvisor = advisors.Any(x => x.Username == user_name); + if (is_activityAdvisor) + return true; + + var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); + if (is_groupAdmin) + return true; + + return false; + } + case Resource.ADVISOR_BY_ACTIVITY: + { + return true; + } + case Resource.LEADER_BY_ACTIVITY: + { + return true; + } + case Resource.GROUP_ADMIN_BY_ACTIVITY: + { + return true; + } + case Resource.NEWS: + { + return true; + } + default: return false; + } + } + private bool CanReadAll(string resource) + { + switch (resource) + { + case Resource.MEMBERSHIP: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.ChapelEvent: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.EVENTS_BY_STUDENT_ID: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + + case Resource.MEMBERSHIP_REQUEST: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.STUDENT: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; // See reasons for this in CanReadOne(). No one (except for super admin) should be able to access student records through + // our API. + case Resource.ADVISOR: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.GROUP_ADMIN: + // User is site-wide admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; + case Resource.ACCOUNT: + return false; + case Resource.ADMIN: + return false; + case Resource.HOUSING: + { + // Only the housing admin and super admin can read all of the received applications. + // Super admin has unrestricted access by default, so no need to check. + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + return false; + } + case Resource.NEWS: + return true; + default: return false; + } + } + + private bool CanReadPublic(string resource) + { + switch (resource) + { + case Resource.SLIDER: + return true; + case Resource.NEWS: + return false; + default: return false; + + } + } + private async Task CanAddAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + { + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + } + case Resource.CLIFTON_STRENGTHS: + { + return user_groups.Contains(AuthGroup.SiteAdmin); + } + + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + // A membership can always be added if it is of type "GUEST" + var isFollower = membershipToConsider.PART_CDE == Activity_Roles.GUEST && user_id == membershipToConsider.ID_NUM.ToString(); + if (isFollower) + return true; + + var activityCode = membershipToConsider.ACT_CDE; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. + return true; + return false; + } + + case Resource.MEMBERSHIP_REQUEST: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipRequestToConsider = (REQUEST)context.ActionArguments["membershipRequest"]; + // A membership request belonging to the currently logged in student + var is_Owner = membershipRequestToConsider.ID_NUM.ToString() == user_id; + if (is_Owner) + return true; + // No one should be able to add requests on behalf of another person. + return false; + } + case Resource.STUDENT: + return false; // No one should be able to add students through this API + case Resource.ADVISOR: + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + else + return false; // Only super admin can add Advisors through this API + case Resource.HOUSING_ADMIN: + //only superadmins can add a HOUSING_ADMIN + return false; + case Resource.HOUSING: + { + // The user must be a student and not a member of an existing application + if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + var housingService = new HousingService(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + if (!applicationID.HasValue) + { + return true; + } + return false; + } + return false; + } + case Resource.ADMIN: + return false; + case Resource.ERROR_LOG: + return true; + case Resource.NEWS: + return true; + default: return false; + } + } + private async Task CanUpdateAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + { + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + } + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + var activityCode = membershipToConsider.ACT_CDE; + + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; // Activity Advisors can update memberships of people in their activity. + + var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; + if (is_membershipOwner) + { + // Restrict what a regular owner can edit. + var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); + // If they are not trying to change their participation level, then it is ok + if (originalMembership.Participation == membershipToConsider.PART_CDE) + return true; + } + + + return false; + } + + case Resource.MEMBERSHIP_REQUEST: + { + // Once a request is sent, no one should be able to edit its contents. + // If a mistake is made in creating the original request, the user can always delete it and make a new one. + return false; + } + case Resource.MEMBERSHIP_PRIVACY: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipID = (int)context.ActionArguments["id"]; + + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; + + var activityCode = membershipToConsider.ActivityCode; + + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + return false; + } + case Resource.STUDENT: + return false; // No one should be able to update a student through this API + case Resource.HOUSING: + { + // The housing admins can update the application information (i.e. probation, offcampus program, etc.) + // If the user is a student, then the user must be on an application and be an editor to update the application + HousingService housingService = new HousingService(_CCTContext); + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + else if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID == requestedApplicationID) + { + string editorUsername = housingService.GetEditorUsername(applicationID.Value); + if (editorUsername.ToLower() == user_name.ToLower()) + return true; + return false; + } + return false; + } + return false; + } + case Resource.ADVISOR: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; + var activityCode = membershipToConsider.ACT_CDE; + + var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (is_advisor) + return true; // Activity Advisors can update memberships of people in their activity. + + return false; + } + case Resource.PROFILE: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name); + return isSelf; + } + + case Resource.ACTIVITY_INFO: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var activityCode = (string)context.ActionArguments["id"]; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + return false; + + } + + case Resource.ACTIVITY_STATUS: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var activityCode = (string)context.ActionArguments["id"]; + var sessionCode = (string)context.ActionArguments["sess_cde"]; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + { + var activityService = context.HttpContext.RequestServices.GetRequiredService(); + // If an activity is currently open, then a group admin has the ability to close it + if (activityService.IsOpen(activityCode, sessionCode)) + { + return true; + } + } + + // If an activity is currently closed, only super admin has permission to edit its closed/open status + + return false; + } + case Resource.EMERGENCY_CONTACT: + { + var username = (string)context.ActionArguments["username"]; + var isSelf = username.Equals(user_name); + return isSelf; + } + + case Resource.NEWS: + var newsID = context.ActionArguments["newsID"]; + var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); + var newsItem = newsService.Get((int)newsID); + // only unapproved posts may be updated + var approved = newsItem.Accepted; + if (approved == null || approved == true) + return false; + // can update if user is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // can update if user is news item author + string newsAuthor = newsItem.ADUN; + if (user_name == newsAuthor) + return true; + return false; + default: return false; + } + } + private async Task CanDeleteAsync(string resource) + { + switch (resource) + { + case Resource.SHIFT: + if (user_groups.Contains(AuthGroup.Student)) + return true; + return false; + case Resource.MEMBERSHIP: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + var membershipID = (int)context.ActionArguments["id"]; + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; + + var activityCode = membershipToConsider.ActivityCode; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + return false; + } + case Resource.MEMBERSHIP_REQUEST: + { + // User is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // membershipRequest = mr + var mrService = new MembershipRequestService(_CCTContext); + var mrID = (int)context.ActionArguments["id"]; + var mrToConsider = await mrService.GetAsync(mrID); + var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; + if (is_mrOwner) + return true; + + var activityCode = mrToConsider.ActivityCode; + + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + + + return false; + } + case Resource.STUDENT: + return false; // No one should be able to delete a student through our API + case Resource.HOUSING: + { + // The housing admins can update the application information (i.e. probation, offcampus program, etc.) + // If the user is a student, then the user must be on an application and be an editor to update the application + HousingService housingService = new HousingService(_CCTContext); + if (user_groups.Contains(AuthGroup.HousingAdmin)) + { + return true; + } + else if (user_groups.Contains(AuthGroup.Student)) + { + var sess_cde = Helpers.GetCurrentSession(_CCTContext); + int? applicationID = housingService.GetApplicationID(user_name, sess_cde); + int requestedApplicationID = (int)context.ActionArguments["applicationID"]; + if (applicationID.HasValue && applicationID.Value == requestedApplicationID) + { + var editorUsername = housingService.GetEditorUsername(applicationID.Value); + if (editorUsername.ToLower() == user_name.ToLower()) + return true; + return false; + } + return false; + } + return false; + } + case Resource.ADVISOR: + return false; + case Resource.ADMIN: + return false; + case Resource.HOUSING_ADMIN: + { + // Only the superadmins can remove a housing admin from the whitelist + // Super admins have unrestricted access by default: no need to check + return false; + } + case Resource.NEWS: + { + var newsID = context.ActionArguments["newsID"]; + var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); + var newsItem = newsService.Get((int)newsID); + // only expired news items may be deleted + var newsDate = newsItem.Entered; + if (!newsDate.HasValue || (System.DateTime.Now - newsDate.Value).Days >= 14) + { + return false; + } + // user is admin + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + // user is news item author + string newsAuthor = newsItem.ADUN; + if (user_name == newsAuthor) + return true; + return false; + } + case Resource.SLIDER: + { + if (user_groups.Contains(AuthGroup.SiteAdmin)) + return true; + return false; + } + default: return false; + } + } + + + } +} From 0a169035979d50532ee3a0f5cbeeda52f9d7afa6 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 09:41:03 -0400 Subject: [PATCH 06/49] Updating EOL sequence --- Gordon360/Models/CCT/ACCOUNT.cs | 108 ++++++++++++++++---------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/Gordon360/Models/CCT/ACCOUNT.cs b/Gordon360/Models/CCT/ACCOUNT.cs index 1be2a042d..5b2757272 100644 --- a/Gordon360/Models/CCT/ACCOUNT.cs +++ b/Gordon360/Models/CCT/ACCOUNT.cs @@ -1,55 +1,55 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class ACCOUNT - { - public int account_id { get; set; } - [Required] - [StringLength(10)] - [Unicode(false)] - public string gordon_id { get; set; } - [StringLength(14)] - [Unicode(false)] - public string barcode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string firstname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string lastname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string email { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - [StringLength(20)] - [Unicode(false)] - public string account_type { get; set; } - [StringLength(75)] - [Unicode(false)] - public string office_hours { get; set; } - public int Primary_Photo { get; set; } - public int Preferred_Photo { get; set; } - public int show_pic { get; set; } - public int Private { get; set; } - public int ReadOnly { get; set; } - public int is_police { get; set; } - public int? Chapel_Required { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - public int? Chapel_Attended { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Birth_Date { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class ACCOUNT + { + public int account_id { get; set; } + [Required] + [StringLength(10)] + [Unicode(false)] + public string gordon_id { get; set; } + [StringLength(14)] + [Unicode(false)] + public string barcode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string firstname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string lastname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string email { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + [StringLength(20)] + [Unicode(false)] + public string account_type { get; set; } + [StringLength(75)] + [Unicode(false)] + public string office_hours { get; set; } + public int Primary_Photo { get; set; } + public int Preferred_Photo { get; set; } + public int show_pic { get; set; } + public int Private { get; set; } + public int ReadOnly { get; set; } + public int is_police { get; set; } + public int? Chapel_Required { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + public int? Chapel_Attended { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Birth_Date { get; set; } + } } \ No newline at end of file From f827bbe85c9029f67934b0e877e7b3945ab669f2 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 09:55:53 -0400 Subject: [PATCH 07/49] forcing LF --- .gitattributes | 14 ++ .../Models/CCT/Context/DbContextExtensions.cs | 136 +++++++++--------- 2 files changed, 82 insertions(+), 68 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..1b19cb54a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,14 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=lf + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.cs text +*.json text + +# Declare files that will always have CRLF line endings on checkout. +*.sln text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary \ No newline at end of file diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index e7095d686..edaf41b6c 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,68 +1,68 @@ -// This file has been auto generated by EF Core Power Tools. -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data.Common; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public static class DbContextExtensions - { - public static async Task> SqlQueryAsync(this DbContext db, string sql, object[] parameters = null, CancellationToken cancellationToken = default) where T : class - { - if (parameters is null) - { - parameters = new object[] { }; - } - - if (typeof(T).GetProperties().Any()) - { - return await db.Set().FromSqlRaw(sql, parameters).ToListAsync(cancellationToken); - } - else - { - await db.Database.ExecuteSqlRawAsync(sql, parameters, cancellationToken); - return default; - } - } - - public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) - { - SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; - await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); - return (int)result.Value; - } - } - - public class OutputParameter - { - private bool _valueSet = false; - - public TValue _value; - - public TValue Value - { - get - { - if (!_valueSet) - throw new InvalidOperationException("Value not set."); - - return _value; - } - } - - internal void SetValue(object value) - { - _valueSet = true; - - _value = null == value || Convert.IsDBNull(value) ? default(TValue) : (TValue)value; - } - } -} +// This file has been auto generated by EF Core Power Tools. +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Common; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public static class DbContextExtensions + { + public static async Task> SqlQueryAsync(this DbContext db, string sql, object[] parameters = null, CancellationToken cancellationToken = default) where T : class + { + if (parameters is null) + { + parameters = new object[] { }; + } + + if (typeof(T).GetProperties().Any()) + { + return await db.Set().FromSqlRaw(sql, parameters).ToListAsync(cancellationToken); + } + else + { + await db.Database.ExecuteSqlRawAsync(sql, parameters, cancellationToken); + return default; + } + } + + public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) + { + SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; + await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); + return (int)result.Value; + } + } + + public class OutputParameter + { + private bool _valueSet = false; + + public TValue _value; + + public TValue Value + { + get + { + if (!_valueSet) + throw new InvalidOperationException("Value not set."); + + return _value; + } + } + + internal void SetValue(object value) + { + _valueSet = true; + + _value = null == value || Convert.IsDBNull(value) ? default(TValue) : (TValue)value; + } + } +} From 3762f514d3f46cd37b256eade34a1bfd2b0f6c7d Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 09:59:14 -0400 Subject: [PATCH 08/49] Changing CRLF back to LF in all DbModels --- .../CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs | 30 +- Gordon360/Models/CCT/ACT_INFO.cs | 72 +- Gordon360/Models/CCT/ADMIN.cs | 50 +- .../CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs | 28 +- .../Models/CCT/ADVISOR_SEPARATEResult.cs | 28 +- Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs | 34 +- .../CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs | 34 +- Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs | 54 +- Gordon360/Models/CCT/ALL_REQUESTSResult.cs | 48 +- Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs | 22 +- Gordon360/Models/CCT/Alumni.cs | 256 +- Gordon360/Models/CCT/Birthdays.cs | 34 +- Gordon360/Models/CCT/Buildings.cs | 42 +- Gordon360/Models/CCT/CM_SESSION_MSTR.cs | 70 +- .../Models/CCT/COURSES_FOR_PROFESSORResult.cs | 58 +- .../Models/CCT/CREATE_MESSAGE_ROOMResult.cs | 34 +- Gordon360/Models/CCT/CURRENT_SESSIONResult.cs | 24 +- Gordon360/Models/CCT/CUSTOM_PROFILE.cs | 54 +- Gordon360/Models/CCT/ChapelEvent.cs | 72 +- Gordon360/Models/CCT/Clifton_Strengths.cs | 88 +- Gordon360/Models/CCT/Config.cs | 46 +- Gordon360/Models/CCT/Context/CCTContext.cs | 966 +- .../CCT/Context/CCTContextProcedures.cs | 7910 ++++++++--------- .../Models/CCT/Context/DbContextExtensions.cs | 9 - .../CCT/Context/ICCTContextProcedures.cs | 266 +- .../Models/CCT/Context/efpt.CCT.config.json | 1480 +-- Gordon360/Models/CCT/Countries.cs | 44 +- .../Models/CCT/DISTINCT_ACT_TYPEResult.cs | 24 +- Gordon360/Models/CCT/DiningInfo.cs | 66 +- .../Models/CCT/Dining_Meal_Choice_Desc.cs | 42 +- .../CCT/Dining_Meal_Plan_Change_History.cs | 64 +- .../Models/CCT/Dining_Meal_Plan_Id_Mapping.cs | 44 +- Gordon360/Models/CCT/Dining_Mealplans.cs | 50 +- .../Models/CCT/Dining_Student_Meal_Choice.cs | 44 +- .../Models/CCT/EMAILS_PER_ACT_CDEResult.cs | 28 +- Gordon360/Models/CCT/ERROR_LOG.cs | 38 +- Gordon360/Models/CCT/EmergencyContact.cs | 214 +- .../CCT/FINALIZATION_GETDEMOGRAPHICResult.cs | 24 +- .../CCT/FINALIZATION_GETHOLDSBYIDResult.cs | 44 +- ...ALIZATION_GET_FINALIZATION_STATUSResult.cs | 40 +- ...ATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs | 42 +- .../CCT/FINALIZATION_UPDATECELLPHONEResult.cs | 26 +- .../FINALIZATION_UPDATEDEMOGRAPHICResult.cs | 22 +- Gordon360/Models/CCT/FacStaff.cs | 254 +- Gordon360/Models/CCT/GET_AA_ADMINResult.cs | 24 +- ...ET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs | 28 +- .../CCT/GET_AA_APARTMENT_HALLSResult.cs | 24 +- .../GET_AA_APPID_BY_NAME_AND_DATEResult.cs | 24 +- .../GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs | 24 +- .../CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs | 32 +- .../CCT/GET_AA_APPLICANTS_DETAILSResult.cs | 38 +- .../Models/CCT/GET_AA_APPLICATIONSResult.cs | 30 +- .../CCT/GET_AA_APPLICATIONS_BY_IDResult.cs | 30 +- .../CCT/GET_AA_CURRENT_APPLICATIONSResult.cs | 30 +- .../CCT/GET_AA_CURRENT_APP_IDSResult.cs | 24 +- .../CCT/GET_AA_EDITOR_BY_APPIDResult.cs | 24 +- .../CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs | 24 +- ...GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs | 24 +- .../CCT/GET_ALL_MESSAGES_BY_IDResult.cs | 44 +- .../Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs | 24 +- .../CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs | 24 +- .../Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs | 24 +- .../CCT/GET_HEALTH_CHECK_QUESTIONResult.cs | 28 +- Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs | 24 +- Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs | 34 +- .../CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs | 44 +- .../CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs | 26 +- .../CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs | 28 +- Gordon360/Models/CCT/Graduation.cs | 40 +- Gordon360/Models/CCT/Health_Question.cs | 50 +- Gordon360/Models/CCT/Health_Status.cs | 60 +- Gordon360/Models/CCT/Health_Status_CTRL.cs | 54 +- Gordon360/Models/CCT/Housing_Admins.cs | 34 +- Gordon360/Models/CCT/Housing_Applicants.cs | 62 +- Gordon360/Models/CCT/Housing_Applications.cs | 62 +- Gordon360/Models/CCT/Housing_HallChoices.cs | 46 +- Gordon360/Models/CCT/Housing_Halls.cs | 42 +- .../Models/CCT/INSERT_NEWS_ITEMResult.cs | 24 +- ...OR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs | 46 +- .../Models/CCT/Information_Change_Request.cs | 58 +- .../Models/CCT/Internships_as_Involvements.cs | 74 +- Gordon360/Models/CCT/InvolvementOffering.cs | 62 +- Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs | 70 +- Gordon360/Models/CCT/JNZB_ACTIVITIES.cs | 112 +- .../CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs | 28 +- .../LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs | 48 +- Gordon360/Models/CCT/MEMBERSHIP.cs | 92 +- .../CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs | 58 +- .../CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs | 60 +- Gordon360/Models/CCT/MYSCHEDULE.cs | 102 +- .../Models/CCT/MYSCHEDULE_BY_IDResult.cs | 50 +- Gordon360/Models/CCT/Mailboxes.cs | 54 +- Gordon360/Models/CCT/Majors.cs | 40 +- Gordon360/Models/CCT/MembershipView.cs | 116 +- Gordon360/Models/CCT/Message_Rooms.cs | 50 +- Gordon360/Models/CCT/Messages.cs | 72 +- Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs | 28 +- Gordon360/Models/CCT/NEWS_NEWResult.cs | 46 +- .../Models/CCT/NEWS_NOT_EXPIREDResult.cs | 46 +- .../CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs | 46 +- Gordon360/Models/CCT/PART_DEF.cs | 44 +- .../CCT/PHOTO_INFO_PER_USER_NAMEResult.cs | 30 +- Gordon360/Models/CCT/Police.cs | 30 +- Gordon360/Models/CCT/REQUEST.cs | 74 +- .../Models/CCT/REQUESTS_PER_ACT_CDEResult.cs | 48 +- .../CCT/REQUESTS_PER_STUDENT_IDResult.cs | 48 +- .../CCT/REQUEST_PER_REQUEST_IDResult.cs | 48 +- .../Models/CCT/RIDERS_BY_RIDE_IDResult.cs | 28 +- Gordon360/Models/CCT/RoomAssign.cs | 82 +- Gordon360/Models/CCT/Rooms.cs | 56 +- ...NT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs | 46 +- .../CCT/STUDENT_JOBS_PER_ID_NUMResult.cs | 34 +- .../CCT/SUPERVISORS_PER_ACT_CDEResult.cs | 22 +- .../CCT/SUPERVISORS_PER_ID_NUMResult.cs | 22 +- .../Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs | 22 +- Gordon360/Models/CCT/Save_Bookings.cs | 52 +- Gordon360/Models/CCT/Save_Rides.cs | 86 +- Gordon360/Models/CCT/Schedule_Control.cs | 46 +- Gordon360/Models/CCT/Slider_Images.cs | 58 +- Gordon360/Models/CCT/States.cs | 42 +- Gordon360/Models/CCT/Student.cs | 388 +- Gordon360/Models/CCT/StudentNewsExpiration.cs | 34 +- .../Models/CCT/Timesheets_Clock_In_Out.cs | 36 +- Gordon360/Models/CCT/UPCOMING_RIDESResult.cs | 42 +- .../CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs | 42 +- .../Models/CCT/UPDATE_CELL_PHONEResult.cs | 26 +- Gordon360/Models/CCT/User_Connection_Ids.cs | 44 +- Gordon360/Models/CCT/User_Rooms.cs | 44 +- Gordon360/Models/CCT/Users.cs | 46 +- .../Models/CCT/VALID_DRIVES_BY_IDResult.cs | 24 +- .../VICTORY_PROMISE_BY_STUDENT_IDResult.cs | 30 +- Gordon360/Models/CCT/_360_SLIDER.cs | 102 +- 132 files changed, 8599 insertions(+), 8608 deletions(-) diff --git a/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs b/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs index 91a80570d..491177405 100644 --- a/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs +++ b/Gordon360/Models/CCT/ACTIVE_CLUBS_PER_SESS_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ACTIVE_CLUBS_PER_SESS_IDResult - { - public string ACT_CDE { get; set; } - public string ACT_DESC { get; set; } - public string ACT_TYPE { get; set; } - public string ACT_TYPE_DESC { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ACTIVE_CLUBS_PER_SESS_IDResult + { + public string ACT_CDE { get; set; } + public string ACT_DESC { get; set; } + public string ACT_TYPE { get; set; } + public string ACT_TYPE_DESC { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ACT_INFO.cs b/Gordon360/Models/CCT/ACT_INFO.cs index 2f1e2947d..47d99c4c8 100644 --- a/Gordon360/Models/CCT/ACT_INFO.cs +++ b/Gordon360/Models/CCT/ACT_INFO.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ACT_INFO - { - [Key] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ACT_DESC { get; set; } - [Unicode(false)] - public string ACT_BLURB { get; set; } - [Unicode(false)] - public string ACT_URL { get; set; } - [Unicode(false)] - public string ACT_IMG_PATH { get; set; } - [StringLength(3)] - [Unicode(false)] - public string ACT_TYPE { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } - public bool? PRIVACY { get; set; } - [Unicode(false)] - public string ACT_JOIN_INFO { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ACT_INFO + { + [Key] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [Unicode(false)] + public string ACT_BLURB { get; set; } + [Unicode(false)] + public string ACT_URL { get; set; } + [Unicode(false)] + public string ACT_IMG_PATH { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + public bool? PRIVACY { get; set; } + [Unicode(false)] + public string ACT_JOIN_INFO { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ADMIN.cs b/Gordon360/Models/CCT/ADMIN.cs index cccde714c..f5bb0c8a1 100644 --- a/Gordon360/Models/CCT/ADMIN.cs +++ b/Gordon360/Models/CCT/ADMIN.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ADMIN - { - [Key] - public int ADMIN_ID { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string USER_NAME { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string EMAIL { get; set; } - public bool SUPER_ADMIN { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ADMIN + { + [Key] + public int ADMIN_ID { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string USER_NAME { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string EMAIL { get; set; } + public bool SUPER_ADMIN { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs index bea0c5dee..424150b37 100644 --- a/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/ADVISOR_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ADVISOR_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ADVISOR_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs b/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs index ea6aa58aa..cb329f7d0 100644 --- a/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs +++ b/Gordon360/Models/CCT/ADVISOR_SEPARATEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ADVISOR_SEPARATEResult - { - public string Advisor1 { get; set; } - public string Advisor2 { get; set; } - public string Advisor3 { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ADVISOR_SEPARATEResult + { + public string Advisor1 { get; set; } + public string Advisor2 { get; set; } + public string Advisor3 { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs b/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs index 9ae43c30e..d32031ffa 100644 --- a/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs +++ b/Gordon360/Models/CCT/ALL_BASIC_INFOResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_BASIC_INFOResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Nickname { get; set; } - public string MaidenName { get; set; } - public string UserName { get; set; } - public string ConcatonatedInfo { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_BASIC_INFOResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Nickname { get; set; } + public string MaidenName { get; set; } + public string UserName { get; set; } + public string ConcatonatedInfo { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs b/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs index db1241aa9..27505aaed 100644 --- a/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs +++ b/Gordon360/Models/CCT/ALL_BASIC_INFO_NOT_ALUMNIResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_BASIC_INFO_NOT_ALUMNIResult - { - public string firstname { get; set; } - public string lastname { get; set; } - public string Nickname { get; set; } - public string MaidenName { get; set; } - public string Username { get; set; } - public string ConcatonatedInfo { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_BASIC_INFO_NOT_ALUMNIResult + { + public string firstname { get; set; } + public string lastname { get; set; } + public string Nickname { get; set; } + public string MaidenName { get; set; } + public string Username { get; set; } + public string ConcatonatedInfo { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs b/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs index 25a30f17f..3613a78c3 100644 --- a/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs +++ b/Gordon360/Models/CCT/ALL_MEMBERSHIPSResult.cs @@ -1,27 +1,27 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_MEMBERSHIPSResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_MEMBERSHIPSResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_REQUESTSResult.cs b/Gordon360/Models/CCT/ALL_REQUESTSResult.cs index a6dfc4bd9..9cdf547c2 100644 --- a/Gordon360/Models/CCT/ALL_REQUESTSResult.cs +++ b/Gordon360/Models/CCT/ALL_REQUESTSResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_REQUESTSResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_REQUESTSResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs b/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs index c0e72a483..c5bf59926 100644 --- a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs +++ b/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_SUPERVISORSResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class ALL_SUPERVISORSResult + { + } +} diff --git a/Gordon360/Models/CCT/Alumni.cs b/Gordon360/Models/CCT/Alumni.cs index 75ff8e724..09f249717 100644 --- a/Gordon360/Models/CCT/Alumni.cs +++ b/Gordon360/Models/CCT/Alumni.cs @@ -1,129 +1,129 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Alumni - { - [Required] - [StringLength(25)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(25)] - [Unicode(false)] - public string WebUpdate { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string NickName { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(25)] - [Unicode(false)] - public string HomeFax { get; set; } - [StringLength(255)] - [Unicode(false)] - public string HomeEmail { get; set; } - [StringLength(50)] - [Unicode(false)] - public string JobTitle { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MaritalStatus { get; set; } - [StringLength(60)] - [Unicode(false)] - public string SpouseName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string College { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ClassYear { get; set; } - [StringLength(25)] - [Unicode(false)] - public string PreferredClassYear { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ShareName { get; set; } - [StringLength(25)] - [Unicode(false)] - public string ShareAddress { get; set; } - [StringLength(10)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(50)] - [Unicode(false)] - public string GradDate { get; set; } - [StringLength(255)] - [Unicode(false)] - public string Email { get; set; } - [StringLength(1)] - [Unicode(false)] - public string grad_student { get; set; } - [StringLength(15)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int? show_pic { get; set; } - public int? preferred_photo { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1Description { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Alumni + { + [Required] + [StringLength(25)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(25)] + [Unicode(false)] + public string WebUpdate { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string NickName { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(25)] + [Unicode(false)] + public string HomeFax { get; set; } + [StringLength(255)] + [Unicode(false)] + public string HomeEmail { get; set; } + [StringLength(50)] + [Unicode(false)] + public string JobTitle { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MaritalStatus { get; set; } + [StringLength(60)] + [Unicode(false)] + public string SpouseName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string College { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ClassYear { get; set; } + [StringLength(25)] + [Unicode(false)] + public string PreferredClassYear { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ShareName { get; set; } + [StringLength(25)] + [Unicode(false)] + public string ShareAddress { get; set; } + [StringLength(10)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(50)] + [Unicode(false)] + public string GradDate { get; set; } + [StringLength(255)] + [Unicode(false)] + public string Email { get; set; } + [StringLength(1)] + [Unicode(false)] + public string grad_student { get; set; } + [StringLength(15)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int? show_pic { get; set; } + public int? preferred_photo { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1Description { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Birthdays.cs b/Gordon360/Models/CCT/Birthdays.cs index a554d3e7a..39b174050 100644 --- a/Gordon360/Models/CCT/Birthdays.cs +++ b/Gordon360/Models/CCT/Birthdays.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Birthdays - { - public int ID_NUM { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BIRTH_DTE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Birthdays + { + public int ID_NUM { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BIRTH_DTE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Buildings.cs b/Gordon360/Models/CCT/Buildings.cs index 1ded945d2..754e0f747 100644 --- a/Gordon360/Models/CCT/Buildings.cs +++ b/Gordon360/Models/CCT/Buildings.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Buildings - { - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_CDE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BUILDING_DESC { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Buildings + { + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BUILDING_DESC { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/CM_SESSION_MSTR.cs b/Gordon360/Models/CCT/CM_SESSION_MSTR.cs index f7cf31955..e75a014f3 100644 --- a/Gordon360/Models/CCT/CM_SESSION_MSTR.cs +++ b/Gordon360/Models/CCT/CM_SESSION_MSTR.cs @@ -1,36 +1,36 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class CM_SESSION_MSTR - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [StringLength(1000)] - [Unicode(false)] - public string SESS_DESC { get; set; } - [Column(TypeName = "datetime")] - public DateTime? SESS_BEGN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? SESS_END_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? WHEEL_BEGN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? WHEEL_END_DTE { get; set; } - [StringLength(32)] - [Unicode(false)] - public string YRTRM_CDE_2 { get; set; } - [StringLength(32)] - [Unicode(false)] - public string YRTRM_CDE_4 { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class CM_SESSION_MSTR + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SESS_DESC { get; set; } + [Column(TypeName = "datetime")] + public DateTime? SESS_BEGN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? SESS_END_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? WHEEL_BEGN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? WHEEL_END_DTE { get; set; } + [StringLength(32)] + [Unicode(false)] + public string YRTRM_CDE_2 { get; set; } + [StringLength(32)] + [Unicode(false)] + public string YRTRM_CDE_4 { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs b/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs index 31f29c176..0159e6686 100644 --- a/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs +++ b/Gordon360/Models/CCT/COURSES_FOR_PROFESSORResult.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class COURSES_FOR_PROFESSORResult - { - public string YR_CDE { get; set; } - public string TRM_CDE { get; set; } - public string CRS_CDE { get; set; } - public string SUBTERM_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public string SATURDAY_CDE { get; set; } - public string SUNDAY_CDE { get; set; } - public DateTime? BEGIN_TIM { get; set; } - public DateTime? END_TIM { get; set; } - public string LOC_CDE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public int? PROFESSOR_ID_NUM { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class COURSES_FOR_PROFESSORResult + { + public string YR_CDE { get; set; } + public string TRM_CDE { get; set; } + public string CRS_CDE { get; set; } + public string SUBTERM_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public string SATURDAY_CDE { get; set; } + public string SUNDAY_CDE { get; set; } + public DateTime? BEGIN_TIM { get; set; } + public DateTime? END_TIM { get; set; } + public string LOC_CDE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public int? PROFESSOR_ID_NUM { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs b/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs index 12a5ab7cb..02b3f26de 100644 --- a/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs +++ b/Gordon360/Models/CCT/CREATE_MESSAGE_ROOMResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class CREATE_MESSAGE_ROOMResult - { - public bool group { get; set; } - public int id { get; set; } - public string name { get; set; } - public DateTime createdAt { get; set; } - public DateTime lastUpdated { get; set; } - public byte[] image { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class CREATE_MESSAGE_ROOMResult + { + public bool group { get; set; } + public int id { get; set; } + public string name { get; set; } + public DateTime createdAt { get; set; } + public DateTime lastUpdated { get; set; } + public byte[] image { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs b/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs index 53ef15490..fcac67f93 100644 --- a/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs +++ b/Gordon360/Models/CCT/CURRENT_SESSIONResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class CURRENT_SESSIONResult - { - public string DEFAULT_SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class CURRENT_SESSIONResult + { + public string DEFAULT_SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/CUSTOM_PROFILE.cs b/Gordon360/Models/CCT/CUSTOM_PROFILE.cs index e0da6b707..c5b64cf58 100644 --- a/Gordon360/Models/CCT/CUSTOM_PROFILE.cs +++ b/Gordon360/Models/CCT/CUSTOM_PROFILE.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class CUSTOM_PROFILE - { - [Key] - [StringLength(50)] - [Unicode(false)] - public string username { get; set; } - [Unicode(false)] - public string facebook { get; set; } - [Unicode(false)] - public string twitter { get; set; } - [Unicode(false)] - public string instagram { get; set; } - [Unicode(false)] - public string linkedin { get; set; } - [Unicode(false)] - public string handshake { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class CUSTOM_PROFILE + { + [Key] + [StringLength(50)] + [Unicode(false)] + public string username { get; set; } + [Unicode(false)] + public string facebook { get; set; } + [Unicode(false)] + public string twitter { get; set; } + [Unicode(false)] + public string instagram { get; set; } + [Unicode(false)] + public string linkedin { get; set; } + [Unicode(false)] + public string handshake { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/ChapelEvent.cs b/Gordon360/Models/CCT/ChapelEvent.cs index 5bbc1d1f3..42d924c4a 100644 --- a/Gordon360/Models/CCT/ChapelEvent.cs +++ b/Gordon360/Models/CCT/ChapelEvent.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class ChapelEvent - { - public int ROWID { get; set; } - [Required] - [StringLength(25)] - public string CHBarEventID { get; set; } - public int ID_NUM { get; set; } - [StringLength(14)] - public string CHBarcode { get; set; } - [StringLength(10)] - public string CHEventID { get; set; } - [StringLength(14)] - public string CHCheckerID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHDate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHTime { get; set; } - [StringLength(1)] - public string CHSource { get; set; } - [StringLength(4)] - public string CHTermCD { get; set; } - public int? Attended { get; set; } - public int? Required { get; set; } - public int? LiveID { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class ChapelEvent + { + public int ROWID { get; set; } + [Required] + [StringLength(25)] + public string CHBarEventID { get; set; } + public int ID_NUM { get; set; } + [StringLength(14)] + public string CHBarcode { get; set; } + [StringLength(10)] + public string CHEventID { get; set; } + [StringLength(14)] + public string CHCheckerID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHDate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHTime { get; set; } + [StringLength(1)] + public string CHSource { get; set; } + [StringLength(4)] + public string CHTermCD { get; set; } + public int? Attended { get; set; } + public int? Required { get; set; } + public int? LiveID { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Clifton_Strengths.cs b/Gordon360/Models/CCT/Clifton_Strengths.cs index 40d705933..3078db591 100644 --- a/Gordon360/Models/CCT/Clifton_Strengths.cs +++ b/Gordon360/Models/CCT/Clifton_Strengths.cs @@ -1,45 +1,45 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Clifton_Strengths - { - [Key] - public int ID_NUM { get; set; } - [Key] - [StringLength(25)] - [Unicode(false)] - public string ACCESS_CODE { get; set; } - [Required] - [StringLength(200)] - [Unicode(false)] - public string EMAIL { get; set; } - [Column(TypeName = "datetime")] - public DateTime? DTE_COMPLETED { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_1 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_2 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_3 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_4 { get; set; } - [StringLength(100)] - [Unicode(false)] - public string THEME_5 { get; set; } - /// - /// Whether the user wants their strengths to be private (not shown to other users) - /// - public bool Private { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Clifton_Strengths + { + [Key] + public int ID_NUM { get; set; } + [Key] + [StringLength(25)] + [Unicode(false)] + public string ACCESS_CODE { get; set; } + [Required] + [StringLength(200)] + [Unicode(false)] + public string EMAIL { get; set; } + [Column(TypeName = "datetime")] + public DateTime? DTE_COMPLETED { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_1 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_2 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_3 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_4 { get; set; } + [StringLength(100)] + [Unicode(false)] + public string THEME_5 { get; set; } + /// + /// Whether the user wants their strengths to be private (not shown to other users) + /// + public bool Private { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Config.cs b/Gordon360/Models/CCT/Config.cs index 7231b9a9d..1900c86e2 100644 --- a/Gordon360/Models/CCT/Config.cs +++ b/Gordon360/Models/CCT/Config.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Config - { - [Key] - public int ID { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string Key { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string Value { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Config + { + [Key] + public int ID { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string Key { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string Value { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Context/CCTContext.cs b/Gordon360/Models/CCT/Context/CCTContext.cs index fd18e3954..dc34ef15f 100644 --- a/Gordon360/Models/CCT/Context/CCTContext.cs +++ b/Gordon360/Models/CCT/Context/CCTContext.cs @@ -1,484 +1,484 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata; -using Gordon360.Models.CCT; - -namespace Gordon360.Models.CCT.Context -{ - public partial class CCTContext : DbContext - { - public CCTContext() - { - } - - public CCTContext(DbContextOptions options) - : base(options) - { - } - - public virtual DbSet ACCOUNT { get; set; } - public virtual DbSet ACT_INFO { get; set; } - public virtual DbSet ADMIN { get; set; } - public virtual DbSet Alumni { get; set; } - public virtual DbSet Birthdays { get; set; } - public virtual DbSet Buildings { get; set; } - public virtual DbSet CM_SESSION_MSTR { get; set; } - public virtual DbSet CUSTOM_PROFILE { get; set; } - public virtual DbSet ChapelEvent { get; set; } - public virtual DbSet Clifton_Strengths { get; set; } - public virtual DbSet Config { get; set; } - public virtual DbSet Countries { get; set; } - public virtual DbSet DiningInfo { get; set; } - public virtual DbSet Dining_Meal_Choice_Desc { get; set; } - public virtual DbSet Dining_Meal_Plan_Change_History { get; set; } - public virtual DbSet Dining_Meal_Plan_Id_Mapping { get; set; } - public virtual DbSet Dining_Mealplans { get; set; } - public virtual DbSet Dining_Student_Meal_Choice { get; set; } - public virtual DbSet ERROR_LOG { get; set; } - public virtual DbSet EmergencyContact { get; set; } - public virtual DbSet FacStaff { get; set; } - public virtual DbSet Graduation { get; set; } - public virtual DbSet Health_Question { get; set; } - public virtual DbSet Health_Status { get; set; } - public virtual DbSet Health_Status_CTRL { get; set; } - public virtual DbSet Housing_Admins { get; set; } - public virtual DbSet Housing_Applicants { get; set; } - public virtual DbSet Housing_Applications { get; set; } - public virtual DbSet Housing_HallChoices { get; set; } - public virtual DbSet Housing_Halls { get; set; } - public virtual DbSet Information_Change_Request { get; set; } - public virtual DbSet Internships_as_Involvements { get; set; } - public virtual DbSet InvolvementOffering { get; set; } - public virtual DbSet JENZ_ACT_CLUB_DEF { get; set; } - public virtual DbSet JNZB_ACTIVITIES { get; set; } - public virtual DbSet MEMBERSHIP { get; set; } - public virtual DbSet MYSCHEDULE { get; set; } - public virtual DbSet Mailboxes { get; set; } - public virtual DbSet Majors { get; set; } - public virtual DbSet MembershipView { get; set; } - public virtual DbSet Message_Rooms { get; set; } - public virtual DbSet Messages { get; set; } - public virtual DbSet PART_DEF { get; set; } - public virtual DbSet Police { get; set; } - public virtual DbSet REQUEST { get; set; } - public virtual DbSet RoomAssign { get; set; } - public virtual DbSet Rooms { get; set; } - public virtual DbSet Save_Bookings { get; set; } - public virtual DbSet Save_Rides { get; set; } - public virtual DbSet Schedule_Control { get; set; } - public virtual DbSet Slider_Images { get; set; } - public virtual DbSet States { get; set; } - public virtual DbSet Student { get; set; } - public virtual DbSet StudentNewsExpiration { get; set; } - public virtual DbSet Timesheets_Clock_In_Out { get; set; } - public virtual DbSet User_Connection_Ids { get; set; } - public virtual DbSet User_Rooms { get; set; } - public virtual DbSet Users { get; set; } - public virtual DbSet<_360_SLIDER> _360_SLIDER { get; set; } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToView("ACCOUNT"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.ACT_CDE) - .HasName("PK_Activity_Info"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.ACT_DESC).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.ADMIN_ID) - .HasName("PK_Admin"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Alumni"); - - entity.Property(e => e.Country).IsFixedLength(); - - entity.Property(e => e.grad_student).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Birthdays"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Buildings"); - - entity.Property(e => e.BLDG_CDE).IsFixedLength(); - - entity.Property(e => e.BUILDING_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("CM_SESSION_MSTR"); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("ChapelEvent"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.ID_NUM, e.ACCESS_CODE }) - .HasName("PK_CliftonStrengths"); - - entity.Property(e => e.Private).HasComment("Whether the user wants their strengths to be private (not shown to other users)"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Countries"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("DiningInfo"); - - entity.Property(e => e.ChoiceDescription).IsFixedLength(); - - entity.Property(e => e.SessionCode).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Choice_Desc"); - - entity.Property(e => e.Meal_Choice_Desc).IsFixedLength(); - - entity.Property(e => e.Meal_Choice_Id).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Plan_Change_History"); - - entity.Property(e => e.OLD_PLAN_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Meal_Plan_Id_Mapping"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Mealplans"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Dining_Student_Meal_Choice"); - - entity.Property(e => e.MEAL_CHOICE_ID).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("EmergencyContact"); - - entity.Property(e => e.AddressAddrCode).IsFixedLength(); - - entity.Property(e => e.ApprowVersion) - .IsRowVersion() - .IsConcurrencyToken(); - - entity.Property(e => e.EmailAddrCode).IsFixedLength(); - - entity.Property(e => e.HomeAddrCode).IsFixedLength(); - - entity.Property(e => e.HomeExt).IsFixedLength(); - - entity.Property(e => e.HomePhone).IsFixedLength(); - - entity.Property(e => e.MobileAddrCode).IsFixedLength(); - - entity.Property(e => e.MobileExt).IsFixedLength(); - - entity.Property(e => e.MobilePhone).IsFixedLength(); - - entity.Property(e => e.WorkAddrCode).IsFixedLength(); - - entity.Property(e => e.WorkExr).IsFixedLength(); - - entity.Property(e => e.WorkPhone).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("FacStaff"); - - entity.Property(e => e.BuildingDescription).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Graduation"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.Created, e.ID_Num }) - .HasName("PK__Health_S__6CC83B6815B808A2"); - - entity.HasOne(d => d.HealthStatus) - .WithMany(p => p.Health_Status) - .HasForeignKey(d => d.HealthStatusID) - .OnDelete(DeleteBehavior.ClientSetNull) - .HasConstraintName("FK_Health_Status_HealthStatus_CTRL"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.HousingAppID, e.Username }); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.HasOne(d => d.HousingApp) - .WithMany(p => p.Housing_Applicants) - .HasForeignKey(d => d.HousingAppID) - .HasConstraintName("FK_Applicants_HousingAppID"); - }); - - modelBuilder.Entity(entity => - { - entity.HasOne(d => d.HousingApp) - .WithMany() - .HasForeignKey(d => d.HousingAppID) - .HasConstraintName("FK_HallChoices_HousingAppID"); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.TimeStamp).HasDefaultValueSql("(getdate())"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Internships_as_Involvements"); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.TRM_CDE).IsFixedLength(); - - entity.Property(e => e.YR_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("InvolvementOffering"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.ACT_DESC).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("JENZ_ACT_CLUB_DEF"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.ACT_DESC).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE).IsFixedLength(); - - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.INCL_PROFILE_RPT).IsFixedLength(); - - entity.Property(e => e.JOB_NAME).IsFixedLength(); - - entity.Property(e => e.MEMBERSHIP_STS).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.TRACK_MTG_ATTEND).IsFixedLength(); - - entity.Property(e => e.USER_NAME).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.MEMBERSHIP_ID) - .HasName("PK_Membership"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.JOB_NAME).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - - entity.Property(e => e.USER_NAME).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.EVENT_ID, e.GORDON_ID }); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Mailboxes"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Majors"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("MembershipView"); - - entity.Property(e => e.ActivityCode).IsFixedLength(); - - entity.Property(e => e.ActivityDescription).IsFixedLength(); - - entity.Property(e => e.Participation).IsFixedLength(); - - entity.Property(e => e.ParticipationDescription).IsFixedLength(); - - entity.Property(e => e.SessionCode).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.room_id) - .HasName("PK__Message___19675A8A3E781488"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("PART_DEF"); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.PART_DESC).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Police"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.REQUEST_ID) - .HasName("PK_Request"); - - entity.Property(e => e.ACT_CDE).IsFixedLength(); - - entity.Property(e => e.PART_CDE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("RoomAssign"); - - entity.Property(e => e.BLDG_CDE).IsFixedLength(); - - entity.Property(e => e.BLDG_LOC_CDE).IsFixedLength(); - - entity.Property(e => e.ROOM_ASSIGN_STS).IsFixedLength(); - - entity.Property(e => e.ROOM_CDE).IsFixedLength(); - - entity.Property(e => e.ROOM_TYPE).IsFixedLength(); - - entity.Property(e => e.SESS_CDE).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.ID, e.rideID }); - - entity.HasOne(d => d.ride) - .WithMany(p => p.Save_Bookings) - .HasForeignKey(d => d.rideID) - .HasConstraintName("FK_booking_rides"); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.IsSchedulePrivate).HasDefaultValueSql("((1))"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("States"); - }); - - modelBuilder.Entity(entity => - { - entity.ToView("Student"); - - entity.Property(e => e.BuildingDescription).IsFixedLength(); - - entity.Property(e => e.Country).IsFixedLength(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.SNID) - .HasName("PK_StudentNewsExpiration_SNID"); - - entity.Property(e => e.SNID).ValueGeneratedNever(); - }); - - modelBuilder.Entity<_360_SLIDER>(entity => - { - entity.ToView("360_SLIDER"); - }); - - modelBuilder.HasSequence("Information_Change_Request_Seq"); - - OnModelCreatingGeneratedProcedures(modelBuilder); - OnModelCreatingPartial(modelBuilder); - } - - partial void OnModelCreatingPartial(ModelBuilder modelBuilder); - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; +using Gordon360.Models.CCT; + +namespace Gordon360.Models.CCT.Context +{ + public partial class CCTContext : DbContext + { + public CCTContext() + { + } + + public CCTContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet ACCOUNT { get; set; } + public virtual DbSet ACT_INFO { get; set; } + public virtual DbSet ADMIN { get; set; } + public virtual DbSet Alumni { get; set; } + public virtual DbSet Birthdays { get; set; } + public virtual DbSet Buildings { get; set; } + public virtual DbSet CM_SESSION_MSTR { get; set; } + public virtual DbSet CUSTOM_PROFILE { get; set; } + public virtual DbSet ChapelEvent { get; set; } + public virtual DbSet Clifton_Strengths { get; set; } + public virtual DbSet Config { get; set; } + public virtual DbSet Countries { get; set; } + public virtual DbSet DiningInfo { get; set; } + public virtual DbSet Dining_Meal_Choice_Desc { get; set; } + public virtual DbSet Dining_Meal_Plan_Change_History { get; set; } + public virtual DbSet Dining_Meal_Plan_Id_Mapping { get; set; } + public virtual DbSet Dining_Mealplans { get; set; } + public virtual DbSet Dining_Student_Meal_Choice { get; set; } + public virtual DbSet ERROR_LOG { get; set; } + public virtual DbSet EmergencyContact { get; set; } + public virtual DbSet FacStaff { get; set; } + public virtual DbSet Graduation { get; set; } + public virtual DbSet Health_Question { get; set; } + public virtual DbSet Health_Status { get; set; } + public virtual DbSet Health_Status_CTRL { get; set; } + public virtual DbSet Housing_Admins { get; set; } + public virtual DbSet Housing_Applicants { get; set; } + public virtual DbSet Housing_Applications { get; set; } + public virtual DbSet Housing_HallChoices { get; set; } + public virtual DbSet Housing_Halls { get; set; } + public virtual DbSet Information_Change_Request { get; set; } + public virtual DbSet Internships_as_Involvements { get; set; } + public virtual DbSet InvolvementOffering { get; set; } + public virtual DbSet JENZ_ACT_CLUB_DEF { get; set; } + public virtual DbSet JNZB_ACTIVITIES { get; set; } + public virtual DbSet MEMBERSHIP { get; set; } + public virtual DbSet MYSCHEDULE { get; set; } + public virtual DbSet Mailboxes { get; set; } + public virtual DbSet Majors { get; set; } + public virtual DbSet MembershipView { get; set; } + public virtual DbSet Message_Rooms { get; set; } + public virtual DbSet Messages { get; set; } + public virtual DbSet PART_DEF { get; set; } + public virtual DbSet Police { get; set; } + public virtual DbSet REQUEST { get; set; } + public virtual DbSet RoomAssign { get; set; } + public virtual DbSet Rooms { get; set; } + public virtual DbSet Save_Bookings { get; set; } + public virtual DbSet Save_Rides { get; set; } + public virtual DbSet Schedule_Control { get; set; } + public virtual DbSet Slider_Images { get; set; } + public virtual DbSet States { get; set; } + public virtual DbSet Student { get; set; } + public virtual DbSet StudentNewsExpiration { get; set; } + public virtual DbSet Timesheets_Clock_In_Out { get; set; } + public virtual DbSet User_Connection_Ids { get; set; } + public virtual DbSet User_Rooms { get; set; } + public virtual DbSet Users { get; set; } + public virtual DbSet<_360_SLIDER> _360_SLIDER { get; set; } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToView("ACCOUNT"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ACT_CDE) + .HasName("PK_Activity_Info"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ADMIN_ID) + .HasName("PK_Admin"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Alumni"); + + entity.Property(e => e.Country).IsFixedLength(); + + entity.Property(e => e.grad_student).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Birthdays"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Buildings"); + + entity.Property(e => e.BLDG_CDE).IsFixedLength(); + + entity.Property(e => e.BUILDING_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("CM_SESSION_MSTR"); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("ChapelEvent"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.ID_NUM, e.ACCESS_CODE }) + .HasName("PK_CliftonStrengths"); + + entity.Property(e => e.Private).HasComment("Whether the user wants their strengths to be private (not shown to other users)"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Countries"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("DiningInfo"); + + entity.Property(e => e.ChoiceDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Choice_Desc"); + + entity.Property(e => e.Meal_Choice_Desc).IsFixedLength(); + + entity.Property(e => e.Meal_Choice_Id).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Plan_Change_History"); + + entity.Property(e => e.OLD_PLAN_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Meal_Plan_Id_Mapping"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Mealplans"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Dining_Student_Meal_Choice"); + + entity.Property(e => e.MEAL_CHOICE_ID).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("EmergencyContact"); + + entity.Property(e => e.AddressAddrCode).IsFixedLength(); + + entity.Property(e => e.ApprowVersion) + .IsRowVersion() + .IsConcurrencyToken(); + + entity.Property(e => e.EmailAddrCode).IsFixedLength(); + + entity.Property(e => e.HomeAddrCode).IsFixedLength(); + + entity.Property(e => e.HomeExt).IsFixedLength(); + + entity.Property(e => e.HomePhone).IsFixedLength(); + + entity.Property(e => e.MobileAddrCode).IsFixedLength(); + + entity.Property(e => e.MobileExt).IsFixedLength(); + + entity.Property(e => e.MobilePhone).IsFixedLength(); + + entity.Property(e => e.WorkAddrCode).IsFixedLength(); + + entity.Property(e => e.WorkExr).IsFixedLength(); + + entity.Property(e => e.WorkPhone).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("FacStaff"); + + entity.Property(e => e.BuildingDescription).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Graduation"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.Created, e.ID_Num }) + .HasName("PK__Health_S__6CC83B6815B808A2"); + + entity.HasOne(d => d.HealthStatus) + .WithMany(p => p.Health_Status) + .HasForeignKey(d => d.HealthStatusID) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Health_Status_HealthStatus_CTRL"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.HousingAppID, e.Username }); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.HasOne(d => d.HousingApp) + .WithMany(p => p.Housing_Applicants) + .HasForeignKey(d => d.HousingAppID) + .HasConstraintName("FK_Applicants_HousingAppID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasOne(d => d.HousingApp) + .WithMany() + .HasForeignKey(d => d.HousingAppID) + .HasConstraintName("FK_HallChoices_HousingAppID"); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.TimeStamp).HasDefaultValueSql("(getdate())"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Internships_as_Involvements"); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.TRM_CDE).IsFixedLength(); + + entity.Property(e => e.YR_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("InvolvementOffering"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("JENZ_ACT_CLUB_DEF"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.ACT_DESC).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE).IsFixedLength(); + + entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.INCL_PROFILE_RPT).IsFixedLength(); + + entity.Property(e => e.JOB_NAME).IsFixedLength(); + + entity.Property(e => e.MEMBERSHIP_STS).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.TRACK_MTG_ATTEND).IsFixedLength(); + + entity.Property(e => e.USER_NAME).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.MEMBERSHIP_ID) + .HasName("PK_Membership"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.JOB_NAME).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + + entity.Property(e => e.USER_NAME).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.EVENT_ID, e.GORDON_ID }); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Mailboxes"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Majors"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("MembershipView"); + + entity.Property(e => e.ActivityCode).IsFixedLength(); + + entity.Property(e => e.ActivityDescription).IsFixedLength(); + + entity.Property(e => e.Participation).IsFixedLength(); + + entity.Property(e => e.ParticipationDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.room_id) + .HasName("PK__Message___19675A8A3E781488"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("PART_DEF"); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.PART_DESC).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Police"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.REQUEST_ID) + .HasName("PK_Request"); + + entity.Property(e => e.ACT_CDE).IsFixedLength(); + + entity.Property(e => e.PART_CDE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("RoomAssign"); + + entity.Property(e => e.BLDG_CDE).IsFixedLength(); + + entity.Property(e => e.BLDG_LOC_CDE).IsFixedLength(); + + entity.Property(e => e.ROOM_ASSIGN_STS).IsFixedLength(); + + entity.Property(e => e.ROOM_CDE).IsFixedLength(); + + entity.Property(e => e.ROOM_TYPE).IsFixedLength(); + + entity.Property(e => e.SESS_CDE).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.ID, e.rideID }); + + entity.HasOne(d => d.ride) + .WithMany(p => p.Save_Bookings) + .HasForeignKey(d => d.rideID) + .HasConstraintName("FK_booking_rides"); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.IsSchedulePrivate).HasDefaultValueSql("((1))"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("States"); + }); + + modelBuilder.Entity(entity => + { + entity.ToView("Student"); + + entity.Property(e => e.BuildingDescription).IsFixedLength(); + + entity.Property(e => e.Country).IsFixedLength(); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.SNID) + .HasName("PK_StudentNewsExpiration_SNID"); + + entity.Property(e => e.SNID).ValueGeneratedNever(); + }); + + modelBuilder.Entity<_360_SLIDER>(entity => + { + entity.ToView("360_SLIDER"); + }); + + modelBuilder.HasSequence("Information_Change_Request_Seq"); + + OnModelCreatingGeneratedProcedures(modelBuilder); + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs index ab8807634..7694bd6c8 100644 --- a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs @@ -1,3955 +1,3955 @@ -// This file has been auto generated by EF Core Power Tools. -using Gordon360.Models.CCT; -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public partial class CCTContext - { - private ICCTContextProcedures _procedures; - - public virtual ICCTContextProcedures Procedures - { - get - { - if (_procedures is null) _procedures = new CCTContextProcedures(this); - return _procedures; - } - set - { - _procedures = value; - } - } - - public ICCTContextProcedures GetProcedures() - { - return Procedures; - } - - protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) - { - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - } - } - - public partial class CCTContextProcedures : ICCTContextProcedures - { - private readonly CCTContext _context; - - public CCTContextProcedures(CCTContext context) - { - _context = context; - } - - public virtual async Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ACTIVE_CLUBS_PER_SESS_ID] @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_SEPARATE] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_MEMBERSHIPS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_REQUESTS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_SUPERVISORS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "username", - Size = 64, - Value = username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CAN_READ_STUDENT_SCHEDULES] @username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CANCEL_RIDE] @STUDENT_ID, @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = -1, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CHECK_ID] @_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "professor_id", - Value = professor_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[COURSES_FOR_PROFESSOR] @professor_id, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Size = 25, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "RIDEID", - Size = 10, - Value = RIDEID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ISDRIVER", - Value = ISDRIVER ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.TinyInt, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_BOOKING] @ID, @RIDEID, @ISDRIVER", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "name", - Size = -1, - Value = name ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "group", - Value = group ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "roomImage", - Size = -1, - Value = roomImage ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CREATE_MESSAGE_ROOM] @name, @group, @roomImage", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LOCATION", - Size = 50, - Value = LOCATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESCRIPTION", - Size = 50, - Value = DESCRIPTION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MON_CDE", - Size = 10, - Value = MON_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TUE_CDE", - Size = 10, - Value = TUE_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "WED_CDE", - Size = 10, - Value = WED_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "THU_CDE", - Size = 10, - Value = THU_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FRI_CDE", - Size = 10, - Value = FRI_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SAT_CDE", - Size = 10, - Value = SAT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SUN_CDE", - Size = 10, - Value = SUN_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "IS_ALLDAY", - Value = IS_ALLDAY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "BEGINTIME", - Scale = 7, - Value = BEGINTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Scale = 7, - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDEID", - Size = 10, - Value = RIDEID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESTINATION", - Size = 72, - Value = DESTINATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MEETINGPOINT", - Size = 72, - Value = MEETINGPOINT ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "STARTTIME", - Value = STARTTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "CAPACITY", - Value = CAPACITY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOTES", - Size = 500, - Value = NOTES ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CANCELED", - Value = CANCELED ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.TinyInt, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_RIDE] @RIDEID, @DESTINATION, @MEETINGPOINT, @STARTTIME, @ENDTIME, @CAPACITY, @NOTES, @CANCELED", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FACEBOOK", - Size = -1, - Value = FACEBOOK ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TWITTER", - Size = -1, - Value = TWITTER ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "INSTAGRAM", - Size = -1, - Value = INSTAGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LINKEDIN", - Size = -1, - Value = LINKEDIN ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "HANDSHAKE", - Size = -1, - Value = HANDSHAKE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_SOCIAL_LINKS] @USERNAME, @FACEBOOK, @TWITTER, @INSTAGRAM, @LINKEDIN, @HANDSHAKE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CURRENT_SESSION]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APARTMENT_CHOICE] @APPLICATION_ID, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APP_ID", - Value = APP_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICATION] @APP_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ID", - Size = 25, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKING] @RIDE_ID, @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKINGS] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_Num", - Size = 25, - Value = ID_Num ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_CLOCK_IN] @ID_Num", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_MYSCHEDULE] @EVENTID, @GORDONID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SNID", - Value = SNID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_NEWS_ITEM] @SNID, @Username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 25, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_RIDE] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "connection_id", - Size = 72, - Value = connection_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_CONNECTION_ID] @connection_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Size = -1, - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_ROOM] @room_id, @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DINING_INFO_BY_STUDENT_ID] @STUDENT_ID, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[DISTINCT_ACT_TYPE] @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GET_FINALIZATION_STATUS] @UserID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FeatureID", - Size = 255, - Value = FeatureID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETDEMOGRAPHIC] @UserID, @FeatureID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETHOLDSBYID] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED] @UserID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "PhoneUnformatted", - Size = 255, - Value = PhoneUnformatted ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DoNotPublish", - Value = DoNotPublish ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "NoneProvided", - Value = NoneProvided ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATECELLPHONE] @UserID, @PhoneUnformatted, @DoNotPublish, @NoneProvided", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "RaceValue", - Size = 50, - Value = RaceValue ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "EthnicityValue", - Value = EthnicityValue ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATEDEMOGRAPHIC] @UserID, @RaceValue, @EthnicityValue", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_HALLS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_NAME_AND_DATE] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "STUDENT_USERNAME", - Size = 50, - Value = STUDENT_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS] @SESS_CDE, @STUDENT_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_DETAILS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS_BY_ID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APP_IDS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APPLICATIONS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_EDITOR_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID] @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id_list", - Size = -1, - Value = user_id_list ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST] @user_id_list", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_MESSAGES_BY_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_ROOMS_BY_ID] @user_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_USERS_BY_ROOM_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Size = 10, - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_BIRTH_DATE_BY_ID] @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_HEALTH_CHECK_QUESTION]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_LATEST_ROOM]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ROOM_BY_ID] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "message_id", - Size = -1, - Value = message_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_SINGLE_MESSAGE_BY_ID] @room_id, @message_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ADMIN_ID", - Size = 10, - Value = ADMIN_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RANKING", - Value = RANKING ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APARTMENT_CHOICE] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "APRT_PROGRAM", - Size = 50, - Value = APRT_PROGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICATION] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Question", - Size = -1, - Value = Question ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "YesPrompt", - Size = -1, - Value = YesPrompt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "NoPrompt", - Size = -1, - Value = NoPrompt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_HEALTH_QUESTION] @Question, @YesPrompt, @NoPrompt", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = 72, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "room_id", - Size = 72, - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "text", - Size = -1, - Value = text ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.NVarChar, - }, - new SqlParameter - { - ParameterName = "createdAt", - Value = createdAt ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "image", - Size = -1, - Value = image ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "video", - Size = -1, - Value = video ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "audio", - Size = -1, - Value = audio ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - new SqlParameter - { - ParameterName = "system", - Value = system ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "sent", - Value = sent ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "received", - Value = received ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - new SqlParameter - { - ParameterName = "pending", - Value = pending ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_MESSAGE] @_id, @room_id, @text, @createdAt, @user_id, @image, @video, @audio, @system, @sent, @received, @pending", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CategoryID", - Value = CategoryID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Subject", - Size = 60, - Value = Subject ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Body", - Size = 6000, - Value = Body ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSERT_NEWS_ITEM] @Username, @CategoryID, @Subject, @Body", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "State", - Value = State ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Bit, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM, @State", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "_id", - Size = 72, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "name", - Size = 72, - Value = name ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "avatar", - Size = -1, - Value = avatar ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarBinary, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER] @_id, @name, @avatar", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "connection_id", - Size = 72, - Value = connection_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_CONNECTION_ID] @user_id, @connection_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "user_id", - Size = 72, - Value = user_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "_id", - Size = -1, - Value = _id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_ROOMS] @user_id, @_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "instructor_id", - Value = instructor_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE] @instructor_id, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MYSCHEDULE_BY_ID] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_CATEGORIES]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NEW]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NOT_EXPIRED]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_PERSONAL_UNAPPROVED] @Username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[PHOTO_INFO_PER_USER_NAME] @ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "REQUEST_ID", - Value = REQUEST_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUEST_PER_REQUEST_ID] @REQUEST_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "RIDE_ID", - Size = 10, - Value = RIDE_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[RIDERS_BY_RIDE_ID] @RIDE_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "id_num", - Value = id_num ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "sess_cde", - Size = 8, - Value = sess_cde ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE] @id_num, @sess_cde", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_JOBS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SUP_ID", - Value = SUP_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISOR_PER_SUP_ID] @SUP_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "RANKING", - Value = RANKING ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "HALL_NAME", - Size = 15, - Value = HALL_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APARTMENT_CHOICES] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "USERNAME", - Size = 50, - Value = USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "APRT_PROGRAM", - Size = 50, - Value = APRT_PROGRAM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SESS_CDE", - Size = 8, - Value = SESS_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "APPLICATION_ID", - Value = APPLICATION_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "EDITOR_USERNAME", - Size = 50, - Value = EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "NOW", - Value = NOW ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - new SqlParameter - { - ParameterName = "NEW_EDITOR_USERNAME", - Size = 50, - Value = NEW_EDITOR_USERNAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_EDITOR] @APPLICATION_ID, @EDITOR_USERNAME, @NOW, @NEW_EDITOR_USERNAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ACT_INFO]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "UserID", - Size = 9, - Value = UserID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "PhoneUnformatted", - Size = 255, - Value = PhoneUnformatted ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPDATE_CELL_PHONE] @UserID, @PhoneUnformatted", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 200, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_DESCRIPTION] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "StudentID", - Value = StudentID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "ContactNum", - Value = ContactNum ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "ContactLastName", - Size = 30, - Value = ContactLastName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ContactFirstName", - Size = 15, - Value = ContactFirstName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "ContactHomePhone", - Size = 20, - Value = ContactHomePhone ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "ContactMobilePhone", - Size = 20, - Value = ContactMobilePhone ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - new SqlParameter - { - ParameterName = "ContactRelationship", - Size = 60, - Value = ContactRelationship ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Notes", - Size = 100, - Value = Notes ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 513, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "JobName", - Size = 30, - Value = JobName ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_EMRGCONTACT] @StudentID, @ContactNum, @ContactLastName, @ContactFirstName, @ContactHomePhone, @ContactMobilePhone, @ContactRelationship, @Notes, @Username, @JobName", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ResponderEmail", - Size = 256, - Value = ResponderEmail ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[Update_Health_Status_Upon_Form_Completion] @ResponderEmail", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "EVENTID", - Size = 10, - Value = EVENTID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "GORDONID", - Size = 10, - Value = GORDONID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "LOCATION", - Size = 50, - Value = LOCATION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "DESCRIPTION", - Size = 50, - Value = DESCRIPTION ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "MON_CDE", - Size = 10, - Value = MON_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "TUE_CDE", - Size = 10, - Value = TUE_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "WED_CDE", - Size = 10, - Value = WED_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "THU_CDE", - Size = 10, - Value = THU_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FRI_CDE", - Size = 10, - Value = FRI_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SAT_CDE", - Size = 10, - Value = SAT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "SUN_CDE", - Size = 10, - Value = SUN_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "IS_ALLDAY", - Value = IS_ALLDAY ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "BEGINTIME", - Scale = 7, - Value = BEGINTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - new SqlParameter - { - ParameterName = "ENDTIME", - Scale = 7, - Value = ENDTIME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Time, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SNID", - Value = SNID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Username", - Size = 50, - Value = Username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "CategoryID", - Value = CategoryID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "Subject", - Size = 60, - Value = Subject ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Body", - Size = 6000, - Value = Body ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "Image", - Size = 100, - Value = Image ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_NEWS_ITEM] @SNID, @Username, @CategoryID, @Subject, @Body, @Image", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHONE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "FILE_PATH", - Size = 255, - Value = FILE_PATH ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - new SqlParameter - { - ParameterName = "FILE_NAME", - Size = 255, - Value = FILE_NAME ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHOTO_PATH] @ID, @FILE_PATH, @FILE_NAME", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "room_id", - Value = room_id ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ROOM] @room_id", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SCHEDULE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACCOUNT_ID", - Value = ACCOUNT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Size = 1, - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SHOW_PIC] @ACCOUNT_ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID", - Value = ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - new SqlParameter - { - ParameterName = "VALUE", - Value = VALUE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.DateTime, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_TIMESTAMP] @ID, @VALUE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "DRIVERID", - Size = 25, - Value = DRIVERID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VALID_DRIVES_BY_ID] @DRIVERID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "STUDENT_ID", - Value = STUDENT_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VICTORY_PROMISE_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - } -} +// This file has been auto generated by EF Core Power Tools. +using Gordon360.Models.CCT; +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public partial class CCTContext + { + private ICCTContextProcedures _procedures; + + public virtual ICCTContextProcedures Procedures + { + get + { + if (_procedures is null) _procedures = new CCTContextProcedures(this); + return _procedures; + } + set + { + _procedures = value; + } + } + + public ICCTContextProcedures GetProcedures() + { + return Procedures; + } + + protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) + { + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + modelBuilder.Entity().HasNoKey().ToView(null); + } + } + + public partial class CCTContextProcedures : ICCTContextProcedures + { + private readonly CCTContext _context; + + public CCTContextProcedures(CCTContext context) + { + _context = context; + } + + public virtual async Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ACTIVE_CLUBS_PER_SESS_ID] @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ADVISOR_SEPARATE] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_MEMBERSHIPS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_REQUESTS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_SUPERVISORS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "username", + Size = 64, + Value = username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CAN_READ_STUDENT_SCHEDULES] @username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CANCEL_RIDE] @STUDENT_ID, @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = -1, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CHECK_ID] @_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "professor_id", + Value = professor_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[COURSES_FOR_PROFESSOR] @professor_id, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Size = 25, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "RIDEID", + Size = 10, + Value = RIDEID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ISDRIVER", + Value = ISDRIVER ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.TinyInt, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_BOOKING] @ID, @RIDEID, @ISDRIVER", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "name", + Size = -1, + Value = name ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "group", + Value = group ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "roomImage", + Size = -1, + Value = roomImage ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CREATE_MESSAGE_ROOM] @name, @group, @roomImage", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LOCATION", + Size = 50, + Value = LOCATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESCRIPTION", + Size = 50, + Value = DESCRIPTION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MON_CDE", + Size = 10, + Value = MON_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TUE_CDE", + Size = 10, + Value = TUE_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "WED_CDE", + Size = 10, + Value = WED_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "THU_CDE", + Size = 10, + Value = THU_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FRI_CDE", + Size = 10, + Value = FRI_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SAT_CDE", + Size = 10, + Value = SAT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SUN_CDE", + Size = 10, + Value = SUN_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "IS_ALLDAY", + Value = IS_ALLDAY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "BEGINTIME", + Scale = 7, + Value = BEGINTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Scale = 7, + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDEID", + Size = 10, + Value = RIDEID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESTINATION", + Size = 72, + Value = DESTINATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MEETINGPOINT", + Size = 72, + Value = MEETINGPOINT ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "STARTTIME", + Value = STARTTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "CAPACITY", + Value = CAPACITY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOTES", + Size = 500, + Value = NOTES ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CANCELED", + Value = CANCELED ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.TinyInt, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_RIDE] @RIDEID, @DESTINATION, @MEETINGPOINT, @STARTTIME, @ENDTIME, @CAPACITY, @NOTES, @CANCELED", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FACEBOOK", + Size = -1, + Value = FACEBOOK ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TWITTER", + Size = -1, + Value = TWITTER ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "INSTAGRAM", + Size = -1, + Value = INSTAGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LINKEDIN", + Size = -1, + Value = LINKEDIN ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "HANDSHAKE", + Size = -1, + Value = HANDSHAKE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CREATE_SOCIAL_LINKS] @USERNAME, @FACEBOOK, @TWITTER, @INSTAGRAM, @LINKEDIN, @HANDSHAKE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[CURRENT_SESSION]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APARTMENT_CHOICE] @APPLICATION_ID, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APP_ID", + Value = APP_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_AA_APPLICATION] @APP_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ID", + Size = 25, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKING] @RIDE_ID, @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_BOOKINGS] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_Num", + Size = 25, + Value = ID_Num ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_CLOCK_IN] @ID_Num", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_MYSCHEDULE] @EVENTID, @GORDONID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SNID", + Value = SNID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_NEWS_ITEM] @SNID, @Username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 25, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_RIDE] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "connection_id", + Size = 72, + Value = connection_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_CONNECTION_ID] @connection_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Size = -1, + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DELETE_USER_ROOM] @room_id, @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[DINING_INFO_BY_STUDENT_ID] @STUDENT_ID, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[DISTINCT_ACT_TYPE] @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GET_FINALIZATION_STATUS] @UserID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FeatureID", + Size = 255, + Value = FeatureID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETDEMOGRAPHIC] @UserID, @FeatureID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_GETHOLDSBYID] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED] @UserID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "PhoneUnformatted", + Size = 255, + Value = PhoneUnformatted ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DoNotPublish", + Value = DoNotPublish ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "NoneProvided", + Value = NoneProvided ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATECELLPHONE] @UserID, @PhoneUnformatted, @DoNotPublish, @NoneProvided", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "RaceValue", + Size = 50, + Value = RaceValue ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "EthnicityValue", + Value = EthnicityValue ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[FINALIZATION_UPDATEDEMOGRAPHIC] @UserID, @RaceValue, @EthnicityValue", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APARTMENT_HALLS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_NAME_AND_DATE] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "STUDENT_USERNAME", + Size = 50, + Value = STUDENT_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS] @SESS_CDE, @STUDENT_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICANTS_DETAILS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_APPLICATIONS_BY_ID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APP_IDS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_CURRENT_APPLICATIONS]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_AA_EDITOR_BY_APPID] @APPLICATION_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID] @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id_list", + Size = -1, + Value = user_id_list ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST] @user_id_list", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_MESSAGES_BY_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_ROOMS_BY_ID] @user_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ALL_USERS_BY_ROOM_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Size = 10, + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_BIRTH_DATE_BY_ID] @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_HEALTH_CHECK_QUESTION]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_LATEST_ROOM]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_ROOM_BY_ID] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "message_id", + Size = -1, + Value = message_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_SINGLE_MESSAGE_BY_ID] @room_id, @message_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GET_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ADMIN_ID", + Size = 10, + Value = ADMIN_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_ADMIN] @ADMIN_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RANKING", + Value = RANKING ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APARTMENT_CHOICE] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "APRT_PROGRAM", + Size = 50, + Value = APRT_PROGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_AA_APPLICATION] @NOW, @EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Question", + Size = -1, + Value = Question ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "YesPrompt", + Size = -1, + Value = YesPrompt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "NoPrompt", + Size = -1, + Value = NoPrompt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_HEALTH_QUESTION] @Question, @YesPrompt, @NoPrompt", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = 72, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "room_id", + Size = 72, + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "text", + Size = -1, + Value = text ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.NVarChar, + }, + new SqlParameter + { + ParameterName = "createdAt", + Value = createdAt ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "image", + Size = -1, + Value = image ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "video", + Size = -1, + Value = video ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "audio", + Size = -1, + Value = audio ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + new SqlParameter + { + ParameterName = "system", + Value = system ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "sent", + Value = sent ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "received", + Value = received ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + new SqlParameter + { + ParameterName = "pending", + Value = pending ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_MESSAGE] @_id, @room_id, @text, @createdAt, @user_id, @image, @video, @audio, @system, @sent, @received, @pending", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CategoryID", + Value = CategoryID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Subject", + Size = 60, + Value = Subject ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Body", + Size = 6000, + Value = Body ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSERT_NEWS_ITEM] @Username, @CategoryID, @Subject, @Body", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "State", + Value = State ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Bit, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT] @ID_NUM, @State", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "_id", + Size = 72, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "name", + Size = 72, + Value = name ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "avatar", + Size = -1, + Value = avatar ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarBinary, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER] @_id, @name, @avatar", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "connection_id", + Size = 72, + Value = connection_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_CONNECTION_ID] @user_id, @connection_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "user_id", + Size = 72, + Value = user_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "_id", + Size = -1, + Value = _id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[INSERT_USER_ROOMS] @user_id, @_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "instructor_id", + Value = instructor_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE] @instructor_id, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_EMAILS_PER_ACT_CDE] @ACT_CDE, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MEMBERSHIPS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[MYSCHEDULE_BY_ID] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_CATEGORIES]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NEW]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_NOT_EXPIRED]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[NEWS_PERSONAL_UNAPPROVED] @Username", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[PHOTO_INFO_PER_USER_NAME] @ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "REQUEST_ID", + Value = REQUEST_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUEST_PER_REQUEST_ID] @REQUEST_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[REQUESTS_PER_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "RIDE_ID", + Size = 10, + Value = RIDE_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[RIDERS_BY_RIDE_ID] @RIDE_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "id_num", + Value = id_num ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "sess_cde", + Size = 8, + Value = sess_cde ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE] @id_num, @sess_cde", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[STUDENT_JOBS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SUP_ID", + Value = SUP_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISOR_PER_SUP_ID] @SUP_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACT_CDE", + Size = 8, + Value = ACT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID_NUM", + Value = ID_NUM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPCOMING_RIDES_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "RANKING", + Value = RANKING ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "HALL_NAME", + Size = 15, + Value = HALL_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APARTMENT_CHOICES] @APPLICATION_ID, @RANKING, @HALL_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "USERNAME", + Size = 50, + Value = USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "APRT_PROGRAM", + Size = 50, + Value = APRT_PROGRAM ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SESS_CDE", + Size = 8, + Value = SESS_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICANT] @APPLICATION_ID, @USERNAME, @APRT_PROGRAM, @SESS_CDE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED] @APPLICATION_ID, @NOW", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "APPLICATION_ID", + Value = APPLICATION_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "EDITOR_USERNAME", + Size = 50, + Value = EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "NOW", + Value = NOW ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + new SqlParameter + { + ParameterName = "NEW_EDITOR_USERNAME", + Size = 50, + Value = NEW_EDITOR_USERNAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_AA_APPLICATION_EDITOR] @APPLICATION_ID, @EDITOR_USERNAME, @NOW, @NEW_EDITOR_USERNAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ACT_INFO]", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "UserID", + Size = 9, + Value = UserID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "PhoneUnformatted", + Size = 255, + Value = PhoneUnformatted ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[UPDATE_CELL_PHONE] @UserID, @PhoneUnformatted", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 200, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_DESCRIPTION] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "StudentID", + Value = StudentID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "ContactNum", + Value = ContactNum ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "ContactLastName", + Size = 30, + Value = ContactLastName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ContactFirstName", + Size = 15, + Value = ContactFirstName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "ContactHomePhone", + Size = 20, + Value = ContactHomePhone ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "ContactMobilePhone", + Size = 20, + Value = ContactMobilePhone ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Char, + }, + new SqlParameter + { + ParameterName = "ContactRelationship", + Size = 60, + Value = ContactRelationship ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Notes", + Size = 100, + Value = Notes ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 513, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "JobName", + Size = 30, + Value = JobName ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_EMRGCONTACT] @StudentID, @ContactNum, @ContactLastName, @ContactFirstName, @ContactHomePhone, @ContactMobilePhone, @ContactRelationship, @Notes, @Username, @JobName", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ResponderEmail", + Size = 256, + Value = ResponderEmail ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[Update_Health_Status_Upon_Form_Completion] @ResponderEmail", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "EVENTID", + Size = 10, + Value = EVENTID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "GORDONID", + Size = 10, + Value = GORDONID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "LOCATION", + Size = 50, + Value = LOCATION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "DESCRIPTION", + Size = 50, + Value = DESCRIPTION ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "MON_CDE", + Size = 10, + Value = MON_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "TUE_CDE", + Size = 10, + Value = TUE_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "WED_CDE", + Size = 10, + Value = WED_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "THU_CDE", + Size = 10, + Value = THU_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FRI_CDE", + Size = 10, + Value = FRI_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SAT_CDE", + Size = 10, + Value = SAT_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "SUN_CDE", + Size = 10, + Value = SUN_CDE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "IS_ALLDAY", + Value = IS_ALLDAY ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "BEGINTIME", + Scale = 7, + Value = BEGINTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + new SqlParameter + { + ParameterName = "ENDTIME", + Scale = 7, + Value = ENDTIME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Time, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_MYSCHEDULE] @EVENTID, @GORDONID, @LOCATION, @DESCRIPTION, @MON_CDE, @TUE_CDE, @WED_CDE, @THU_CDE, @FRI_CDE, @SAT_CDE, @SUN_CDE, @IS_ALLDAY, @BEGINTIME, @ENDTIME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "SNID", + Value = SNID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Username", + Size = 50, + Value = Username ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "CategoryID", + Value = CategoryID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "Subject", + Size = 60, + Value = Subject ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Body", + Size = 6000, + Value = Body ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "Image", + Size = 100, + Value = Image ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_NEWS_ITEM] @SNID, @Username, @CategoryID, @Subject, @Body, @Image", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHONE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "FILE_PATH", + Size = 255, + Value = FILE_PATH ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + new SqlParameter + { + ParameterName = "FILE_NAME", + Size = 255, + Value = FILE_NAME ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_PHOTO_PATH] @ID, @FILE_PATH, @FILE_NAME", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "room_id", + Value = room_id ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_ROOM] @room_id", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SCHEDULE_PRIVACY] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ACCOUNT_ID", + Value = ACCOUNT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Size = 1, + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_SHOW_PIC] @ACCOUNT_ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "ID", + Value = ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + new SqlParameter + { + ParameterName = "VALUE", + Value = VALUE ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.DateTime, + }, + parameterreturnValue, + }; + var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[UPDATE_TIMESTAMP] @ID, @VALUE", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "DRIVERID", + Size = 25, + Value = DRIVERID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.VarChar, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VALID_DRIVES_BY_ID] @DRIVERID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + + public virtual async Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) + { + var parameterreturnValue = new SqlParameter + { + ParameterName = "returnValue", + Direction = System.Data.ParameterDirection.Output, + SqlDbType = System.Data.SqlDbType.Int, + }; + + var sqlParameters = new [] + { + new SqlParameter + { + ParameterName = "STUDENT_ID", + Value = STUDENT_ID ?? Convert.DBNull, + SqlDbType = System.Data.SqlDbType.Int, + }, + parameterreturnValue, + }; + var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[VICTORY_PROMISE_BY_STUDENT_ID] @STUDENT_ID", sqlParameters, cancellationToken); + + returnValue?.SetValue(parameterreturnValue.Value); + + return _; + } + } +} diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index edaf41b6c..925c7e6ee 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,11 +1,9 @@ // This file has been auto generated by EF Core Power Tools. -using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data.Common; using System.Linq; using System.Threading; @@ -32,13 +30,6 @@ public static async Task> SqlQueryAsync(this DbContext db, string sql return default; } } - - public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) - { - SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; - await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); - return (int)result.Value; - } } public class OutputParameter diff --git a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs index 86af0ecca..71317783e 100644 --- a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs @@ -1,133 +1,133 @@ -// This file has been auto generated by EF Core Power Tools. -using Gordon360.Models.CCT; -using Microsoft.Data.SqlClient; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading; -using System.Threading.Tasks; - -namespace Gordon360.Models.CCT.Context -{ - public partial interface ICCTContextProcedures - { - Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - } -} +// This file has been auto generated by EF Core Power Tools. +using Gordon360.Models.CCT; +using Microsoft.Data.SqlClient; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Threading; +using System.Threading.Tasks; + +namespace Gordon360.Models.CCT.Context +{ + public partial interface ICCTContextProcedures + { + Task> ACTIVE_CLUBS_PER_SESS_IDAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ADVISOR_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ADVISOR_SEPARATEAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_BASIC_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_BOOKINGAsync(string ID, string RIDEID, byte? ISDRIVER, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> CREATE_MESSAGE_ROOMAsync(string name, bool? group, byte[] roomImage, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_RIDEAsync(string RIDEID, string DESTINATION, string MEETINGPOINT, DateTime? STARTTIME, DateTime? ENDTIME, int? CAPACITY, string NOTES, byte? CANCELED, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task CREATE_SOCIAL_LINKSAsync(string USERNAME, string FACEBOOK, string TWITTER, string INSTAGRAM, string LINKEDIN, string HANDSHAKE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> CURRENT_SESSIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_AA_APPLICATIONAsync(int? APP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_BOOKINGAsync(string RIDE_ID, string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_BOOKINGSAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_CLOCK_INAsync(string ID_Num, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_MYSCHEDULEAsync(string EVENTID, string GORDONID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_NEWS_ITEMAsync(int? SNID, string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_RIDEAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_USER_CONNECTION_IDAsync(string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DELETE_USER_ROOMAsync(string room_id, string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task DINING_INFO_BY_STUDENT_IDAsync(int? STUDENT_ID, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> DISTINCT_ACT_TYPEAsync(string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GET_FINALIZATION_STATUSAsync(int? UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GETDEMOGRAPHICAsync(string UserID, string FeatureID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_GETHOLDSBYIDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDAsync(string UserID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_UPDATECELLPHONEAsync(string UserID, string PhoneUnformatted, bool? DoNotPublish, bool? NoneProvided, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> FINALIZATION_UPDATEDEMOGRAPHICAsync(string UserID, string RaceValue, int? EthnicityValue, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APARTMENT_CHOICES_BY_APP_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APARTMENT_HALLSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPID_BY_NAME_AND_DATEAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPID_BY_STU_ID_AND_SESSAsync(string SESS_CDE, string STUDENT_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICANTS_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICANTS_DETAILSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_APPLICATIONS_BY_IDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_CURRENT_APP_IDSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_CURRENT_APPLICATIONSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_AA_EDITOR_BY_APPIDAsync(int? APPLICATION_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_CONNECTION_IDS_BY_IDAsync(int? user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_CONNECTION_IDS_BY_ID_LISTAsync(string user_id_list, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_MESSAGES_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_ROOMS_BY_IDAsync(string user_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ALL_USERS_BY_ROOM_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_BIRTH_DATE_BY_IDAsync(string ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_HEALTH_CHECK_QUESTIONAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_LATEST_ROOMAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_ROOM_BY_IDAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_SINGLE_MESSAGE_BY_IDAsync(int? room_id, string message_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GET_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> GRP_ADMIN_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_ADMINAsync(string ADMIN_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APARTMENT_CHOICEAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_AA_APPLICATIONAsync(DateTime? NOW, string EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_HEALTH_QUESTIONAsync(string Question, string YesPrompt, string NoPrompt, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_MESSAGEAsync(string _id, string room_id, string text, DateTime? createdAt, string user_id, byte[] image, byte[] video, byte[] audio, bool? system, bool? sent, bool? received, bool? pending, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> INSERT_NEWS_ITEMAsync(string Username, int? CategoryID, string Subject, string Body, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_TIMESHEETS_CLOCK_IN_OUTAsync(int? ID_NUM, bool? State, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USERAsync(string _id, string name, byte[] avatar, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USER_CONNECTION_IDAsync(string user_id, string connection_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task INSERT_USER_ROOMSAsync(string user_id, string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? instructor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> LEADER_EMAILS_PER_ACT_CDEAsync(string ACT_CDE, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> LEADER_MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MEMBERSHIPS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MEMBERSHIPS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> MYSCHEDULE_BY_IDAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_CATEGORIESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_NEWAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_NOT_EXPIREDAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> NEWS_PERSONAL_UNAPPROVEDAsync(string Username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> PHOTO_INFO_PER_USER_NAMEAsync(int? ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUEST_PER_REQUEST_IDAsync(int? REQUEST_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUESTS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> REQUESTS_PER_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APARTMENT_CHOICESAsync(int? APPLICATION_ID, int? RANKING, string HALL_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICANTAsync(int? APPLICATION_ID, string USERNAME, string APRT_PROGRAM, string SESS_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_DATEMODIFIEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_DATESUBMITTEDAsync(int? APPLICATION_ID, DateTime? NOW, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_AA_APPLICATION_EDITORAsync(int? APPLICATION_ID, string EDITOR_USERNAME, DateTime? NOW, string NEW_EDITOR_USERNAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_ACT_INFOAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> UPDATE_CELL_PHONEAsync(string UserID, string PhoneUnformatted, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_DESCRIPTIONAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_EMRGCONTACTAsync(int? StudentID, int? ContactNum, string ContactLastName, string ContactFirstName, string ContactHomePhone, string ContactMobilePhone, string ContactRelationship, string Notes, string Username, string JobName, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task Update_Health_Status_Upon_Form_CompletionAsync(string ResponderEmail, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_MYSCHEDULEAsync(string EVENTID, string GORDONID, string LOCATION, string DESCRIPTION, string MON_CDE, string TUE_CDE, string WED_CDE, string THU_CDE, string FRI_CDE, string SAT_CDE, string SUN_CDE, int? IS_ALLDAY, TimeSpan? BEGINTIME, TimeSpan? ENDTIME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_NEWS_ITEMAsync(int? SNID, string Username, int? CategoryID, string Subject, string Body, string Image, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_PHONE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_PHOTO_PATHAsync(int? ID, string FILE_PATH, string FILE_NAME, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_ROOMAsync(int? room_id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_SCHEDULE_PRIVACYAsync(int? ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_SHOW_PICAsync(int? ACCOUNT_ID, string VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task UPDATE_TIMESTAMPAsync(int? ID, DateTime? VALUE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> VALID_DRIVES_BY_IDAsync(string DRIVERID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + Task> VICTORY_PROMISE_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); + } +} diff --git a/Gordon360/Models/CCT/Context/efpt.CCT.config.json b/Gordon360/Models/CCT/Context/efpt.CCT.config.json index 49033b5a2..1ed4fb92c 100644 --- a/Gordon360/Models/CCT/Context/efpt.CCT.config.json +++ b/Gordon360/Models/CCT/Context/efpt.CCT.config.json @@ -1,741 +1,741 @@ -{ - "CodeGenerationMode": 2, - "ContextClassName": "CCTContext", - "ContextNamespace": null, - "DefaultDacpacSchema": null, - "FilterSchemas": false, - "IncludeConnectionString": false, - "ModelNamespace": null, - "OutputContextPath": "Models\/CCT\/Context", - "OutputPath": "Models\/CCT", - "PreserveCasingWithRegex": true, - "ProjectRootNamespace": "Gordon360", - "Schemas": null, - "SelectedHandlebarsLanguage": 0, - "SelectedToBeGenerated": 0, - "Tables": [ - { - "Name": "[dbo].[ACT_INFO]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[ADMIN]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Clifton_Strengths]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Config]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[CUSTOM_PROFILE]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[ERROR_LOG]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Question]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Status]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Health_Status_CTRL]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Admins]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Applicants]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Applications]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_HallChoices]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Housing_Halls]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Information_Change_Request]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[JNZB_ACTIVITIES]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[MEMBERSHIP]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Message_Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Messages]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[MYSCHEDULE]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[REQUEST]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Save_Bookings]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Save_Rides]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Schedule_Control]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Slider_Images]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[StudentNewsExpiration]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Timesheets_Clock_In_Out]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[User_Connection_Ids]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[User_Rooms]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[Users]", - "ObjectType": 0 - }, - { - "Name": "[dbo].[360_SLIDER]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ACCOUNT]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Alumni]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Birthdays]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Buildings]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ChapelEvent]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[CM_SESSION_MSTR]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Countries]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Choice_Desc]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Plan_Change_History]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Meal_Plan_Id_Mapping]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Mealplans]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Dining_Student_Meal_Choice]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[DiningInfo]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[EmergencyContact]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[FacStaff]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Graduation]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Internships_as_Involvements]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[InvolvementOffering]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[JENZ_ACT_CLUB_DEF]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Mailboxes]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Majors]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[MembershipView]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[PART_DEF]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Police]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[RoomAssign]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[States]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[Student]", - "ObjectType": 3 - }, - { - "Name": "[dbo].[ACTIVE_CLUBS_PER_SESS_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ADVISOR_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ADVISOR_SEPARATE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_BASIC_INFO]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_MEMBERSHIPS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_REQUESTS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[ALL_SUPERVISORS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CAN_READ_STUDENT_SCHEDULES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CANCEL_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CHECK_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[COURSES_FOR_PROFESSOR]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_BOOKING]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_MESSAGE_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CREATE_SOCIAL_LINKS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CURRENT_SESSION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APARTMENT_CHOICE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_AA_APPLICATION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_BOOKING]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_BOOKINGS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_CLOCK_IN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_RIDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_USER_CONNECTION_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DELETE_USER_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DINING_INFO_BY_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[DISTINCT_ACT_TYPE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GET_FINALIZATION_STATUS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GETDEMOGRAPHIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_GETHOLDSBYID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_UPDATECELLPHONE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[FINALIZATION_UPDATEDEMOGRAPHIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APARTMENT_HALLS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPID_BY_NAME_AND_DATE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICANTS_BY_APPID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICANTS_DETAILS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICATIONS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_APPLICATIONS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_CURRENT_APP_IDS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_CURRENT_APPLICATIONS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_AA_EDITOR_BY_APPID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_MESSAGES_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_ROOMS_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ALL_USERS_BY_ROOM_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_BIRTH_DATE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_HEALTH_CHECK_QUESTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_LATEST_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_ROOM_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_SINGLE_MESSAGE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GET_TIMESHEETS_CLOCK_IN_OUT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_ADMIN]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APARTMENT_CHOICE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_AA_APPLICATION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_HEALTH_QUESTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_MESSAGE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER_CONNECTION_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER_ROOMS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSERT_USER]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[LEADER_EMAILS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MEMBERSHIPS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MEMBERSHIPS_PER_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[MYSCHEDULE_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_CATEGORIES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_NEW]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_NOT_EXPIRED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[NEWS_PERSONAL_UNAPPROVED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[PHOTO_INFO_PER_USER_NAME]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUEST_PER_REQUEST_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUESTS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[REQUESTS_PER_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[RIDERS_BY_RIDE_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[STUDENT_JOBS_PER_ID_NUM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISOR_PER_SUP_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ID_NUM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPCOMING_RIDES_BY_STUDENT_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPCOMING_RIDES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APARTMENT_CHOICES]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICANT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_AA_APPLICATION_EDITOR]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_ACT_INFO]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_CELL_PHONE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_DESCRIPTION]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_EMRGCONTACT]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[Update_Health_Status_Upon_Form_Completion]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_MYSCHEDULE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_NEWS_ITEM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_PHONE_PRIVACY]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_PHOTO_PATH]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_ROOM]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_SCHEDULE_PRIVACY]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_SHOW_PIC]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[UPDATE_TIMESTAMP]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[VALID_DRIVES_BY_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[VICTORY_PROMISE_BY_STUDENT_ID]", - "ObjectType": 1 - } - ], - "UiHint": "SQLTrain1.CCT", - "UseBoolPropertiesWithoutDefaultSql": false, - "UseDatabaseNames": true, - "UseDbContextSplitting": false, - "UseFluentApiOnly": false, - "UseHandleBars": false, - "UseHierarchyId": false, - "UseInflector": false, - "UseLegacyPluralizer": false, - "UseManyToManyEntity": false, - "UseNoConstructor": false, - "UseNoDefaultConstructor": false, - "UseNoNavigations": false, - "UseNoObjectFilter": false, - "UseNodaTime": false, - "UseNullableReferences": false, - "UseSchemaFolders": false, - "UseSpatial": false, - "UseT4": false +{ + "CodeGenerationMode": 2, + "ContextClassName": "CCTContext", + "ContextNamespace": null, + "DefaultDacpacSchema": null, + "FilterSchemas": false, + "IncludeConnectionString": false, + "ModelNamespace": null, + "OutputContextPath": "Models\/CCT\/Context", + "OutputPath": "Models\/CCT", + "PreserveCasingWithRegex": true, + "ProjectRootNamespace": "Gordon360", + "Schemas": null, + "SelectedHandlebarsLanguage": 0, + "SelectedToBeGenerated": 0, + "Tables": [ + { + "Name": "[dbo].[ACT_INFO]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[ADMIN]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Clifton_Strengths]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Config]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[CUSTOM_PROFILE]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[ERROR_LOG]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Question]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Status]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Health_Status_CTRL]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Admins]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Applicants]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Applications]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_HallChoices]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Housing_Halls]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Information_Change_Request]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[JNZB_ACTIVITIES]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[MEMBERSHIP]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Message_Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Messages]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[MYSCHEDULE]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[REQUEST]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Save_Bookings]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Save_Rides]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Schedule_Control]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Slider_Images]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[StudentNewsExpiration]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Timesheets_Clock_In_Out]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[User_Connection_Ids]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[User_Rooms]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[Users]", + "ObjectType": 0 + }, + { + "Name": "[dbo].[360_SLIDER]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ACCOUNT]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Alumni]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Birthdays]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Buildings]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ChapelEvent]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[CM_SESSION_MSTR]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Countries]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Choice_Desc]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Plan_Change_History]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Meal_Plan_Id_Mapping]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Mealplans]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Dining_Student_Meal_Choice]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[DiningInfo]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[EmergencyContact]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[FacStaff]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Graduation]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Internships_as_Involvements]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[InvolvementOffering]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[JENZ_ACT_CLUB_DEF]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Mailboxes]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Majors]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[MembershipView]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[PART_DEF]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Police]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[RoomAssign]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[States]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[Student]", + "ObjectType": 3 + }, + { + "Name": "[dbo].[ACTIVE_CLUBS_PER_SESS_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ADVISOR_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ADVISOR_SEPARATE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_BASIC_INFO_NOT_ALUMNI]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_BASIC_INFO]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_MEMBERSHIPS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_REQUESTS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[ALL_SUPERVISORS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CAN_READ_STUDENT_SCHEDULES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CANCEL_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CHECK_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[COURSES_FOR_PROFESSOR]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_BOOKING]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_MESSAGE_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CREATE_SOCIAL_LINKS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[CURRENT_SESSION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APARTMENT_CHOICE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_AA_APPLICATION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_BOOKING]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_BOOKINGS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_CLOCK_IN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_RIDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_USER_CONNECTION_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DELETE_USER_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DINING_INFO_BY_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[DISTINCT_ACT_TYPE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GET_FINALIZATION_STATUS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GETDEMOGRAPHIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_GETHOLDSBYID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_MARK_AS_CURRENTLY_COMPLETED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_UPDATECELLPHONE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[FINALIZATION_UPDATEDEMOGRAPHIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APARTMENT_CHOICES_BY_APP_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APARTMENT_HALLS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPID_BY_NAME_AND_DATE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPID_BY_STU_ID_AND_SESS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICANTS_BY_APPID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICANTS_DETAILS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICATIONS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_APPLICATIONS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_CURRENT_APP_IDS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_CURRENT_APPLICATIONS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_AA_EDITOR_BY_APPID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID_LIST]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_CONNECTION_IDS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_MESSAGES_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_ROOMS_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ALL_USERS_BY_ROOM_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_BIRTH_DATE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_HEALTH_CHECK_QUESTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_LATEST_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_ROOM_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_SINGLE_MESSAGE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GET_TIMESHEETS_CLOCK_IN_OUT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[GRP_ADMIN_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_ADMIN]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APARTMENT_CHOICE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_AA_APPLICATION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_HEALTH_QUESTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_MESSAGE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_TIMESHEETS_CLOCK_IN_OUT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER_CONNECTION_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER_ROOMS]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSERT_USER]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[LEADER_EMAILS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[LEADER_MEMBERSHIPS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MEMBERSHIPS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MEMBERSHIPS_PER_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[MYSCHEDULE_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_CATEGORIES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_NEW]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_NOT_EXPIRED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[NEWS_PERSONAL_UNAPPROVED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[PHOTO_INFO_PER_USER_NAME]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUEST_PER_REQUEST_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUESTS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[REQUESTS_PER_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[RIDERS_BY_RIDE_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[STUDENT_JOBS_PER_ID_NUM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISOR_PER_SUP_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISORS_PER_ACT_CDE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[SUPERVISORS_PER_ID_NUM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPCOMING_RIDES_BY_STUDENT_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPCOMING_RIDES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APARTMENT_CHOICES]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICANT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_DATEMODIFIED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_DATESUBMITTED]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_AA_APPLICATION_EDITOR]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_ACT_INFO]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_CELL_PHONE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_DESCRIPTION]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_EMRGCONTACT]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[Update_Health_Status_Upon_Form_Completion]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_MYSCHEDULE]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_NEWS_ITEM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_PHONE_PRIVACY]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_PHOTO_PATH]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_ROOM]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_SCHEDULE_PRIVACY]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_SHOW_PIC]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[UPDATE_TIMESTAMP]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[VALID_DRIVES_BY_ID]", + "ObjectType": 1 + }, + { + "Name": "[dbo].[VICTORY_PROMISE_BY_STUDENT_ID]", + "ObjectType": 1 + } + ], + "UiHint": "SQLTrain1.CCT", + "UseBoolPropertiesWithoutDefaultSql": false, + "UseDatabaseNames": true, + "UseDbContextSplitting": false, + "UseFluentApiOnly": false, + "UseHandleBars": false, + "UseHierarchyId": false, + "UseInflector": false, + "UseLegacyPluralizer": false, + "UseManyToManyEntity": false, + "UseNoConstructor": false, + "UseNoDefaultConstructor": false, + "UseNoNavigations": false, + "UseNoObjectFilter": false, + "UseNodaTime": false, + "UseNullableReferences": false, + "UseSchemaFolders": false, + "UseSpatial": false, + "UseT4": false } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Countries.cs b/Gordon360/Models/CCT/Countries.cs index 050f8f9d9..4408ed953 100644 --- a/Gordon360/Models/CCT/Countries.cs +++ b/Gordon360/Models/CCT/Countries.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Countries - { - [Required] - [StringLength(31)] - [Unicode(false)] - public string CTY { get; set; } - [Required] - [StringLength(63)] - [Unicode(false)] - public string COUNTRY { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Countries + { + [Required] + [StringLength(31)] + [Unicode(false)] + public string CTY { get; set; } + [Required] + [StringLength(63)] + [Unicode(false)] + public string COUNTRY { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs b/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs index 7ffbc1132..157ee6e98 100644 --- a/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs +++ b/Gordon360/Models/CCT/DISTINCT_ACT_TYPEResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class DISTINCT_ACT_TYPEResult - { - public string ACT_TYPE_DESC { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class DISTINCT_ACT_TYPEResult + { + public string ACT_TYPE_DESC { get; set; } + } +} diff --git a/Gordon360/Models/CCT/DiningInfo.cs b/Gordon360/Models/CCT/DiningInfo.cs index 0d6617691..5773b182f 100644 --- a/Gordon360/Models/CCT/DiningInfo.cs +++ b/Gordon360/Models/CCT/DiningInfo.cs @@ -1,34 +1,34 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class DiningInfo - { - public int StudentId { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SessionCode { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ChoiceDescription { get; set; } - [StringLength(150)] - [Unicode(false)] - public string PlanDescriptions { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string PlanId { get; set; } - [StringLength(10)] - [Unicode(false)] - public string PlanType { get; set; } - public int? InitialBalance { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class DiningInfo + { + public int StudentId { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ChoiceDescription { get; set; } + [StringLength(150)] + [Unicode(false)] + public string PlanDescriptions { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string PlanId { get; set; } + [StringLength(10)] + [Unicode(false)] + public string PlanType { get; set; } + public int? InitialBalance { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs b/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs index 4ea2588b4..33941b3f5 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Choice_Desc.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Choice_Desc - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string Meal_Choice_Id { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Meal_Choice_Desc { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Choice_Desc + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string Meal_Choice_Id { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Meal_Choice_Desc { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs b/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs index aa7f280af..6f8a0714c 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Plan_Change_History.cs @@ -1,33 +1,33 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Plan_Change_History - { - public int ID_NUM { get; set; } - [Unicode(false)] - public string OLD_PLAN { get; set; } - [StringLength(6)] - [Unicode(false)] - public string OLD_PLAN_ID { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OLD_PLAN_DESC { get; set; } - [Unicode(false)] - public string NEW_PLAN { get; set; } - [StringLength(6)] - [Unicode(false)] - public string NEW_PLAN_ID { get; set; } - [Unicode(false)] - public string SESS_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? CHANGE_DATE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Plan_Change_History + { + public int ID_NUM { get; set; } + [Unicode(false)] + public string OLD_PLAN { get; set; } + [StringLength(6)] + [Unicode(false)] + public string OLD_PLAN_ID { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OLD_PLAN_DESC { get; set; } + [Unicode(false)] + public string NEW_PLAN { get; set; } + [StringLength(6)] + [Unicode(false)] + public string NEW_PLAN_ID { get; set; } + [Unicode(false)] + public string SESS_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? CHANGE_DATE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs b/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs index 9a4c8ec17..0ffaa836d 100644 --- a/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs +++ b/Gordon360/Models/CCT/Dining_Meal_Plan_Id_Mapping.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Meal_Plan_Id_Mapping - { - [Required] - [StringLength(6)] - [Unicode(false)] - public string meal_plan_id { get; set; } - [Required] - [StringLength(2)] - [Unicode(false)] - public string meal_choice_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Meal_Plan_Id_Mapping + { + [Required] + [StringLength(6)] + [Unicode(false)] + public string meal_plan_id { get; set; } + [Required] + [StringLength(2)] + [Unicode(false)] + public string meal_choice_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Mealplans.cs b/Gordon360/Models/CCT/Dining_Mealplans.cs index 31f066582..ae9327905 100644 --- a/Gordon360/Models/CCT/Dining_Mealplans.cs +++ b/Gordon360/Models/CCT/Dining_Mealplans.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Mealplans - { - [StringLength(150)] - [Unicode(false)] - public string Meal_Plan_Description { get; set; } - [StringLength(10)] - [Unicode(false)] - public string Meal_Plan_Type { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string Meal_Plan_ID { get; set; } - public int? Meal_Plan_Initial_Balance { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Mealplans + { + [StringLength(150)] + [Unicode(false)] + public string Meal_Plan_Description { get; set; } + [StringLength(10)] + [Unicode(false)] + public string Meal_Plan_Type { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string Meal_Plan_ID { get; set; } + public int? Meal_Plan_Initial_Balance { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs b/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs index 238ab6bac..f2b78c446 100644 --- a/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs +++ b/Gordon360/Models/CCT/Dining_Student_Meal_Choice.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Dining_Student_Meal_Choice - { - public int ID_NUM { get; set; } - [StringLength(2)] - [Unicode(false)] - public string MEAL_CHOICE_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Dining_Student_Meal_Choice + { + public int ID_NUM { get; set; } + [StringLength(2)] + [Unicode(false)] + public string MEAL_CHOICE_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs index c0dceb2ee..f6328374c 100644 --- a/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/ERROR_LOG.cs b/Gordon360/Models/CCT/ERROR_LOG.cs index 7d05d6439..614c5487d 100644 --- a/Gordon360/Models/CCT/ERROR_LOG.cs +++ b/Gordon360/Models/CCT/ERROR_LOG.cs @@ -1,20 +1,20 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class ERROR_LOG - { - [Key] - public int LOG_ID { get; set; } - [Column(TypeName = "datetime")] - public DateTime LOG_TIME { get; set; } - [Required] - public string LOG_MESSAGE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class ERROR_LOG + { + [Key] + public int LOG_ID { get; set; } + [Column(TypeName = "datetime")] + public DateTime LOG_TIME { get; set; } + [Required] + public string LOG_MESSAGE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/EmergencyContact.cs b/Gordon360/Models/CCT/EmergencyContact.cs index 4f91fc778..73749cee7 100644 --- a/Gordon360/Models/CCT/EmergencyContact.cs +++ b/Gordon360/Models/CCT/EmergencyContact.cs @@ -1,108 +1,108 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class EmergencyContact - { - public int APPID { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int SEQ_NUM { get; set; } - public int ID_NUM { get; set; } - public int? ID_NUM_EMRG_CNTCT { get; set; } - [StringLength(3)] - [Unicode(false)] - public string prefix { get; set; } - [StringLength(30)] - [Unicode(false)] - public string lastname { get; set; } - [StringLength(15)] - [Unicode(false)] - public string firstname { get; set; } - [StringLength(15)] - [Unicode(false)] - public string middlename { get; set; } - [StringLength(3)] - [Unicode(false)] - public string suffix { get; set; } - [StringLength(20)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string HomeExt { get; set; } - [StringLength(20)] - [Unicode(false)] - public string WorkPhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string WorkExr { get; set; } - [StringLength(20)] - [Unicode(false)] - public string MobilePhone { get; set; } - [StringLength(5)] - [Unicode(false)] - public string MobileExt { get; set; } - [StringLength(100)] - [Unicode(false)] - public string notes { get; set; } - [StringLength(60)] - [Unicode(false)] - public string EmailAddress { get; set; } - [StringLength(4)] - [Unicode(false)] - public string HomeAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string WorkAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string MobileAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string EmailAddrCode { get; set; } - [StringLength(4)] - [Unicode(false)] - public string AddressAddrCode { get; set; } - [StringLength(60)] - [Unicode(false)] - public string relationship { get; set; } - public int EMRG_PRIORITY { get; set; } - [StringLength(60)] - [Unicode(false)] - public string addr_1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string addr_2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string city { get; set; } - [StringLength(2)] - [Unicode(false)] - public string EMRG_STATE { get; set; } - [StringLength(12)] - [Unicode(false)] - public string zip { get; set; } - [StringLength(3)] - [Unicode(false)] - public string country { get; set; } - [Required] - public byte[] ApprowVersion { get; set; } - [StringLength(513)] - [Unicode(false)] - public string UserName { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JobName { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JobTime { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class EmergencyContact + { + public int APPID { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int SEQ_NUM { get; set; } + public int ID_NUM { get; set; } + public int? ID_NUM_EMRG_CNTCT { get; set; } + [StringLength(3)] + [Unicode(false)] + public string prefix { get; set; } + [StringLength(30)] + [Unicode(false)] + public string lastname { get; set; } + [StringLength(15)] + [Unicode(false)] + public string firstname { get; set; } + [StringLength(15)] + [Unicode(false)] + public string middlename { get; set; } + [StringLength(3)] + [Unicode(false)] + public string suffix { get; set; } + [StringLength(20)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string HomeExt { get; set; } + [StringLength(20)] + [Unicode(false)] + public string WorkPhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string WorkExr { get; set; } + [StringLength(20)] + [Unicode(false)] + public string MobilePhone { get; set; } + [StringLength(5)] + [Unicode(false)] + public string MobileExt { get; set; } + [StringLength(100)] + [Unicode(false)] + public string notes { get; set; } + [StringLength(60)] + [Unicode(false)] + public string EmailAddress { get; set; } + [StringLength(4)] + [Unicode(false)] + public string HomeAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string WorkAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string MobileAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string EmailAddrCode { get; set; } + [StringLength(4)] + [Unicode(false)] + public string AddressAddrCode { get; set; } + [StringLength(60)] + [Unicode(false)] + public string relationship { get; set; } + public int EMRG_PRIORITY { get; set; } + [StringLength(60)] + [Unicode(false)] + public string addr_1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string addr_2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string city { get; set; } + [StringLength(2)] + [Unicode(false)] + public string EMRG_STATE { get; set; } + [StringLength(12)] + [Unicode(false)] + public string zip { get; set; } + [StringLength(3)] + [Unicode(false)] + public string country { get; set; } + [Required] + public byte[] ApprowVersion { get; set; } + [StringLength(513)] + [Unicode(false)] + public string UserName { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JobName { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JobTime { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs b/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs index d528e6485..07e4180f7 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GETDEMOGRAPHICResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GETDEMOGRAPHICResult - { - public int Value { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GETDEMOGRAPHICResult + { + public int Value { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs b/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs index be539e0a8..9c5c6e525 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GETHOLDSBYIDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GETHOLDSBYIDResult - { - public bool? FinancialHold { get; set; } - public bool? HighSchoolHold { get; set; } - public bool? MedicalHold { get; set; } - public bool? MajorHold { get; set; } - public bool? RegistrarHold { get; set; } - public bool? LaVidaHold { get; set; } - public bool? MustRegisterForClasses { get; set; } - public int NewStudent { get; set; } - public string FinancialHoldText { get; set; } - public string MeetingDate { get; set; } - public string MeetingLocations { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GETHOLDSBYIDResult + { + public bool? FinancialHold { get; set; } + public bool? HighSchoolHold { get; set; } + public bool? MedicalHold { get; set; } + public bool? MajorHold { get; set; } + public bool? RegistrarHold { get; set; } + public bool? LaVidaHold { get; set; } + public bool? MustRegisterForClasses { get; set; } + public int NewStudent { get; set; } + public string FinancialHoldText { get; set; } + public string MeetingDate { get; set; } + public string MeetingLocations { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs b/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs index 1cd269ad0..fd45b34d7 100644 --- a/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_GET_FINALIZATION_STATUSResult.cs @@ -1,20 +1,20 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_GET_FINALIZATION_STATUSResult - { - public string UserID { get; set; } - public string Period { get; set; } - public bool FinalizationCompleted { get; set; } - public string RootQuery { get; set; } - public string BypassApprover { get; set; } - public DateTime? DateFinalized { get; set; } - public string IgnoreHoldsApprover { get; set; } - public DateTime DateInserted { get; set; } - public DateTime DateUpdated { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_GET_FINALIZATION_STATUSResult + { + public string UserID { get; set; } + public string Period { get; set; } + public bool FinalizationCompleted { get; set; } + public string RootQuery { get; set; } + public string BypassApprover { get; set; } + public DateTime? DateFinalized { get; set; } + public string IgnoreHoldsApprover { get; set; } + public DateTime DateInserted { get; set; } + public DateTime DateUpdated { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs b/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs index 79d68e8c6..908fe2387 100644 --- a/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult - { - public string UserID { get; set; } - public string Period { get; set; } - public bool FinalizationCompleted { get; set; } - public string RootQuery { get; set; } - public string BypassApprover { get; set; } - public DateTime? DateFinalized { get; set; } - public string IgnoreHoldsApprover { get; set; } - public DateTime DateInserted { get; set; } - public DateTime DateUpdated { get; set; } - public string HeadcountsAsOfDateFinalized { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_MARK_AS_CURRENTLY_COMPLETEDResult + { + public string UserID { get; set; } + public string Period { get; set; } + public bool FinalizationCompleted { get; set; } + public string RootQuery { get; set; } + public string BypassApprover { get; set; } + public DateTime? DateFinalized { get; set; } + public string IgnoreHoldsApprover { get; set; } + public DateTime DateInserted { get; set; } + public DateTime DateUpdated { get; set; } + public string HeadcountsAsOfDateFinalized { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs b/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs index ed8e6fde3..7ad048383 100644 --- a/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_UPDATECELLPHONEResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_UPDATECELLPHONEResult - { - public bool? Success { get; set; } - public string Message { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_UPDATECELLPHONEResult + { + public bool? Success { get; set; } + public string Message { get; set; } + } +} diff --git a/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs b/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs index c85f4bef9..dbc3ad7ee 100644 --- a/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs +++ b/Gordon360/Models/CCT/FINALIZATION_UPDATEDEMOGRAPHICResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class FINALIZATION_UPDATEDEMOGRAPHICResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class FINALIZATION_UPDATEDEMOGRAPHICResult + { + } +} diff --git a/Gordon360/Models/CCT/FacStaff.cs b/Gordon360/Models/CCT/FacStaff.cs index 5317d0ff6..db604258c 100644 --- a/Gordon360/Models/CCT/FacStaff.cs +++ b/Gordon360/Models/CCT/FacStaff.cs @@ -1,128 +1,128 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class FacStaff - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(20)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(20)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(25)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Nickname { get; set; } - [StringLength(50)] - [Unicode(false)] - public string OnCampusDepartment { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusBuilding { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusRoom { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusPhone { get; set; } - [StringLength(10)] - [Unicode(false)] - public string OnCampusPrivatePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(30)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(10)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(15)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HomeFax { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string KeepPrivate { get; set; } - [StringLength(100)] - [Unicode(false)] - public string JobTitle { get; set; } - [StringLength(20)] - [Unicode(false)] - public string SpouseName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Dept { get; set; } - [StringLength(14)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Email { get; set; } - public int? ActiveAccount { get; set; } - [StringLength(7)] - [Unicode(false)] - public string Type { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - [StringLength(75)] - [Unicode(false)] - public string office_hours { get; set; } - public int? preferred_photo { get; set; } - public int? show_pic { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BuildingDescription { get; set; } - [StringLength(63)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - [StringLength(100)] - [Unicode(false)] - public string Mail_Description { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class FacStaff + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(20)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(20)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(25)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Nickname { get; set; } + [StringLength(50)] + [Unicode(false)] + public string OnCampusDepartment { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusBuilding { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusRoom { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusPhone { get; set; } + [StringLength(10)] + [Unicode(false)] + public string OnCampusPrivatePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(30)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(10)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(15)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HomeFax { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string KeepPrivate { get; set; } + [StringLength(100)] + [Unicode(false)] + public string JobTitle { get; set; } + [StringLength(20)] + [Unicode(false)] + public string SpouseName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Dept { get; set; } + [StringLength(14)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Email { get; set; } + public int? ActiveAccount { get; set; } + [StringLength(7)] + [Unicode(false)] + public string Type { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + [StringLength(75)] + [Unicode(false)] + public string office_hours { get; set; } + public int? preferred_photo { get; set; } + public int? show_pic { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BuildingDescription { get; set; } + [StringLength(63)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + [StringLength(100)] + [Unicode(false)] + public string Mail_Description { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/GET_AA_ADMINResult.cs b/Gordon360/Models/CCT/GET_AA_ADMINResult.cs index 2aaac343e..a40683971 100644 --- a/Gordon360/Models/CCT/GET_AA_ADMINResult.cs +++ b/Gordon360/Models/CCT/GET_AA_ADMINResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_ADMINResult - { - public string AdminID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_ADMINResult + { + public string AdminID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs b/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs index 76189e0af..3c2df4cbf 100644 --- a/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APARTMENT_CHOICES_BY_APP_IDResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APARTMENT_CHOICES_BY_APP_IDResult - { - public int HousingAppID { get; set; } - public int Ranking { get; set; } - public string HallName { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APARTMENT_CHOICES_BY_APP_IDResult + { + public int HousingAppID { get; set; } + public int Ranking { get; set; } + public string HallName { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs b/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs index 2ccf8a079..f8584f055 100644 --- a/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APARTMENT_HALLSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APARTMENT_HALLSResult - { - public string Name { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APARTMENT_HALLSResult + { + public string Name { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs b/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs index 234fcd69d..4b12c3fec 100644 --- a/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPID_BY_NAME_AND_DATEResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPID_BY_NAME_AND_DATEResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPID_BY_NAME_AND_DATEResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs b/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs index e6e38975e..46178cd32 100644 --- a/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPID_BY_STU_ID_AND_SESSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPID_BY_STU_ID_AND_SESSResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPID_BY_STU_ID_AND_SESSResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs index 88c1f4968..073076dc1 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICANTS_BY_APPIDResult.cs @@ -1,16 +1,16 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICANTS_BY_APPIDResult - { - public int HousingAppID { get; set; } - public string Username { get; set; } - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - public string SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICANTS_BY_APPIDResult + { + public int HousingAppID { get; set; } + public string Username { get; set; } + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + public string SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs index 6796ebc92..d8a35356c 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICANTS_DETAILSResult.cs @@ -1,19 +1,19 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICANTS_DETAILSResult - { - public int HousingAppID { get; set; } - public string EditorUsername { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string Username { get; set; } - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - public string SESS_CDE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICANTS_DETAILSResult + { + public int HousingAppID { get; set; } + public string EditorUsername { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string Username { get; set; } + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + public string SESS_CDE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs index 7b50ae7ed..612ba9a8b 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICATIONSResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICATIONSResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICATIONSResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs index 63b8bb100..f60fb98cb 100644 --- a/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_APPLICATIONS_BY_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_APPLICATIONS_BY_IDResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_APPLICATIONS_BY_IDResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs b/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs index 21bc5d4fb..9cdff6d5f 100644 --- a/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_CURRENT_APPLICATIONSResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_CURRENT_APPLICATIONSResult - { - public int HousingAppID { get; set; } - public DateTime? DateSubmitted { get; set; } - public DateTime DateModified { get; set; } - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_CURRENT_APPLICATIONSResult + { + public int HousingAppID { get; set; } + public DateTime? DateSubmitted { get; set; } + public DateTime DateModified { get; set; } + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs b/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs index 6d899594d..b87e61ce2 100644 --- a/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs +++ b/Gordon360/Models/CCT/GET_AA_CURRENT_APP_IDSResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_CURRENT_APP_IDSResult - { - public int HousingAppID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_CURRENT_APP_IDSResult + { + public int HousingAppID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs b/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs index 475d6a620..eb3cc4cb6 100644 --- a/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs +++ b/Gordon360/Models/CCT/GET_AA_EDITOR_BY_APPIDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_AA_EDITOR_BY_APPIDResult - { - public string EditorUsername { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_AA_EDITOR_BY_APPIDResult + { + public string EditorUsername { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs index 7a4a6c5c4..531a14686 100644 --- a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_CONNECTION_IDS_BY_IDResult - { - public string connection_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_CONNECTION_IDS_BY_IDResult + { + public string connection_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs index 899ad7c13..e348f0c5c 100644 --- a/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_CONNECTION_IDS_BY_ID_LISTResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_CONNECTION_IDS_BY_ID_LISTResult - { - public string connection_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_CONNECTION_IDS_BY_ID_LISTResult + { + public string connection_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs index a34da8e6c..a9584e92d 100644 --- a/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_MESSAGES_BY_IDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_MESSAGES_BY_IDResult - { - public string message_id { get; set; } - public string text { get; set; } - public DateTime createdAt { get; set; } - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_MESSAGES_BY_IDResult + { + public string message_id { get; set; } + public string text { get; set; } + public DateTime createdAt { get; set; } + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs index 1c28c8ca2..b6f0c0d0c 100644 --- a/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_ROOMS_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_ROOMS_BY_IDResult - { - public string room_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_ROOMS_BY_IDResult + { + public string room_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs b/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs index 69df0edfe..5512e1b4b 100644 --- a/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ALL_USERS_BY_ROOM_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ALL_USERS_BY_ROOM_IDResult - { - public string user_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ALL_USERS_BY_ROOM_IDResult + { + public string user_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs b/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs index 306cb29cd..34756f463 100644 --- a/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_BIRTH_DATE_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_BIRTH_DATE_BY_IDResult - { - public DateTime? Birth_Date { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_BIRTH_DATE_BY_IDResult + { + public DateTime? Birth_Date { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs b/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs index d354f439c..3f38826dd 100644 --- a/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs +++ b/Gordon360/Models/CCT/GET_HEALTH_CHECK_QUESTIONResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_HEALTH_CHECK_QUESTIONResult - { - public string question { get; set; } - public string yesPrompt { get; set; } - public string noPrompt { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_HEALTH_CHECK_QUESTIONResult + { + public string question { get; set; } + public string yesPrompt { get; set; } + public string noPrompt { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs b/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs index 284fa3502..7fc19a968 100644 --- a/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs +++ b/Gordon360/Models/CCT/GET_LATEST_ROOMResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_LATEST_ROOMResult - { - public int room_id { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_LATEST_ROOMResult + { + public int room_id { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs b/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs index c8cab9c79..2b0fd0069 100644 --- a/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_ROOM_BY_IDResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_ROOM_BY_IDResult - { - public int room_id { get; set; } - public string name { get; set; } - public bool group { get; set; } - public DateTime createdAt { get; set; } - public DateTime lastupdated { get; set; } - public byte[] roomImage { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_ROOM_BY_IDResult + { + public int room_id { get; set; } + public string name { get; set; } + public bool group { get; set; } + public DateTime createdAt { get; set; } + public DateTime lastupdated { get; set; } + public byte[] roomImage { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs b/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs index 5cd6e5100..56273ce45 100644 --- a/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/GET_SINGLE_MESSAGE_BY_IDResult.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_SINGLE_MESSAGE_BY_IDResult - { - public string message_id { get; set; } - public string text { get; set; } - public DateTime createdAt { get; set; } - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_SINGLE_MESSAGE_BY_IDResult + { + public string message_id { get; set; } + public string text { get; set; } + public DateTime createdAt { get; set; } + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs b/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs index fd1e36c17..2427afcba 100644 --- a/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs +++ b/Gordon360/Models/CCT/GET_TIMESHEETS_CLOCK_IN_OUTResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GET_TIMESHEETS_CLOCK_IN_OUTResult - { - public DateTime? timestamp { get; set; } - public bool? currentState { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GET_TIMESHEETS_CLOCK_IN_OUTResult + { + public DateTime? timestamp { get; set; } + public bool? currentState { get; set; } + } +} diff --git a/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs index ec2ca78aa..d63b288ab 100644 --- a/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/GRP_ADMIN_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class GRP_ADMIN_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class GRP_ADMIN_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Graduation.cs b/Gordon360/Models/CCT/Graduation.cs index 1721c2a9f..c247aad91 100644 --- a/Gordon360/Models/CCT/Graduation.cs +++ b/Gordon360/Models/CCT/Graduation.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Graduation - { - public int ID_NUM { get; set; } - [StringLength(4000)] - public string WHEN_GRAD { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HAS_GRADUATED { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Graduation + { + public int ID_NUM { get; set; } + [StringLength(4000)] + public string WHEN_GRAD { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HAS_GRADUATED { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Question.cs b/Gordon360/Models/CCT/Health_Question.cs index 5ba8e3816..0e7d10184 100644 --- a/Gordon360/Models/CCT/Health_Question.cs +++ b/Gordon360/Models/CCT/Health_Question.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Health_Question - { - [Required] - [Unicode(false)] - public string Question { get; set; } - [Required] - [Unicode(false)] - public string YesPrompt { get; set; } - [Required] - [Unicode(false)] - public string NoPrompt { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Timestamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Health_Question + { + [Required] + [Unicode(false)] + public string Question { get; set; } + [Required] + [Unicode(false)] + public string YesPrompt { get; set; } + [Required] + [Unicode(false)] + public string NoPrompt { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Timestamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Status.cs b/Gordon360/Models/CCT/Health_Status.cs index f3d1ad658..a296d7ded 100644 --- a/Gordon360/Models/CCT/Health_Status.cs +++ b/Gordon360/Models/CCT/Health_Status.cs @@ -1,31 +1,31 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Health_Status - { - [Key] - public int ID_Num { get; set; } - public byte HealthStatusID { get; set; } - [Key] - public DateTime Created { get; set; } - public DateTime? Expires { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string CreatedBy { get; set; } - public DateTime? Emailed { get; set; } - [Unicode(false)] - public string Notes { get; set; } - - [ForeignKey("HealthStatusID")] - [InverseProperty("Health_Status")] - public virtual Health_Status_CTRL HealthStatus { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Health_Status + { + [Key] + public int ID_Num { get; set; } + public byte HealthStatusID { get; set; } + [Key] + public DateTime Created { get; set; } + public DateTime? Expires { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string CreatedBy { get; set; } + public DateTime? Emailed { get; set; } + [Unicode(false)] + public string Notes { get; set; } + + [ForeignKey("HealthStatusID")] + [InverseProperty("Health_Status")] + public virtual Health_Status_CTRL HealthStatus { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Health_Status_CTRL.cs b/Gordon360/Models/CCT/Health_Status_CTRL.cs index ab58dc14b..ee507faa9 100644 --- a/Gordon360/Models/CCT/Health_Status_CTRL.cs +++ b/Gordon360/Models/CCT/Health_Status_CTRL.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Health_Status_CTRL - { - public Health_Status_CTRL() - { - Health_Status = new HashSet(); - } - - [Key] - public byte HealthStatusID { get; set; } - [Required] - [StringLength(6)] - [Unicode(false)] - public string HealthStatusColor { get; set; } - - [InverseProperty("HealthStatus")] - public virtual ICollection Health_Status { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Health_Status_CTRL + { + public Health_Status_CTRL() + { + Health_Status = new HashSet(); + } + + [Key] + public byte HealthStatusID { get; set; } + [Required] + [StringLength(6)] + [Unicode(false)] + public string HealthStatusColor { get; set; } + + [InverseProperty("HealthStatus")] + public virtual ICollection Health_Status { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Admins.cs b/Gordon360/Models/CCT/Housing_Admins.cs index b9a46d67b..3ef97f320 100644 --- a/Gordon360/Models/CCT/Housing_Admins.cs +++ b/Gordon360/Models/CCT/Housing_Admins.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Admins - { - [Key] - [StringLength(10)] - [Unicode(false)] - public string AdminID { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Admins + { + [Key] + [StringLength(10)] + [Unicode(false)] + public string AdminID { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Applicants.cs b/Gordon360/Models/CCT/Housing_Applicants.cs index 6c455ad05..293cd1c33 100644 --- a/Gordon360/Models/CCT/Housing_Applicants.cs +++ b/Gordon360/Models/CCT/Housing_Applicants.cs @@ -1,32 +1,32 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Applicants - { - [Key] - public int HousingAppID { get; set; } - [Key] - [StringLength(50)] - [Unicode(false)] - public string Username { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AprtProgram { get; set; } - public bool? AprtProgramCredit { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - - [ForeignKey("HousingAppID")] - [InverseProperty("Housing_Applicants")] - public virtual Housing_Applications HousingApp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Applicants + { + [Key] + public int HousingAppID { get; set; } + [Key] + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AprtProgram { get; set; } + public bool? AprtProgramCredit { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + + [ForeignKey("HousingAppID")] + [InverseProperty("Housing_Applicants")] + public virtual Housing_Applications HousingApp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Applications.cs b/Gordon360/Models/CCT/Housing_Applications.cs index 908e42bf2..9ae5f8fae 100644 --- a/Gordon360/Models/CCT/Housing_Applications.cs +++ b/Gordon360/Models/CCT/Housing_Applications.cs @@ -1,32 +1,32 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Applications - { - public Housing_Applications() - { - Housing_Applicants = new HashSet(); - } - - [Key] - public int HousingAppID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? DateSubmitted { get; set; } - [Column(TypeName = "datetime")] - public DateTime DateModified { get; set; } - [Required] - [StringLength(50)] - [Unicode(false)] - public string EditorUsername { get; set; } - - [InverseProperty("HousingApp")] - public virtual ICollection Housing_Applicants { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Applications + { + public Housing_Applications() + { + Housing_Applicants = new HashSet(); + } + + [Key] + public int HousingAppID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? DateSubmitted { get; set; } + [Column(TypeName = "datetime")] + public DateTime DateModified { get; set; } + [Required] + [StringLength(50)] + [Unicode(false)] + public string EditorUsername { get; set; } + + [InverseProperty("HousingApp")] + public virtual ICollection Housing_Applicants { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_HallChoices.cs b/Gordon360/Models/CCT/Housing_HallChoices.cs index bffce3c9e..68a4fc628 100644 --- a/Gordon360/Models/CCT/Housing_HallChoices.cs +++ b/Gordon360/Models/CCT/Housing_HallChoices.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Housing_HallChoices - { - public int HousingAppID { get; set; } - public int Ranking { get; set; } - [Required] - [StringLength(15)] - [Unicode(false)] - public string HallName { get; set; } - - [ForeignKey("HousingAppID")] - public virtual Housing_Applications HousingApp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Housing_HallChoices + { + public int HousingAppID { get; set; } + public int Ranking { get; set; } + [Required] + [StringLength(15)] + [Unicode(false)] + public string HallName { get; set; } + + [ForeignKey("HousingAppID")] + public virtual Housing_Applications HousingApp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Housing_Halls.cs b/Gordon360/Models/CCT/Housing_Halls.cs index f9b09d5ef..acfeb3240 100644 --- a/Gordon360/Models/CCT/Housing_Halls.cs +++ b/Gordon360/Models/CCT/Housing_Halls.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Housing_Halls - { - [Key] - [StringLength(15)] - [Unicode(false)] - public string Name { get; set; } - [Required] - [StringLength(15)] - [Unicode(false)] - public string Type { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Housing_Halls + { + [Key] + [StringLength(15)] + [Unicode(false)] + public string Name { get; set; } + [Required] + [StringLength(15)] + [Unicode(false)] + public string Type { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs b/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs index 17d3b177e..59f5b6c30 100644 --- a/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs +++ b/Gordon360/Models/CCT/INSERT_NEWS_ITEMResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class INSERT_NEWS_ITEMResult - { - public int SNID { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class INSERT_NEWS_ITEMResult + { + public int SNID { get; set; } + } +} diff --git a/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs b/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs index 872925c79..d7423058e 100644 --- a/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs +++ b/Gordon360/Models/CCT/INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult - { - public int? ID_NUM { get; set; } - public string CRS_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class INSTRUCTOR_COURSES_BY_ID_NUM_AND_SESS_CDEResult + { + public int? ID_NUM { get; set; } + public string CRS_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Information_Change_Request.cs b/Gordon360/Models/CCT/Information_Change_Request.cs index eab94ef4a..84649fcf5 100644 --- a/Gordon360/Models/CCT/Information_Change_Request.cs +++ b/Gordon360/Models/CCT/Information_Change_Request.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Information_Change_Request - { - [Key] - public long ID { get; set; } - public long RequestNumber { get; set; } - [Required] - [StringLength(16)] - [Unicode(false)] - public string ID_Num { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string FieldName { get; set; } - [StringLength(128)] - [Unicode(false)] - public string FieldValue { get; set; } - [Column(TypeName = "datetime")] - public DateTime TimeStamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Information_Change_Request + { + [Key] + public long ID { get; set; } + public long RequestNumber { get; set; } + [Required] + [StringLength(16)] + [Unicode(false)] + public string ID_Num { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string FieldName { get; set; } + [StringLength(128)] + [Unicode(false)] + public string FieldValue { get; set; } + [Column(TypeName = "datetime")] + public DateTime TimeStamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Internships_as_Involvements.cs b/Gordon360/Models/CCT/Internships_as_Involvements.cs index 9af309725..bf98d8115 100644 --- a/Gordon360/Models/CCT/Internships_as_Involvements.cs +++ b/Gordon360/Models/CCT/Internships_as_Involvements.cs @@ -1,38 +1,38 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Internships_as_Involvements - { - [Required] - [StringLength(6)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(4)] - [Unicode(false)] - public string YR_CDE { get; set; } - [Required] - [StringLength(2)] - [Unicode(false)] - public string TRM_CDE { get; set; } - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(8000)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Internships_as_Involvements + { + [Required] + [StringLength(6)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(4)] + [Unicode(false)] + public string YR_CDE { get; set; } + [Required] + [StringLength(2)] + [Unicode(false)] + public string TRM_CDE { get; set; } + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(8000)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/InvolvementOffering.cs b/Gordon360/Models/CCT/InvolvementOffering.cs index 59465420e..feba4c217 100644 --- a/Gordon360/Models/CCT/InvolvementOffering.cs +++ b/Gordon360/Models/CCT/InvolvementOffering.cs @@ -1,32 +1,32 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class InvolvementOffering - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string ACT_DESC { get; set; } - [StringLength(3)] - [Unicode(false)] - public string ACT_TYPE { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class InvolvementOffering + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs b/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs index ae536e5aa..6b089c520 100644 --- a/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs +++ b/Gordon360/Models/CCT/JENZ_ACT_CLUB_DEF.cs @@ -1,36 +1,36 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class JENZ_ACT_CLUB_DEF - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string ACT_DESC { get; set; } - [StringLength(3)] - [Unicode(false)] - public string ACT_TYPE { get; set; } - [StringLength(60)] - [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } - public int VPM_IM { get; set; } - public int VPM_CC { get; set; } - public int VPM_LS { get; set; } - public int VPM_LW { get; set; } - public int VPL_IM { get; set; } - public int VPL_CC { get; set; } - public int VPL_LS { get; set; } - public int VPL_LW { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class JENZ_ACT_CLUB_DEF + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string ACT_DESC { get; set; } + [StringLength(3)] + [Unicode(false)] + public string ACT_TYPE { get; set; } + [StringLength(60)] + [Unicode(false)] + public string ACT_TYPE_DESC { get; set; } + public int VPM_IM { get; set; } + public int VPM_CC { get; set; } + public int VPM_LS { get; set; } + public int VPM_LW { get; set; } + public int VPL_IM { get; set; } + public int VPL_CC { get; set; } + public int VPL_LS { get; set; } + public int VPL_LW { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs b/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs index a93266061..989ab942f 100644 --- a/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs +++ b/Gordon360/Models/CCT/JNZB_ACTIVITIES.cs @@ -1,57 +1,57 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Index("ACT_CDE", "SESS_CDE", "PART_CDE", "ID_NUM", Name = "IX_JNZB_ACTIVITIES", IsUnique = true)] - public partial class JNZB_ACTIVITIES - { - [Key] - public int ENTRY_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string MEMBERSHIP_STS { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string TRACK_MTG_ATTEND { get; set; } - [Column(TypeName = "datetime")] - public DateTime? BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string INCL_PROFILE_RPT { get; set; } - [StringLength(15)] - [Unicode(false)] - public string USER_NAME { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JOB_NAME { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JOB_TIME { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Index("ACT_CDE", "SESS_CDE", "PART_CDE", "ID_NUM", Name = "IX_JNZB_ACTIVITIES", IsUnique = true)] + public partial class JNZB_ACTIVITIES + { + [Key] + public int ENTRY_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string MEMBERSHIP_STS { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string TRACK_MTG_ATTEND { get; set; } + [Column(TypeName = "datetime")] + public DateTime? BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string INCL_PROFILE_RPT { get; set; } + [StringLength(15)] + [Unicode(false)] + public string USER_NAME { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JOB_NAME { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JOB_TIME { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs index 099bb7c4a..8d191b2dc 100644 --- a/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/LEADER_EMAILS_PER_ACT_CDEResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class LEADER_EMAILS_PER_ACT_CDEResult - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class LEADER_EMAILS_PER_ACT_CDEResult + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + } +} diff --git a/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs index a485fe997..376f14826 100644 --- a/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/LEADER_MEMBERSHIPS_PER_ACT_CDEResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class LEADER_MEMBERSHIPS_PER_ACT_CDEResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class LEADER_MEMBERSHIPS_PER_ACT_CDEResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MEMBERSHIP.cs b/Gordon360/Models/CCT/MEMBERSHIP.cs index 02590d711..da8272303 100644 --- a/Gordon360/Models/CCT/MEMBERSHIP.cs +++ b/Gordon360/Models/CCT/MEMBERSHIP.cs @@ -1,47 +1,47 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Index("ACT_CDE", "SESS_CDE", "ID_NUM", Name = "IX_MEMBERSHIP", IsUnique = true)] - public partial class MEMBERSHIP - { - [Key] - public int MEMBERSHIP_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime BEGIN_DTE { get; set; } - [Column(TypeName = "datetime")] - public DateTime? END_DTE { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [StringLength(15)] - [Unicode(false)] - public string USER_NAME { get; set; } - [StringLength(30)] - [Unicode(false)] - public string JOB_NAME { get; set; } - [Column(TypeName = "datetime")] - public DateTime? JOB_TIME { get; set; } - public bool? GRP_ADMIN { get; set; } - public bool? PRIVACY { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Index("ACT_CDE", "SESS_CDE", "ID_NUM", Name = "IX_MEMBERSHIP", IsUnique = true)] + public partial class MEMBERSHIP + { + [Key] + public int MEMBERSHIP_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime BEGIN_DTE { get; set; } + [Column(TypeName = "datetime")] + public DateTime? END_DTE { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [StringLength(15)] + [Unicode(false)] + public string USER_NAME { get; set; } + [StringLength(30)] + [Unicode(false)] + public string JOB_NAME { get; set; } + [Column(TypeName = "datetime")] + public DateTime? JOB_TIME { get; set; } + public bool? GRP_ADMIN { get; set; } + public bool? PRIVACY { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs index 3313a53f7..9c0790e40 100644 --- a/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/MEMBERSHIPS_PER_ACT_CDEResult.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MEMBERSHIPS_PER_ACT_CDEResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string AD_Username { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Mail_Location { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public int AccountPrivate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MEMBERSHIPS_PER_ACT_CDEResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string AD_Username { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Mail_Location { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public int AccountPrivate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs b/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs index 150accd3d..841b36d05 100644 --- a/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/MEMBERSHIPS_PER_STUDENT_IDResult.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MEMBERSHIPS_PER_STUDENT_IDResult - { - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public DateTime StartDate { get; set; } - public DateTime? EndDate { get; set; } - public string Description { get; set; } - public string ActivityType { get; set; } - public string ActivityTypeDescription { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - public long? TotalSemesters { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MEMBERSHIPS_PER_STUDENT_IDResult + { + public int MembershipID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public string ActivityImagePath { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime? EndDate { get; set; } + public string Description { get; set; } + public string ActivityType { get; set; } + public string ActivityTypeDescription { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + public long? TotalSemesters { get; set; } + } +} diff --git a/Gordon360/Models/CCT/MYSCHEDULE.cs b/Gordon360/Models/CCT/MYSCHEDULE.cs index beb880b4c..d4816f2a1 100644 --- a/Gordon360/Models/CCT/MYSCHEDULE.cs +++ b/Gordon360/Models/CCT/MYSCHEDULE.cs @@ -1,52 +1,52 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class MYSCHEDULE - { - [Key] - [StringLength(10)] - [Unicode(false)] - public string EVENT_ID { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string GORDON_ID { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LOCATION { get; set; } - [StringLength(50)] - [Unicode(false)] - public string DESCRIPTION { get; set; } - [StringLength(10)] - [Unicode(false)] - public string MON_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string TUE_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string WED_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string THU_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string FRI_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string SAT_CDE { get; set; } - [StringLength(10)] - [Unicode(false)] - public string SUN_CDE { get; set; } - public int? IS_ALLDAY { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class MYSCHEDULE + { + [Key] + [StringLength(10)] + [Unicode(false)] + public string EVENT_ID { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string GORDON_ID { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LOCATION { get; set; } + [StringLength(50)] + [Unicode(false)] + public string DESCRIPTION { get; set; } + [StringLength(10)] + [Unicode(false)] + public string MON_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string TUE_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string WED_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string THU_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string FRI_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string SAT_CDE { get; set; } + [StringLength(10)] + [Unicode(false)] + public string SUN_CDE { get; set; } + public int? IS_ALLDAY { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs b/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs index b6d5551f2..f3ae9b667 100644 --- a/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs +++ b/Gordon360/Models/CCT/MYSCHEDULE_BY_IDResult.cs @@ -1,25 +1,25 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class MYSCHEDULE_BY_IDResult - { - public string EVENT_ID { get; set; } - public string GORDON_ID { get; set; } - public string LOCATION { get; set; } - public string DESCRIPTION { get; set; } - public string MON_CDE { get; set; } - public string TUE_CDE { get; set; } - public string WED_CDE { get; set; } - public string THU_CDE { get; set; } - public string FRI_CDE { get; set; } - public string SAT_CDE { get; set; } - public string SUN_CDE { get; set; } - public int? IS_ALLDAY { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class MYSCHEDULE_BY_IDResult + { + public string EVENT_ID { get; set; } + public string GORDON_ID { get; set; } + public string LOCATION { get; set; } + public string DESCRIPTION { get; set; } + public string MON_CDE { get; set; } + public string TUE_CDE { get; set; } + public string WED_CDE { get; set; } + public string THU_CDE { get; set; } + public string FRI_CDE { get; set; } + public string SAT_CDE { get; set; } + public string SUN_CDE { get; set; } + public int? IS_ALLDAY { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Mailboxes.cs b/Gordon360/Models/CCT/Mailboxes.cs index 0aaf68105..8777a7da0 100644 --- a/Gordon360/Models/CCT/Mailboxes.cs +++ b/Gordon360/Models/CCT/Mailboxes.cs @@ -1,28 +1,28 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Mailboxes - { - public int BoxId { get; set; } - [Required] - [StringLength(32)] - [Unicode(false)] - public string BoxNo { get; set; } - [StringLength(16)] - [Unicode(false)] - public string Combination { get; set; } - [Required] - [StringLength(32)] - [Unicode(false)] - public string Type { get; set; } - public int? HolderAccountId { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Mailboxes + { + public int BoxId { get; set; } + [Required] + [StringLength(32)] + [Unicode(false)] + public string BoxNo { get; set; } + [StringLength(16)] + [Unicode(false)] + public string Combination { get; set; } + [Required] + [StringLength(32)] + [Unicode(false)] + public string Type { get; set; } + public int? HolderAccountId { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Majors.cs b/Gordon360/Models/CCT/Majors.cs index 82c592392..bb5c9f940 100644 --- a/Gordon360/Models/CCT/Majors.cs +++ b/Gordon360/Models/CCT/Majors.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Majors - { - [StringLength(5)] - [Unicode(false)] - public string MajorCode { get; set; } - [StringLength(50)] - [Unicode(false)] - public string MajorDescription { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Majors + { + [StringLength(5)] + [Unicode(false)] + public string MajorCode { get; set; } + [StringLength(50)] + [Unicode(false)] + public string MajorDescription { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/MembershipView.cs b/Gordon360/Models/CCT/MembershipView.cs index 20a20da64..68834347a 100644 --- a/Gordon360/Models/CCT/MembershipView.cs +++ b/Gordon360/Models/CCT/MembershipView.cs @@ -1,59 +1,59 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class MembershipView - { - public int MembershipID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ActivityCode { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ActivityDescription { get; set; } - [Unicode(false)] - public string ActivityImagePath { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SessionCode { get; set; } - [StringLength(1000)] - [Unicode(false)] - public string SessionDescription { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Username { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string Participation { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string ParticipationDescription { get; set; } - [Column(TypeName = "datetime")] - public DateTime StartDate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? EndDate { get; set; } - [StringLength(45)] - [Unicode(false)] - public string Description { get; set; } - public bool? GroupAdmin { get; set; } - public bool? Privacy { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class MembershipView + { + public int MembershipID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ActivityCode { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ActivityDescription { get; set; } + [Unicode(false)] + public string ActivityImagePath { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SessionDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string Participation { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ParticipationDescription { get; set; } + [Column(TypeName = "datetime")] + public DateTime StartDate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? EndDate { get; set; } + [StringLength(45)] + [Unicode(false)] + public string Description { get; set; } + public bool? GroupAdmin { get; set; } + public bool? Privacy { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Message_Rooms.cs b/Gordon360/Models/CCT/Message_Rooms.cs index b3435376b..c8301a740 100644 --- a/Gordon360/Models/CCT/Message_Rooms.cs +++ b/Gordon360/Models/CCT/Message_Rooms.cs @@ -1,26 +1,26 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Message_Rooms - { - [Key] - public int room_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public bool group { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Column(TypeName = "datetime")] - public DateTime lastUpdated { get; set; } - public byte[] roomImage { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Message_Rooms + { + [Key] + public int room_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public bool group { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Column(TypeName = "datetime")] + public DateTime lastUpdated { get; set; } + public byte[] roomImage { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Messages.cs b/Gordon360/Models/CCT/Messages.cs index a9c4d0e8e..1e5b64105 100644 --- a/Gordon360/Models/CCT/Messages.cs +++ b/Gordon360/Models/CCT/Messages.cs @@ -1,37 +1,37 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Messages - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string _id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - public string text { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - public byte[] image { get; set; } - public byte[] video { get; set; } - public byte[] audio { get; set; } - public bool system { get; set; } - public bool sent { get; set; } - public bool received { get; set; } - public bool pending { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Messages + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string _id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + public string text { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + public byte[] image { get; set; } + public byte[] video { get; set; } + public byte[] audio { get; set; } + public bool system { get; set; } + public bool sent { get; set; } + public bool received { get; set; } + public bool pending { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs b/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs index eb0d76630..f410e11d2 100644 --- a/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs +++ b/Gordon360/Models/CCT/NEWS_CATEGORIESResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_CATEGORIESResult - { - public int categoryID { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_CATEGORIESResult + { + public int categoryID { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_NEWResult.cs b/Gordon360/Models/CCT/NEWS_NEWResult.cs index 407a022a2..4c1072225 100644 --- a/Gordon360/Models/CCT/NEWS_NEWResult.cs +++ b/Gordon360/Models/CCT/NEWS_NEWResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_NEWResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_NEWResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs b/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs index 32f45b074..1c995a32b 100644 --- a/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs +++ b/Gordon360/Models/CCT/NEWS_NOT_EXPIREDResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_NOT_EXPIREDResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_NOT_EXPIREDResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs b/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs index 0bbad877e..774ea5f51 100644 --- a/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs +++ b/Gordon360/Models/CCT/NEWS_PERSONAL_UNAPPROVEDResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class NEWS_PERSONAL_UNAPPROVEDResult - { - public int SNID { get; set; } - public string ADUN { get; set; } - public int categoryID { get; set; } - public string Subject { get; set; } - public string Body { get; set; } - public string Image { get; set; } - public bool? Sent { get; set; } - public bool? thisPastMailing { get; set; } - public DateTime? Entered { get; set; } - public string categoryName { get; set; } - public int? SortOrder { get; set; } - public DateTime? ManualExpirationDate { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class NEWS_PERSONAL_UNAPPROVEDResult + { + public int SNID { get; set; } + public string ADUN { get; set; } + public int categoryID { get; set; } + public string Subject { get; set; } + public string Body { get; set; } + public string Image { get; set; } + public bool? Sent { get; set; } + public bool? thisPastMailing { get; set; } + public DateTime? Entered { get; set; } + public string categoryName { get; set; } + public int? SortOrder { get; set; } + public DateTime? ManualExpirationDate { get; set; } + } +} diff --git a/Gordon360/Models/CCT/PART_DEF.cs b/Gordon360/Models/CCT/PART_DEF.cs index d1e94f69b..538e9e8ac 100644 --- a/Gordon360/Models/CCT/PART_DEF.cs +++ b/Gordon360/Models/CCT/PART_DEF.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class PART_DEF - { - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Required] - [StringLength(45)] - [Unicode(false)] - public string PART_DESC { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class PART_DEF + { + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string PART_DESC { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs b/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs index 845c2aab5..be1607403 100644 --- a/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs +++ b/Gordon360/Models/CCT/PHOTO_INFO_PER_USER_NAMEResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class PHOTO_INFO_PER_USER_NAMEResult - { - public string Img_Name { get; set; } - public string Img_Path { get; set; } - public string Pref_Img_Name { get; set; } - public string Pref_Img_Path { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class PHOTO_INFO_PER_USER_NAMEResult + { + public string Img_Name { get; set; } + public string Img_Path { get; set; } + public string Pref_Img_Name { get; set; } + public string Pref_Img_Path { get; set; } + } +} diff --git a/Gordon360/Models/CCT/Police.cs b/Gordon360/Models/CCT/Police.cs index 81903c194..0a81f69b1 100644 --- a/Gordon360/Models/CCT/Police.cs +++ b/Gordon360/Models/CCT/Police.cs @@ -1,16 +1,16 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Police - { - public int? ID_NUM { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Police + { + public int? ID_NUM { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/REQUEST.cs b/Gordon360/Models/CCT/REQUEST.cs index 086730653..26340f9e4 100644 --- a/Gordon360/Models/CCT/REQUEST.cs +++ b/Gordon360/Models/CCT/REQUEST.cs @@ -1,38 +1,38 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class REQUEST - { - [Key] - public int REQUEST_ID { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(8)] - [Unicode(false)] - public string ACT_CDE { get; set; } - public int ID_NUM { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string PART_CDE { get; set; } - [Column(TypeName = "datetime")] - public DateTime DATE_SENT { get; set; } - [StringLength(45)] - [Unicode(false)] - public string COMMENT_TXT { get; set; } - [Required] - [StringLength(20)] - [Unicode(false)] - public string STATUS { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class REQUEST + { + [Key] + public int REQUEST_ID { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ACT_CDE { get; set; } + public int ID_NUM { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string PART_CDE { get; set; } + [Column(TypeName = "datetime")] + public DateTime DATE_SENT { get; set; } + [StringLength(45)] + [Unicode(false)] + public string COMMENT_TXT { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string STATUS { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs index a1eb08cc3..f3f929f3d 100644 --- a/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/REQUESTS_PER_ACT_CDEResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUESTS_PER_ACT_CDEResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUESTS_PER_ACT_CDEResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs b/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs index 3cff1fd59..4813301e6 100644 --- a/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/REQUESTS_PER_STUDENT_IDResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUESTS_PER_STUDENT_IDResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUESTS_PER_STUDENT_IDResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs b/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs index 64dd98a96..9d8abecb1 100644 --- a/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs +++ b/Gordon360/Models/CCT/REQUEST_PER_REQUEST_IDResult.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class REQUEST_PER_REQUEST_IDResult - { - public int RequestID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public int IDNumber { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public string CommentText { get; set; } - public DateTime DateSent { get; set; } - public string RequestApproved { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class REQUEST_PER_REQUEST_IDResult + { + public int RequestID { get; set; } + public string ActivityCode { get; set; } + public string ActivityDescription { get; set; } + public int IDNumber { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Participation { get; set; } + public string ParticipationDescription { get; set; } + public string SessionCode { get; set; } + public string SessionDescription { get; set; } + public string CommentText { get; set; } + public DateTime DateSent { get; set; } + public string RequestApproved { get; set; } + } +} diff --git a/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs b/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs index ba1b3afcd..c68539dd2 100644 --- a/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs +++ b/Gordon360/Models/CCT/RIDERS_BY_RIDE_IDResult.cs @@ -1,14 +1,14 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class RIDERS_BY_RIDE_IDResult - { - public string rideID { get; set; } - public string ID { get; set; } - public byte isDriver { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class RIDERS_BY_RIDE_IDResult + { + public string rideID { get; set; } + public string ID { get; set; } + public byte isDriver { get; set; } + } +} diff --git a/Gordon360/Models/CCT/RoomAssign.cs b/Gordon360/Models/CCT/RoomAssign.cs index b052b67fd..eddf14957 100644 --- a/Gordon360/Models/CCT/RoomAssign.cs +++ b/Gordon360/Models/CCT/RoomAssign.cs @@ -1,42 +1,42 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class RoomAssign - { - [Required] - [StringLength(8)] - [Unicode(false)] - public string SESS_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_LOC_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string BLDG_CDE { get; set; } - [Required] - [StringLength(5)] - [Unicode(false)] - public string ROOM_CDE { get; set; } - public int ROOM_SLOT_NUM { get; set; } - public int? ID_NUM { get; set; } - [StringLength(2)] - [Unicode(false)] - public string ROOM_TYPE { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string ROOM_ASSIGN_STS { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ASSIGN_DTE { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class RoomAssign + { + [Required] + [StringLength(8)] + [Unicode(false)] + public string SESS_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_LOC_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string BLDG_CDE { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string ROOM_CDE { get; set; } + public int ROOM_SLOT_NUM { get; set; } + public int? ID_NUM { get; set; } + [StringLength(2)] + [Unicode(false)] + public string ROOM_TYPE { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string ROOM_ASSIGN_STS { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ASSIGN_DTE { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Rooms.cs b/Gordon360/Models/CCT/Rooms.cs index 69a1d980f..652b23568 100644 --- a/Gordon360/Models/CCT/Rooms.cs +++ b/Gordon360/Models/CCT/Rooms.cs @@ -1,29 +1,29 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Rooms - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public bool group { get; set; } - [Column(TypeName = "datetime")] - public DateTime createdAt { get; set; } - [Column(TypeName = "datetime")] - public DateTime lastUpdated { get; set; } - public byte[] roomImage { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Rooms + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public bool group { get; set; } + [Column(TypeName = "datetime")] + public DateTime createdAt { get; set; } + [Column(TypeName = "datetime")] + public DateTime lastUpdated { get; set; } + public byte[] roomImage { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs b/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs index 5d06f737b..752f434af 100644 --- a/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs +++ b/Gordon360/Models/CCT/STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult - { - public int ID_NUM { get; set; } - public string CRS_CDE { get; set; } - public string CRS_TITLE { get; set; } - public string BLDG_CDE { get; set; } - public string ROOM_CDE { get; set; } - public string MONDAY_CDE { get; set; } - public string TUESDAY_CDE { get; set; } - public string WEDNESDAY_CDE { get; set; } - public string THURSDAY_CDE { get; set; } - public string FRIDAY_CDE { get; set; } - public TimeSpan? BEGIN_TIME { get; set; } - public TimeSpan? END_TIME { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEResult + { + public int ID_NUM { get; set; } + public string CRS_CDE { get; set; } + public string CRS_TITLE { get; set; } + public string BLDG_CDE { get; set; } + public string ROOM_CDE { get; set; } + public string MONDAY_CDE { get; set; } + public string TUESDAY_CDE { get; set; } + public string WEDNESDAY_CDE { get; set; } + public string THURSDAY_CDE { get; set; } + public string FRIDAY_CDE { get; set; } + public TimeSpan? BEGIN_TIME { get; set; } + public TimeSpan? END_TIME { get; set; } + } +} diff --git a/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs b/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs index ed6a5faa9..539a2193a 100644 --- a/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs +++ b/Gordon360/Models/CCT/STUDENT_JOBS_PER_ID_NUMResult.cs @@ -1,17 +1,17 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class STUDENT_JOBS_PER_ID_NUMResult - { - public string Job_Title { get; set; } - public string Job_Department { get; set; } - public string Job_Department_Name { get; set; } - public DateTime? Job_Start_Date { get; set; } - public DateTime? Job_End_Date { get; set; } - public DateTime? Job_Expected_End_Date { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class STUDENT_JOBS_PER_ID_NUMResult + { + public string Job_Title { get; set; } + public string Job_Department { get; set; } + public string Job_Department_Name { get; set; } + public DateTime? Job_Start_Date { get; set; } + public DateTime? Job_End_Date { get; set; } + public DateTime? Job_Expected_End_Date { get; set; } + } +} diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs index 38e7cada2..32005ca47 100644 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs +++ b/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ACT_CDEResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISORS_PER_ACT_CDEResult + { + } +} diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs index db6477480..794cec48a 100644 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs +++ b/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ID_NUMResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISORS_PER_ID_NUMResult + { + } +} diff --git a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs b/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs index 4ce9968d8..7cd66b8e8 100644 --- a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs +++ b/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs @@ -1,11 +1,11 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISOR_PER_SUP_IDResult - { - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class SUPERVISOR_PER_SUP_IDResult + { + } +} diff --git a/Gordon360/Models/CCT/Save_Bookings.cs b/Gordon360/Models/CCT/Save_Bookings.cs index a6b679c61..a59557986 100644 --- a/Gordon360/Models/CCT/Save_Bookings.cs +++ b/Gordon360/Models/CCT/Save_Bookings.cs @@ -1,27 +1,27 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Save_Bookings - { - [Key] - [StringLength(25)] - [Unicode(false)] - public string ID { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string rideID { get; set; } - public byte isDriver { get; set; } - - [ForeignKey("rideID")] - [InverseProperty("Save_Bookings")] - public virtual Save_Rides ride { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Save_Bookings + { + [Key] + [StringLength(25)] + [Unicode(false)] + public string ID { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string rideID { get; set; } + public byte isDriver { get; set; } + + [ForeignKey("rideID")] + [InverseProperty("Save_Bookings")] + public virtual Save_Rides ride { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Save_Rides.cs b/Gordon360/Models/CCT/Save_Rides.cs index 037851348..23446cf14 100644 --- a/Gordon360/Models/CCT/Save_Rides.cs +++ b/Gordon360/Models/CCT/Save_Rides.cs @@ -1,44 +1,44 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Save_Rides - { - public Save_Rides() - { - Save_Bookings = new HashSet(); - } - - [Key] - [StringLength(10)] - [Unicode(false)] - public string rideID { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string destination { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string meetingPoint { get; set; } - [Column(TypeName = "datetime")] - public DateTime startTime { get; set; } - [Column(TypeName = "datetime")] - public DateTime endTime { get; set; } - public int capacity { get; set; } - [Required] - [StringLength(500)] - [Unicode(false)] - public string notes { get; set; } - public byte canceled { get; set; } - - [InverseProperty("ride")] - public virtual ICollection Save_Bookings { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Save_Rides + { + public Save_Rides() + { + Save_Bookings = new HashSet(); + } + + [Key] + [StringLength(10)] + [Unicode(false)] + public string rideID { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string destination { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string meetingPoint { get; set; } + [Column(TypeName = "datetime")] + public DateTime startTime { get; set; } + [Column(TypeName = "datetime")] + public DateTime endTime { get; set; } + public int capacity { get; set; } + [Required] + [StringLength(500)] + [Unicode(false)] + public string notes { get; set; } + public byte canceled { get; set; } + + [InverseProperty("ride")] + public virtual ICollection Save_Bookings { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Schedule_Control.cs b/Gordon360/Models/CCT/Schedule_Control.cs index 6c94825ff..755ce81a0 100644 --- a/Gordon360/Models/CCT/Schedule_Control.cs +++ b/Gordon360/Models/CCT/Schedule_Control.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Schedule_Control - { - public int IsSchedulePrivate { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ModifiedTimeStamp { get; set; } - [StringLength(100)] - [Unicode(false)] - public string Description { get; set; } - [Key] - [StringLength(10)] - [Unicode(false)] - public string gordon_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Schedule_Control + { + public int IsSchedulePrivate { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ModifiedTimeStamp { get; set; } + [StringLength(100)] + [Unicode(false)] + public string Description { get; set; } + [Key] + [StringLength(10)] + [Unicode(false)] + public string gordon_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Slider_Images.cs b/Gordon360/Models/CCT/Slider_Images.cs index ecb46c63f..5bbfa8ca4 100644 --- a/Gordon360/Models/CCT/Slider_Images.cs +++ b/Gordon360/Models/CCT/Slider_Images.cs @@ -1,30 +1,30 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class Slider_Images - { - [Key] - public int ID { get; set; } - [Required] - [StringLength(150)] - [Unicode(false)] - public string Path { get; set; } - [Required] - [StringLength(255)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(500)] - [Unicode(false)] - public string LinkURL { get; set; } - public int Width { get; set; } - public int Height { get; set; } - public int SortOrder { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class Slider_Images + { + [Key] + public int ID { get; set; } + [Required] + [StringLength(150)] + [Unicode(false)] + public string Path { get; set; } + [Required] + [StringLength(255)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(500)] + [Unicode(false)] + public string LinkURL { get; set; } + public int Width { get; set; } + public int Height { get; set; } + public int SortOrder { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/States.cs b/Gordon360/Models/CCT/States.cs index a218bebe3..ec506a1cf 100644 --- a/Gordon360/Models/CCT/States.cs +++ b/Gordon360/Models/CCT/States.cs @@ -1,22 +1,22 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class States - { - [Required] - [StringLength(63)] - [Unicode(false)] - public string Name { get; set; } - [StringLength(31)] - [Unicode(false)] - public string Abbreviation { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class States + { + [Required] + [StringLength(63)] + [Unicode(false)] + public string Name { get; set; } + [StringLength(31)] + [Unicode(false)] + public string Abbreviation { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Student.cs b/Gordon360/Models/CCT/Student.cs index 92839eecf..e4bd69501 100644 --- a/Gordon360/Models/CCT/Student.cs +++ b/Gordon360/Models/CCT/Student.cs @@ -1,195 +1,195 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Student - { - [Required] - [StringLength(10)] - [Unicode(false)] - public string ID { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Title { get; set; } - [StringLength(50)] - [Unicode(false)] - public string FirstName { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MiddleName { get; set; } - [StringLength(50)] - [Unicode(false)] - public string LastName { get; set; } - [StringLength(3)] - [Unicode(false)] - public string Suffix { get; set; } - [StringLength(30)] - [Unicode(false)] - public string MaidenName { get; set; } - [StringLength(30)] - [Unicode(false)] - public string NickName { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnOffCampus { get; set; } - [StringLength(5)] - [Unicode(false)] - public string OnCampusBuilding { get; set; } - [StringLength(5)] - [Unicode(false)] - public string OnCampusRoom { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusPhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusPrivatePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OnCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OffCampusStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string OffCampusStreet2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string OffCampusCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string OffCampusState { get; set; } - [StringLength(12)] - [Unicode(false)] - public string OffCampusPostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string OffCampusCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string OffCampusPhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string OffCampusFax { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet1 { get; set; } - [StringLength(60)] - [Unicode(false)] - public string HomeStreet2 { get; set; } - [StringLength(25)] - [Unicode(false)] - public string HomeCity { get; set; } - [StringLength(2)] - [Unicode(false)] - public string HomeState { get; set; } - [StringLength(12)] - [Unicode(false)] - public string HomePostalCode { get; set; } - [StringLength(3)] - [Unicode(false)] - public string HomeCountry { get; set; } - [StringLength(41)] - [Unicode(false)] - public string HomePhone { get; set; } - [StringLength(1)] - [Unicode(false)] - public string HomeFax { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Cohort { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Class { get; set; } - [StringLength(10)] - [Unicode(false)] - public string KeepPrivate { get; set; } - [StringLength(14)] - [Unicode(false)] - public string Barcode { get; set; } - [StringLength(92)] - [Unicode(false)] - public string AdvisorIDs { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Married { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Commuter { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major2 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Major3 { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Email { get; set; } - [StringLength(1)] - [Unicode(false)] - public string Gender { get; set; } - [StringLength(1)] - [Unicode(false)] - public string grad_student { get; set; } - [StringLength(255)] - [Unicode(false)] - public string GradDate { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor1 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor2 { get; set; } - [StringLength(5)] - [Unicode(false)] - public string Minor3 { get; set; } - [StringLength(15)] - [Unicode(false)] - public string MobilePhone { get; set; } - public int IsMobilePhonePrivate { get; set; } - [StringLength(50)] - [Unicode(false)] - public string AD_Username { get; set; } - public int? show_pic { get; set; } - public int? preferred_photo { get; set; } - [StringLength(60)] - [Unicode(false)] - public string Country { get; set; } - [StringLength(45)] - [Unicode(false)] - public string BuildingDescription { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major1Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Major3Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor1Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor2Description { get; set; } - [StringLength(50)] - [Unicode(false)] - public string Minor3Description { get; set; } - [StringLength(20)] - [Unicode(false)] - public string Mail_Location { get; set; } - public int? ChapelRequired { get; set; } - public int? ChapelAttended { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Student + { + [Required] + [StringLength(10)] + [Unicode(false)] + public string ID { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Title { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MiddleName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [StringLength(3)] + [Unicode(false)] + public string Suffix { get; set; } + [StringLength(30)] + [Unicode(false)] + public string MaidenName { get; set; } + [StringLength(30)] + [Unicode(false)] + public string NickName { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnOffCampus { get; set; } + [StringLength(5)] + [Unicode(false)] + public string OnCampusBuilding { get; set; } + [StringLength(5)] + [Unicode(false)] + public string OnCampusRoom { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusPhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusPrivatePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OnCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OffCampusStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string OffCampusStreet2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string OffCampusCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string OffCampusState { get; set; } + [StringLength(12)] + [Unicode(false)] + public string OffCampusPostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string OffCampusCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string OffCampusPhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string OffCampusFax { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet1 { get; set; } + [StringLength(60)] + [Unicode(false)] + public string HomeStreet2 { get; set; } + [StringLength(25)] + [Unicode(false)] + public string HomeCity { get; set; } + [StringLength(2)] + [Unicode(false)] + public string HomeState { get; set; } + [StringLength(12)] + [Unicode(false)] + public string HomePostalCode { get; set; } + [StringLength(3)] + [Unicode(false)] + public string HomeCountry { get; set; } + [StringLength(41)] + [Unicode(false)] + public string HomePhone { get; set; } + [StringLength(1)] + [Unicode(false)] + public string HomeFax { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Cohort { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Class { get; set; } + [StringLength(10)] + [Unicode(false)] + public string KeepPrivate { get; set; } + [StringLength(14)] + [Unicode(false)] + public string Barcode { get; set; } + [StringLength(92)] + [Unicode(false)] + public string AdvisorIDs { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Married { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Commuter { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major2 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Major3 { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Email { get; set; } + [StringLength(1)] + [Unicode(false)] + public string Gender { get; set; } + [StringLength(1)] + [Unicode(false)] + public string grad_student { get; set; } + [StringLength(255)] + [Unicode(false)] + public string GradDate { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor1 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor2 { get; set; } + [StringLength(5)] + [Unicode(false)] + public string Minor3 { get; set; } + [StringLength(15)] + [Unicode(false)] + public string MobilePhone { get; set; } + public int IsMobilePhonePrivate { get; set; } + [StringLength(50)] + [Unicode(false)] + public string AD_Username { get; set; } + public int? show_pic { get; set; } + public int? preferred_photo { get; set; } + [StringLength(60)] + [Unicode(false)] + public string Country { get; set; } + [StringLength(45)] + [Unicode(false)] + public string BuildingDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major1Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Major3Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor1Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor2Description { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Minor3Description { get; set; } + [StringLength(20)] + [Unicode(false)] + public string Mail_Location { get; set; } + public int? ChapelRequired { get; set; } + public int? ChapelAttended { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/StudentNewsExpiration.cs b/Gordon360/Models/CCT/StudentNewsExpiration.cs index 37c43e467..0de27c755 100644 --- a/Gordon360/Models/CCT/StudentNewsExpiration.cs +++ b/Gordon360/Models/CCT/StudentNewsExpiration.cs @@ -1,18 +1,18 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - public partial class StudentNewsExpiration - { - [Key] - public int SNID { get; set; } - [Column(TypeName = "datetime")] - public DateTime? ManualExpirationDate { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + public partial class StudentNewsExpiration + { + [Key] + public int SNID { get; set; } + [Column(TypeName = "datetime")] + public DateTime? ManualExpirationDate { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs b/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs index 11dd9bde4..cac5de35b 100644 --- a/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs +++ b/Gordon360/Models/CCT/Timesheets_Clock_In_Out.cs @@ -1,19 +1,19 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Timesheets_Clock_In_Out - { - public int ID_Num { get; set; } - public bool? CurrentState { get; set; } - [Column(TypeName = "datetime")] - public DateTime? Timestamp { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Timesheets_Clock_In_Out + { + public int ID_Num { get; set; } + public bool? CurrentState { get; set; } + [Column(TypeName = "datetime")] + public DateTime? Timestamp { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs b/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs index a09f6c4a3..57ccc2e83 100644 --- a/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs +++ b/Gordon360/Models/CCT/UPCOMING_RIDESResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPCOMING_RIDESResult - { - public string rideID { get; set; } - public int capacity { get; set; } - public string destination { get; set; } - public string meetingPoint { get; set; } - public DateTime startTime { get; set; } - public DateTime endTime { get; set; } - public byte isCanceled { get; set; } - public string notes { get; set; } - public byte isDriver { get; set; } - public int? seatsTaken { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPCOMING_RIDESResult + { + public string rideID { get; set; } + public int capacity { get; set; } + public string destination { get; set; } + public string meetingPoint { get; set; } + public DateTime startTime { get; set; } + public DateTime endTime { get; set; } + public byte isCanceled { get; set; } + public string notes { get; set; } + public byte isDriver { get; set; } + public int? seatsTaken { get; set; } + } +} diff --git a/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs b/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs index a4badef69..3d82c5bac 100644 --- a/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/UPCOMING_RIDES_BY_STUDENT_IDResult.cs @@ -1,21 +1,21 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPCOMING_RIDES_BY_STUDENT_IDResult - { - public string rideID { get; set; } - public int capacity { get; set; } - public string destination { get; set; } - public string meetingPoint { get; set; } - public DateTime startTime { get; set; } - public DateTime endTime { get; set; } - public byte isCanceled { get; set; } - public string notes { get; set; } - public byte isDriver { get; set; } - public int? seatsTaken { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPCOMING_RIDES_BY_STUDENT_IDResult + { + public string rideID { get; set; } + public int capacity { get; set; } + public string destination { get; set; } + public string meetingPoint { get; set; } + public DateTime startTime { get; set; } + public DateTime endTime { get; set; } + public byte isCanceled { get; set; } + public string notes { get; set; } + public byte isDriver { get; set; } + public int? seatsTaken { get; set; } + } +} diff --git a/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs b/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs index ef2768716..5e4c591c4 100644 --- a/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs +++ b/Gordon360/Models/CCT/UPDATE_CELL_PHONEResult.cs @@ -1,13 +1,13 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class UPDATE_CELL_PHONEResult - { - public bool? Success { get; set; } - public string Message { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class UPDATE_CELL_PHONEResult + { + public bool? Success { get; set; } + public string Message { get; set; } + } +} diff --git a/Gordon360/Models/CCT/User_Connection_Ids.cs b/Gordon360/Models/CCT/User_Connection_Ids.cs index 76948d61c..e7f493f50 100644 --- a/Gordon360/Models/CCT/User_Connection_Ids.cs +++ b/Gordon360/Models/CCT/User_Connection_Ids.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class User_Connection_Ids - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string connection_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class User_Connection_Ids + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string connection_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/User_Rooms.cs b/Gordon360/Models/CCT/User_Rooms.cs index d2b3e87c7..46b1d73e5 100644 --- a/Gordon360/Models/CCT/User_Rooms.cs +++ b/Gordon360/Models/CCT/User_Rooms.cs @@ -1,23 +1,23 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class User_Rooms - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string user_id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string room_id { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class User_Rooms + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string user_id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string room_id { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/Users.cs b/Gordon360/Models/CCT/Users.cs index 81ecfe82b..c4853adf6 100644 --- a/Gordon360/Models/CCT/Users.cs +++ b/Gordon360/Models/CCT/Users.cs @@ -1,24 +1,24 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class Users - { - [Required] - [StringLength(72)] - [Unicode(false)] - public string _id { get; set; } - [Required] - [StringLength(72)] - [Unicode(false)] - public string name { get; set; } - public byte[] avatar { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class Users + { + [Required] + [StringLength(72)] + [Unicode(false)] + public string _id { get; set; } + [Required] + [StringLength(72)] + [Unicode(false)] + public string name { get; set; } + public byte[] avatar { get; set; } + } } \ No newline at end of file diff --git a/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs b/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs index 48184adbe..9c3275a0f 100644 --- a/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs +++ b/Gordon360/Models/CCT/VALID_DRIVES_BY_IDResult.cs @@ -1,12 +1,12 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class VALID_DRIVES_BY_IDResult - { - public int? numOccupiedRides { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class VALID_DRIVES_BY_IDResult + { + public int? numOccupiedRides { get; set; } + } +} diff --git a/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs b/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs index 61541922c..6f0215f51 100644 --- a/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs +++ b/Gordon360/Models/CCT/VICTORY_PROMISE_BY_STUDENT_IDResult.cs @@ -1,15 +1,15 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class VICTORY_PROMISE_BY_STUDENT_IDResult - { - public int? TOTAL_VP_IM_SCORE { get; set; } - public int? TOTAL_VP_CC_SCORE { get; set; } - public int? TOTAL_VP_LS_SCORE { get; set; } - public int? TOTAL_VP_LW_SCORE { get; set; } - } -} +// This file has been auto generated by EF Core Power Tools. +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Gordon360.Models.CCT +{ + public partial class VICTORY_PROMISE_BY_STUDENT_IDResult + { + public int? TOTAL_VP_IM_SCORE { get; set; } + public int? TOTAL_VP_CC_SCORE { get; set; } + public int? TOTAL_VP_LS_SCORE { get; set; } + public int? TOTAL_VP_LW_SCORE { get; set; } + } +} diff --git a/Gordon360/Models/CCT/_360_SLIDER.cs b/Gordon360/Models/CCT/_360_SLIDER.cs index cbeb58312..25ac946c6 100644 --- a/Gordon360/Models/CCT/_360_SLIDER.cs +++ b/Gordon360/Models/CCT/_360_SLIDER.cs @@ -1,52 +1,52 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class _360_SLIDER - { - [Required] - [StringLength(150)] - [Unicode(false)] - public string strFileName { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strFlashFileName { get; set; } - [Required] - [StringLength(255)] - [Unicode(false)] - public string strAltTag { get; set; } - [Required] - [StringLength(500)] - [Unicode(false)] - public string strLinkURL { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderSubTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderAction { get; set; } - public int iWidth { get; set; } - public int iHeight { get; set; } - [Required] - [StringLength(11)] - [Unicode(false)] - public string strExtensions { get; set; } - [Column(TypeName = "datetime")] - public DateTime dtModified { get; set; } - public int sortOrder { get; set; } - } +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class _360_SLIDER + { + [Required] + [StringLength(150)] + [Unicode(false)] + public string strFileName { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strFlashFileName { get; set; } + [Required] + [StringLength(255)] + [Unicode(false)] + public string strAltTag { get; set; } + [Required] + [StringLength(500)] + [Unicode(false)] + public string strLinkURL { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderTitle { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderSubTitle { get; set; } + [Required] + [StringLength(1)] + [Unicode(false)] + public string strSliderAction { get; set; } + public int iWidth { get; set; } + public int iHeight { get; set; } + [Required] + [StringLength(11)] + [Unicode(false)] + public string strExtensions { get; set; } + [Column(TypeName = "datetime")] + public DateTime dtModified { get; set; } + public int sortOrder { get; set; } + } } \ No newline at end of file From 5aaa4ae4a40e87c074f6a61911e96517f8f175e5 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 10:06:06 -0400 Subject: [PATCH 09/49] LF for Services --- Gordon360/Services/MembershipService.cs | 806 ++++++++++++------------ Gordon360/Services/ServiceInterfaces.cs | 600 +++++++++--------- 2 files changed, 703 insertions(+), 703 deletions(-) diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index c7a6c101a..2b789f885 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -1,404 +1,404 @@ -using Gordon360.Models.CCT.Context; -using Gordon360.Exceptions; -using Gordon360.Models.CCT; -using Gordon360.Models.ViewModels; -using Gordon360.Static.Methods; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Services -{ - /// - /// Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - /// - public class MembershipService : IMembershipService - { - private readonly CCTContext _context; - private IAccountService _accountService; - - public MembershipService(CCTContext context, IAccountService accountService) - { - _context = context; - _accountService = accountService; - } - - /// - /// Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - /// we do it here by using the validateMembership() method. - /// - /// The membership to be added - /// The newly added Membership object - public async Task AddAsync(MembershipUploadViewModel membership) - { - // validate returns a boolean value. - await ValidateMembershipAsync(membership); - IsPersonAlreadyInActivity(membership); - - - // The Add() method returns the added membership. - var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); - - // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) - if (payload?.Entity == null) - { - throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; - } else - { - await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(payload.Entity); - } - - - } - - /// - /// Delete the membership whose id is specified by the parameter. - /// - /// The membership id - /// The membership that was just deleted - public MembershipView Delete(int membershipID) - { - var result = _context.MEMBERSHIP.Find(membershipID); - if (result == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - MembershipView toReturn = MEMBERSHIPToMembershipView(result); - - _context.MEMBERSHIP.Remove(result); - _context.SaveChanges(); - - return toReturn; - } - - /// - /// Fetch the membership whose id is specified by the parameter - /// - /// The membership id - /// MembershipViewModel if found, null if not found - public MembershipView GetSpecificMembership(int membershipID) - { - MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); - if (result == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - return result; - } - - /// - /// Fetches the memberships associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// Optional code of session to get memberships for - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) - { - //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); - - return _context.MembershipView - .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) - .OrderByDescending(m => m.StartDate); - } - - /// - /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); - } - - /// - /// Fetches the leaders of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetLeaderMembershipsForActivity(string activityCode) - { - var leaderRole = Helpers.GetLeaderRoleCodes(); - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == leaderRole); - } - - /// - /// Fetches the advisors of the activity whose activity code is specified by the parameter. - /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) - { - - var advisorRole = Helpers.GetAdvisorRoleCodes(); - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == advisorRole); - } - - /// - /// Fetches all the membership information linked to the student whose id appears as a parameter. - /// - /// The student's AD Username. - /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForStudent(string username) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); - } - - /// - /// Fetches the number of followers associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// int. - public int GetActivityFollowersCount(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); - } - - /// - /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// int. - public int GetActivityMembersCount(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); - } - - /// - /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - /// - /// The activity code. - /// The session code - /// int. - public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); - } - - /// - /// Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - /// - /// The activity code. - /// The session code - /// int - public int GetActivityMembersCountForSession(string activityCode, string sessionCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); - } - - /// - /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. - /// - /// The updated membership. - /// The newly modified membership. - public async Task UpdateAsync(int membershipID, MembershipUploadViewModel membership) - { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - // One can only update certain fields within a membrship - original.COMMENT_TXT = membership.CommentText; - original.PART_CDE = membership.PartCode; - if (membership.PartCode == ParticipationType.Guest.Value) - { - await SetGroupAdminAsync(membershipID, false); - } - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - - } - /// - /// Switches the group-admin property of the person whose membership id is given - /// - /// The corresponding membership object - /// The newly modified membership. - public async Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin) - { - var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - if (original.PART_CDE == "GUEST" && isGroupAdmin) - throw new ArgumentException("A guest cannot be assigned as an admin.", "Participation Level"); - - original.GRP_ADMIN = isGroupAdmin; - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - } - - /// - /// Switches the privacy property of the person whose membership id is given - /// - /// The membership object passed. - /// The newly modified membership. - public async Task SetPrivacyAsync(int membershipID, bool isPrivate) - { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); - if (original == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; - } - - original.PRIVACY = isPrivate; - - await _context.SaveChangesAsync(); - - return MEMBERSHIPToMembershipView(original); - } - - - /// - /// Helper method to Validate a membership - /// - /// The membership to validate - /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) - { - var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username).Any(); - if (!personExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; - } - var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); - if (!participationExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; - } - var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); - if (!sessionExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; - } - var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); - if (!activityExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; - } - - if (!_context.InvolvementOffering.Any(i => i.SESS_CDE == membership.SessCode && i.ACT_CDE.Trim() == membership.ACTCode)) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; - } - - return true; - } - - private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) - { - var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && - x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); - - if (personAlreadyInActivity) - { - throw new ResourceCreationException() { ExceptionMessage = "The Person is already part of the activity." }; - } - - return true; - } - - /// - /// Determines whether or not the given user is a Group Admin of some activity - /// - /// Username of the user to check - /// true if student is a Group Admin, else false - public bool IsGroupAdmin(string username) - { - return _context.MembershipView.Any(membership => membership.Username == username && membership.GroupAdmin == true); - } - - public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null) - { - var memberships = _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode); - - if (participationCode != null) - { - if (participationCode == ParticipationType.GroupAdmin) - { - memberships = memberships.Where(m => m.GroupAdmin == true); - } - else - { - memberships = memberships.Where(m => m.Participation == participationCode.Value); - } - } - - return memberships.AsEnumerable().Select(m => - { - var account = _accountService.GetAccountByUsername(m.Username); - return new EmailViewModel - { - Email = account.Email, - FirstName = account.FirstName, - LastName = account.LastName - }; - }); - } - - public class ParticipationType - { - private ParticipationType(string value) { Value = value; } - - public string Value { get; private set; } - - public static ParticipationType Leader { get { return new ParticipationType("LEAD"); } } - public static ParticipationType Guest { get { return new ParticipationType("GUEST"); } } - public static ParticipationType Member { get { return new ParticipationType("MEMBR"); } } - public static ParticipationType Advisor { get { return new ParticipationType("ADV"); } } - - // NOTE: Group admin is not strictly a participation type, it's a separate role that Advisors and Leaders can have, with a separate flag in the database - // BUT, it's convenient to treat it as a participation type in several places throughout the API - public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } - } - - private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) - { - var sessionCode = _context.CM_SESSION_MSTR - .Where(x => x.SESS_CDE.Equals(membership.SessCode)) - .FirstOrDefault(); - - return new MEMBERSHIP() { - ACT_CDE = membership.ACTCode, - SESS_CDE = membership.SessCode, - ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), - BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, - PART_CDE = membership.PartCode, - COMMENT_TXT = membership.CommentText, - GRP_ADMIN = membership.GroupAdmin, - PRIVACY = membership.Privacy - }; - } - - private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) - { - var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); - - if (foundMembership == null) - { - throw new ResourceCreationException(); - } - - return foundMembership; - } - } +using Gordon360.Models.CCT.Context; +using Gordon360.Exceptions; +using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; +using Gordon360.Static.Methods; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Services +{ + /// + /// Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + /// + public class MembershipService : IMembershipService + { + private readonly CCTContext _context; + private IAccountService _accountService; + + public MembershipService(CCTContext context, IAccountService accountService) + { + _context = context; + _accountService = accountService; + } + + /// + /// Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + /// we do it here by using the validateMembership() method. + /// + /// The membership to be added + /// The newly added Membership object + public async Task AddAsync(MembershipUploadViewModel membership) + { + // validate returns a boolean value. + await ValidateMembershipAsync(membership); + IsPersonAlreadyInActivity(membership); + + + // The Add() method returns the added membership. + var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); + + // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) + if (payload?.Entity == null) + { + throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; + } else + { + await _context.SaveChangesAsync(); + return MEMBERSHIPToMembershipView(payload.Entity); + } + + + } + + /// + /// Delete the membership whose id is specified by the parameter. + /// + /// The membership id + /// The membership that was just deleted + public MembershipView Delete(int membershipID) + { + var result = _context.MEMBERSHIP.Find(membershipID); + if (result == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + MembershipView toReturn = MEMBERSHIPToMembershipView(result); + + _context.MEMBERSHIP.Remove(result); + _context.SaveChanges(); + + return toReturn; + } + + /// + /// Fetch the membership whose id is specified by the parameter + /// + /// The membership id + /// MembershipViewModel if found, null if not found + public MembershipView GetSpecificMembership(int membershipID) + { + MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); + if (result == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + return result; + } + + /// + /// Fetches the memberships associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// Optional code of session to get memberships for + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) + { + //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); + + return _context.MembershipView + .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) + .OrderByDescending(m => m.StartDate); + } + + /// + /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); + } + + /// + /// Fetches the leaders of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetLeaderMembershipsForActivity(string activityCode) + { + var leaderRole = Helpers.GetLeaderRoleCodes(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == leaderRole); + } + + /// + /// Fetches the advisors of the activity whose activity code is specified by the parameter. + /// + /// The activity code. + /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) + { + + var advisorRole = Helpers.GetAdvisorRoleCodes(); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == advisorRole); + } + + /// + /// Fetches all the membership information linked to the student whose id appears as a parameter. + /// + /// The student's AD Username. + /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + public IEnumerable GetMembershipsForStudent(string username) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); + } + + /// + /// Fetches the number of followers associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// int. + public int GetActivityFollowersCount(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); + } + + /// + /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. + /// + /// The activity code. + /// int. + public int GetActivityMembersCount(string activityCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); + } + + /// + /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + /// + /// The activity code. + /// The session code + /// int. + public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); + } + + /// + /// Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + /// + /// The activity code. + /// The session code + /// int + public int GetActivityMembersCountForSession(string activityCode, string sessionCode) + { + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); + } + + /// + /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. + /// + /// The updated membership. + /// The newly modified membership. + public async Task UpdateAsync(int membershipID, MembershipUploadViewModel membership) + { + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + // One can only update certain fields within a membrship + original.COMMENT_TXT = membership.CommentText; + original.PART_CDE = membership.PartCode; + if (membership.PartCode == ParticipationType.Guest.Value) + { + await SetGroupAdminAsync(membershipID, false); + } + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + + } + /// + /// Switches the group-admin property of the person whose membership id is given + /// + /// The corresponding membership object + /// The newly modified membership. + public async Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin) + { + var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + if (original.PART_CDE == "GUEST" && isGroupAdmin) + throw new ArgumentException("A guest cannot be assigned as an admin.", "Participation Level"); + + original.GRP_ADMIN = isGroupAdmin; + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + } + + /// + /// Switches the privacy property of the person whose membership id is given + /// + /// The membership object passed. + /// The newly modified membership. + public async Task SetPrivacyAsync(int membershipID, bool isPrivate) + { + var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + if (original == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; + } + + original.PRIVACY = isPrivate; + + await _context.SaveChangesAsync(); + + return MEMBERSHIPToMembershipView(original); + } + + + /// + /// Helper method to Validate a membership + /// + /// The membership to validate + /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) + { + var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username).Any(); + if (!personExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; + } + var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); + if (!participationExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; + } + var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); + if (!sessionExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; + } + var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); + if (!activityExists) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; + } + + if (!_context.InvolvementOffering.Any(i => i.SESS_CDE == membership.SessCode && i.ACT_CDE.Trim() == membership.ACTCode)) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; + } + + return true; + } + + private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) + { + var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && + x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); + + if (personAlreadyInActivity) + { + throw new ResourceCreationException() { ExceptionMessage = "The Person is already part of the activity." }; + } + + return true; + } + + /// + /// Determines whether or not the given user is a Group Admin of some activity + /// + /// Username of the user to check + /// true if student is a Group Admin, else false + public bool IsGroupAdmin(string username) + { + return _context.MembershipView.Any(membership => membership.Username == username && membership.GroupAdmin == true); + } + + public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null) + { + var memberships = _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode); + + if (participationCode != null) + { + if (participationCode == ParticipationType.GroupAdmin) + { + memberships = memberships.Where(m => m.GroupAdmin == true); + } + else + { + memberships = memberships.Where(m => m.Participation == participationCode.Value); + } + } + + return memberships.AsEnumerable().Select(m => + { + var account = _accountService.GetAccountByUsername(m.Username); + return new EmailViewModel + { + Email = account.Email, + FirstName = account.FirstName, + LastName = account.LastName + }; + }); + } + + public class ParticipationType + { + private ParticipationType(string value) { Value = value; } + + public string Value { get; private set; } + + public static ParticipationType Leader { get { return new ParticipationType("LEAD"); } } + public static ParticipationType Guest { get { return new ParticipationType("GUEST"); } } + public static ParticipationType Member { get { return new ParticipationType("MEMBR"); } } + public static ParticipationType Advisor { get { return new ParticipationType("ADV"); } } + + // NOTE: Group admin is not strictly a participation type, it's a separate role that Advisors and Leaders can have, with a separate flag in the database + // BUT, it's convenient to treat it as a participation type in several places throughout the API + public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } + } + + private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) + { + var sessionCode = _context.CM_SESSION_MSTR + .Where(x => x.SESS_CDE.Equals(membership.SessCode)) + .FirstOrDefault(); + + return new MEMBERSHIP() { + ACT_CDE = membership.ACTCode, + SESS_CDE = membership.SessCode, + ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), + BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, + PART_CDE = membership.PartCode, + COMMENT_TXT = membership.CommentText, + GRP_ADMIN = membership.GroupAdmin, + PRIVACY = membership.Privacy + }; + } + + private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) + { + var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); + + if (foundMembership == null) + { + throw new ResourceCreationException(); + } + + return foundMembership; + } + } } \ No newline at end of file diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index aa775a8a7..d6aac42be 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -1,300 +1,300 @@ -using Gordon360.Models.CCT; -using Gordon360.Models.MyGordon; -using Gordon360.Models.ViewModels; -using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using static Gordon360.Controllers.WellnessController; -using static Gordon360.Services.MembershipService; - -// -// Namespace with all the Service Interfaces that are to be implemented. I don't think making this interface is required, the services can work fine on their own. -// However, building the interfaces first does give a general sense of structure to their implementations. A certain cohesiveness :p. -// -namespace Gordon360.Services -{ - public interface IProfileService - { - StudentProfileViewModel? GetStudentProfileByUsername(string username); - FacultyStaffProfileViewModel? GetFacultyStaffProfileByUsername(string username); - AlumniProfileViewModel? GetAlumniProfileByUsername(string username); - MailboxViewModel GetMailboxCombination(string username); - DateTime GetBirthdate(string username); - Task> GetAdvisorsAsync(string username); - CliftonStrengthsViewModel? GetCliftonStrengths(int id); - Task ToggleCliftonStrengthsPrivacyAsync(int id); - IEnumerable GetEmergencyContact(string username); - ProfileCustomViewModel? GetCustomUserInfo(string username); - Task GetPhotoPathAsync(string username); - Task UpdateProfileLinkAsync(string username, string type, CUSTOM_PROFILE path); - Task UpdateMobilePhoneNumberAsync(string username, string newMobilePhoneNumber); - Task UpdateMobilePrivacyAsync(string username, string value); - Task UpdateImagePrivacyAsync(string username, string value); - Task UpdateProfileImageAsync(string username, string path, string name); - ProfileViewModel? ComposeProfile(object? student, object? alumni, object? faculty, object? customInfo); - Task InformationChangeRequest(string username, ProfileFieldViewModel[] updatedField); - } - - public interface IAddressesService - { - IEnumerable GetAllStates(); - IEnumerable GetAllCountries(); - } - - public interface IEventService - { - IEnumerable GetEventsForStudentByTerm(string username, string term); - IEnumerable GetAllEvents(); - IEnumerable GetPublicEvents(); - IEnumerable GetCLAWEvents(); - } - - public interface IDiningService - { - DiningViewModel GetDiningPlanInfo(int id, string sessionCode); - } - - public interface IAccountService - { - AccountViewModel GetAccountByID(string id); - IEnumerable GetAll(); - string GetGordonIDFromEmail(string email); - AccountViewModel GetAccountByEmail(string email); - AccountViewModel GetAccountByUsername(string username); - IEnumerable AdvancedSearch(List accountTypes, - string firstname, - string lastname, - string major, - string minor, - string hall, - string classType, - string homeCity, - string state, - string country, - string department, - string building); - Task> GetAllBasicInfoAsync(); - Task> GetAllBasicInfoExceptAlumniAsync(); - } - - public interface IWellnessService - { - WellnessViewModel GetStatus(string username); - WellnessQuestionViewModel GetQuestion(); - WellnessViewModel PostStatus(WellnessStatusColor status, string username); - } - - public interface IDirectMessageService - { - CreateGroupViewModel CreateGroup(String name, bool group, string image, List usernames, SendTextViewModel initialMessage, string userId); - bool SendMessage(SendTextViewModel textInfo, string user_id); - bool StoreUserRooms(String userId, String roomId); - bool StoreUserConnectionIds(String userId, String connectionId); - bool DeleteUserConnectionIds(String connectionId); - List> GetUserConnectionIds(List userIds); - IEnumerable GetMessages(string roomId); - IEnumerable GetRooms(string userId); - List GetRoomById(string userId); - MessageViewModel GetSingleMessage(string messageID, string roomID); - object GetSingleRoom(int roomId); - } - - public interface IActivityService - { - ActivityInfoViewModel Get(string activityCode); - Task> GetActivitiesForSessionAsync(string sessionCode); - Task> GetActivityTypesForSessionAsync(string sessionCode); - IEnumerable GetAll(); - bool IsOpen(string activityCode, string sessionCode); - IEnumerable GetOpenActivities(string sess_cde); - IEnumerable GetOpenActivities(string sess_cde, int gordonID); - IEnumerable GetClosedActivities(string sess_cde); - IEnumerable GetClosedActivities(string sess_cde, int gordonID); - ACT_INFO Update(string activityCode, InvolvementUpdateViewModel activity); - void CloseOutActivityForSession(string activityCode, string sess_cde); - void OpenActivityForSession(string activityCode, string sess_cde); - Task UpdateActivityImageAsync(ACT_INFO involvement, IFormFile image); - void ResetActivityImage(string activityCode); - void TogglePrivacy(string activityCode, bool isPrivate); - } - public interface IVictoryPromiseService - { - Task> GetVPScoresAsync(string username); - } - public interface IStudentEmploymentService - { - Task> GetEmploymentAsync(string username); - } - - public interface IActivityInfoService - { - ActivityInfoViewModel Get(string username); - IEnumerable GetAll(); - } - - public interface IAdministratorService - { - ADMIN Get(int id); - ADMIN Get(string gordon_id); - IEnumerable GetAll(); - ADMIN Add(ADMIN admin); - ADMIN Delete(int id); - } - - public interface IEmailService - { - Task> GetEmailsForActivityAsync(string activityCode, string? sessionCode, ParticipationType? participationType); - void SendEmails(string[] to_emails, string to_email, string subject, string email_content, string password); - Task SendEmailToActivityAsync(string activityCode, string sessionCode, string from_email, string subject, string email_content, string password); - } - - public interface IErrorLogService - { - ERROR_LOG Add(ERROR_LOG error_log); - ERROR_LOG Log(string error_message); - } - - public interface ISessionService - { - SessionViewModel Get(string sessionCode); - public SessionViewModel GetCurrentSession(); - public double[] GetDaysLeft(); - IEnumerable GetAll(); - } - - public interface IMembershipService - { - IEnumerable GetLeaderMembershipsForActivity(string activityCode); - IEnumerable GetAdvisorMembershipsForActivity(string activityCode); - IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); - IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); - IEnumerable GetMembershipsForStudent(string username); - int GetActivityFollowersCountForSession(string activityCode, string sessionCode); - int GetActivityMembersCountForSession(string activityCode, string sessionCode); - MembershipView GetSpecificMembership(int membershipID); - int GetActivityFollowersCount(string idactivityCode); - int GetActivityMembersCount(string activityCode); - Task AddAsync(MembershipUploadViewModel membership); - Task UpdateAsync(int membershipID, MembershipUploadViewModel membership); - Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin); - Task SetPrivacyAsync(int membershipID, bool isPrivate); - MembershipView Delete(int membershipID); - bool IsGroupAdmin(string username); - public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); - } - - public interface IJobsService - { - IEnumerable getSavedShiftsForUser(int ID_NUM); - Task SaveShiftForUserAsync(int studentID, int jobID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string shiftNotes, string lastChangedBy); - StudentTimesheetsViewModel EditShift(int rowID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string username); - void DeleteShiftForUser(int rowID, int studentID); - Task SubmitShiftForUserAsync(int studentID, int jobID, DateTime shiftEnd, int submittedTo, string lastChangedBy); - Task> GetsupervisorNameForJobAsync(int supervisorID); - Task> GetActiveJobsAsync(DateTime shiftStart, DateTime shiftEnd, int studentID); - Task> EditShiftOverlapCheckAsync(int studentID, DateTime shiftStart, DateTime shiftEnd, int rowID); - Task> CheckForOverlappingShiftAsync(int studentID, DateTime shiftStart, DateTime shiftEnd); - Task> ClockOutAsync(string id); - Task ClockInAsync(bool state, string id); - Task DeleteClockInAsync(string id); - } - - public interface IParticipationService - { - ParticipationViewModel Get(string id); - IEnumerable GetAll(); - } - - public interface IMembershipRequestService - { - Task GetAsync(int requestID); - Task> GetAllAsync(); - Task> GetMembershipRequestsForActivityAsync(string activityCode); - Task> GetMembershipRequestsForStudentAsync(string usernamne); - REQUEST Add(REQUEST membershipRequest); - REQUEST Update(int requestID, REQUEST membershipRequest); - // The ODD one out. When we approve a request, we would like to get back the new membership. - MEMBERSHIP ApproveRequest(int requestID); - REQUEST DenyRequest(int requestID); - REQUEST Delete(int requestID); - } - public interface IScheduleService - { - Task> GetScheduleStudentAsync(string username); - Task> GetScheduleFacultyAsync(string username); - } - - public interface IScheduleControlService - { - Task UpdateSchedulePrivacyAsync(string username, string value); - Task UpdateDescriptionAsync(string username, string value); - Task UpdateModifiedTimeStampAsync(string username, DateTime value); - } - - public interface IMyScheduleService - { - MYSCHEDULE GetForID(string eventID, string username); - IEnumerable GetAllForUser(string username); - MYSCHEDULE Add(MYSCHEDULE myschedule); - MYSCHEDULE Update(MYSCHEDULE myschedule); - MYSCHEDULE Delete(string eventID, string username); - } - - public interface ISaveService - { - IEnumerable GetUpcoming(string gordon_id); - IEnumerable GetUpcomingForUser(string gordon_id); - Task AddRideAsync(Save_Rides newRide, string gordon_id); - Task DeleteRideAsync(string rideID, string gordon_id); - Task CancelRideAsync(string rideID, string gordon_id); - Task AddBookingAsync(Save_Bookings newBooking); - Task DeleteBookingAsync(string rideID, string gordon_id); - } - - public interface IContentManagementService - { - IEnumerable DEPRECATED_GetSliderContent(); - IEnumerable GetBannerSlides(); - Slider_Images AddBannerSlide(BannerSlidePostViewModel slide, string serverURL, string contentRootPath); - Slider_Images DeleteBannerSlide(int slideID); - } - - public interface INewsService - { - StudentNews Get(int newsID); - Task> GetNewsNotExpiredAsync(); - Task> GetNewsNewAsync(); - IEnumerable GetNewsCategories(); - Task> GetNewsPersonalUnapprovedAsync(string username); - StudentNews SubmitNews(StudentNews newsItem, string username); - StudentNews DeleteNews(int newsID); - StudentNewsViewModel EditPosting(int newsID, StudentNews newsItem); - } - - public interface IHousingService - { - bool CheckIfHousingAdmin(string gordonID); - bool DeleteApplication(int applicationID); - string[] GetAllApartmentHalls(); - string GetEditorUsername(int applicationID); - int? GetApplicationID(string username, string sess_cde); - ApartmentApplicationViewModel GetApartmentApplication(int applicationID, bool isAdmin = false); - ApartmentApplicationViewModel[] GetAllApartmentApplication(); - int SaveApplication(string sess_cde, string editorUsername, List apartmentApplicants, List apartmentChoices); - int EditApplication(string username, string sess_cde, int applicationID, string newEditorUsername, List newApartmentApplicants, List newApartmentChoices); - bool ChangeApplicationEditor(string username, int applicationID, string newEditorUsername); - bool ChangeApplicationDateSubmitted(int applicationID); - } - - public interface IAcademicCheckInService - { - Task PutCellPhoneAsync(string id, AcademicCheckInViewModel data); - Task PutEmergencyContactAsync(EmergencyContactViewModel data, string id, string username); - Task> GetHoldsAsync(string id); - Task SetStatusAsync(string id); - Task PutDemographicAsync(string id, AcademicCheckInViewModel data); - Task GetStatusAsync(string id); - } - -} +using Gordon360.Models.CCT; +using Gordon360.Models.MyGordon; +using Gordon360.Models.ViewModels; +using Microsoft.AspNetCore.Http; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using static Gordon360.Controllers.WellnessController; +using static Gordon360.Services.MembershipService; + +// +// Namespace with all the Service Interfaces that are to be implemented. I don't think making this interface is required, the services can work fine on their own. +// However, building the interfaces first does give a general sense of structure to their implementations. A certain cohesiveness :p. +// +namespace Gordon360.Services +{ + public interface IProfileService + { + StudentProfileViewModel? GetStudentProfileByUsername(string username); + FacultyStaffProfileViewModel? GetFacultyStaffProfileByUsername(string username); + AlumniProfileViewModel? GetAlumniProfileByUsername(string username); + MailboxViewModel GetMailboxCombination(string username); + DateTime GetBirthdate(string username); + Task> GetAdvisorsAsync(string username); + CliftonStrengthsViewModel? GetCliftonStrengths(int id); + Task ToggleCliftonStrengthsPrivacyAsync(int id); + IEnumerable GetEmergencyContact(string username); + ProfileCustomViewModel? GetCustomUserInfo(string username); + Task GetPhotoPathAsync(string username); + Task UpdateProfileLinkAsync(string username, string type, CUSTOM_PROFILE path); + Task UpdateMobilePhoneNumberAsync(string username, string newMobilePhoneNumber); + Task UpdateMobilePrivacyAsync(string username, string value); + Task UpdateImagePrivacyAsync(string username, string value); + Task UpdateProfileImageAsync(string username, string path, string name); + ProfileViewModel? ComposeProfile(object? student, object? alumni, object? faculty, object? customInfo); + Task InformationChangeRequest(string username, ProfileFieldViewModel[] updatedField); + } + + public interface IAddressesService + { + IEnumerable GetAllStates(); + IEnumerable GetAllCountries(); + } + + public interface IEventService + { + IEnumerable GetEventsForStudentByTerm(string username, string term); + IEnumerable GetAllEvents(); + IEnumerable GetPublicEvents(); + IEnumerable GetCLAWEvents(); + } + + public interface IDiningService + { + DiningViewModel GetDiningPlanInfo(int id, string sessionCode); + } + + public interface IAccountService + { + AccountViewModel GetAccountByID(string id); + IEnumerable GetAll(); + string GetGordonIDFromEmail(string email); + AccountViewModel GetAccountByEmail(string email); + AccountViewModel GetAccountByUsername(string username); + IEnumerable AdvancedSearch(List accountTypes, + string firstname, + string lastname, + string major, + string minor, + string hall, + string classType, + string homeCity, + string state, + string country, + string department, + string building); + Task> GetAllBasicInfoAsync(); + Task> GetAllBasicInfoExceptAlumniAsync(); + } + + public interface IWellnessService + { + WellnessViewModel GetStatus(string username); + WellnessQuestionViewModel GetQuestion(); + WellnessViewModel PostStatus(WellnessStatusColor status, string username); + } + + public interface IDirectMessageService + { + CreateGroupViewModel CreateGroup(String name, bool group, string image, List usernames, SendTextViewModel initialMessage, string userId); + bool SendMessage(SendTextViewModel textInfo, string user_id); + bool StoreUserRooms(String userId, String roomId); + bool StoreUserConnectionIds(String userId, String connectionId); + bool DeleteUserConnectionIds(String connectionId); + List> GetUserConnectionIds(List userIds); + IEnumerable GetMessages(string roomId); + IEnumerable GetRooms(string userId); + List GetRoomById(string userId); + MessageViewModel GetSingleMessage(string messageID, string roomID); + object GetSingleRoom(int roomId); + } + + public interface IActivityService + { + ActivityInfoViewModel Get(string activityCode); + Task> GetActivitiesForSessionAsync(string sessionCode); + Task> GetActivityTypesForSessionAsync(string sessionCode); + IEnumerable GetAll(); + bool IsOpen(string activityCode, string sessionCode); + IEnumerable GetOpenActivities(string sess_cde); + IEnumerable GetOpenActivities(string sess_cde, int gordonID); + IEnumerable GetClosedActivities(string sess_cde); + IEnumerable GetClosedActivities(string sess_cde, int gordonID); + ACT_INFO Update(string activityCode, InvolvementUpdateViewModel activity); + void CloseOutActivityForSession(string activityCode, string sess_cde); + void OpenActivityForSession(string activityCode, string sess_cde); + Task UpdateActivityImageAsync(ACT_INFO involvement, IFormFile image); + void ResetActivityImage(string activityCode); + void TogglePrivacy(string activityCode, bool isPrivate); + } + public interface IVictoryPromiseService + { + Task> GetVPScoresAsync(string username); + } + public interface IStudentEmploymentService + { + Task> GetEmploymentAsync(string username); + } + + public interface IActivityInfoService + { + ActivityInfoViewModel Get(string username); + IEnumerable GetAll(); + } + + public interface IAdministratorService + { + ADMIN Get(int id); + ADMIN Get(string gordon_id); + IEnumerable GetAll(); + ADMIN Add(ADMIN admin); + ADMIN Delete(int id); + } + + public interface IEmailService + { + Task> GetEmailsForActivityAsync(string activityCode, string? sessionCode, ParticipationType? participationType); + void SendEmails(string[] to_emails, string to_email, string subject, string email_content, string password); + Task SendEmailToActivityAsync(string activityCode, string sessionCode, string from_email, string subject, string email_content, string password); + } + + public interface IErrorLogService + { + ERROR_LOG Add(ERROR_LOG error_log); + ERROR_LOG Log(string error_message); + } + + public interface ISessionService + { + SessionViewModel Get(string sessionCode); + public SessionViewModel GetCurrentSession(); + public double[] GetDaysLeft(); + IEnumerable GetAll(); + } + + public interface IMembershipService + { + IEnumerable GetLeaderMembershipsForActivity(string activityCode); + IEnumerable GetAdvisorMembershipsForActivity(string activityCode); + IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); + IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); + IEnumerable GetMembershipsForStudent(string username); + int GetActivityFollowersCountForSession(string activityCode, string sessionCode); + int GetActivityMembersCountForSession(string activityCode, string sessionCode); + MembershipView GetSpecificMembership(int membershipID); + int GetActivityFollowersCount(string idactivityCode); + int GetActivityMembersCount(string activityCode); + Task AddAsync(MembershipUploadViewModel membership); + Task UpdateAsync(int membershipID, MembershipUploadViewModel membership); + Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin); + Task SetPrivacyAsync(int membershipID, bool isPrivate); + MembershipView Delete(int membershipID); + bool IsGroupAdmin(string username); + public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); + } + + public interface IJobsService + { + IEnumerable getSavedShiftsForUser(int ID_NUM); + Task SaveShiftForUserAsync(int studentID, int jobID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string shiftNotes, string lastChangedBy); + StudentTimesheetsViewModel EditShift(int rowID, DateTime shiftStart, DateTime shiftEnd, string hoursWorked, string username); + void DeleteShiftForUser(int rowID, int studentID); + Task SubmitShiftForUserAsync(int studentID, int jobID, DateTime shiftEnd, int submittedTo, string lastChangedBy); + Task> GetsupervisorNameForJobAsync(int supervisorID); + Task> GetActiveJobsAsync(DateTime shiftStart, DateTime shiftEnd, int studentID); + Task> EditShiftOverlapCheckAsync(int studentID, DateTime shiftStart, DateTime shiftEnd, int rowID); + Task> CheckForOverlappingShiftAsync(int studentID, DateTime shiftStart, DateTime shiftEnd); + Task> ClockOutAsync(string id); + Task ClockInAsync(bool state, string id); + Task DeleteClockInAsync(string id); + } + + public interface IParticipationService + { + ParticipationViewModel Get(string id); + IEnumerable GetAll(); + } + + public interface IMembershipRequestService + { + Task GetAsync(int requestID); + Task> GetAllAsync(); + Task> GetMembershipRequestsForActivityAsync(string activityCode); + Task> GetMembershipRequestsForStudentAsync(string usernamne); + REQUEST Add(REQUEST membershipRequest); + REQUEST Update(int requestID, REQUEST membershipRequest); + // The ODD one out. When we approve a request, we would like to get back the new membership. + MEMBERSHIP ApproveRequest(int requestID); + REQUEST DenyRequest(int requestID); + REQUEST Delete(int requestID); + } + public interface IScheduleService + { + Task> GetScheduleStudentAsync(string username); + Task> GetScheduleFacultyAsync(string username); + } + + public interface IScheduleControlService + { + Task UpdateSchedulePrivacyAsync(string username, string value); + Task UpdateDescriptionAsync(string username, string value); + Task UpdateModifiedTimeStampAsync(string username, DateTime value); + } + + public interface IMyScheduleService + { + MYSCHEDULE GetForID(string eventID, string username); + IEnumerable GetAllForUser(string username); + MYSCHEDULE Add(MYSCHEDULE myschedule); + MYSCHEDULE Update(MYSCHEDULE myschedule); + MYSCHEDULE Delete(string eventID, string username); + } + + public interface ISaveService + { + IEnumerable GetUpcoming(string gordon_id); + IEnumerable GetUpcomingForUser(string gordon_id); + Task AddRideAsync(Save_Rides newRide, string gordon_id); + Task DeleteRideAsync(string rideID, string gordon_id); + Task CancelRideAsync(string rideID, string gordon_id); + Task AddBookingAsync(Save_Bookings newBooking); + Task DeleteBookingAsync(string rideID, string gordon_id); + } + + public interface IContentManagementService + { + IEnumerable DEPRECATED_GetSliderContent(); + IEnumerable GetBannerSlides(); + Slider_Images AddBannerSlide(BannerSlidePostViewModel slide, string serverURL, string contentRootPath); + Slider_Images DeleteBannerSlide(int slideID); + } + + public interface INewsService + { + StudentNews Get(int newsID); + Task> GetNewsNotExpiredAsync(); + Task> GetNewsNewAsync(); + IEnumerable GetNewsCategories(); + Task> GetNewsPersonalUnapprovedAsync(string username); + StudentNews SubmitNews(StudentNews newsItem, string username); + StudentNews DeleteNews(int newsID); + StudentNewsViewModel EditPosting(int newsID, StudentNews newsItem); + } + + public interface IHousingService + { + bool CheckIfHousingAdmin(string gordonID); + bool DeleteApplication(int applicationID); + string[] GetAllApartmentHalls(); + string GetEditorUsername(int applicationID); + int? GetApplicationID(string username, string sess_cde); + ApartmentApplicationViewModel GetApartmentApplication(int applicationID, bool isAdmin = false); + ApartmentApplicationViewModel[] GetAllApartmentApplication(); + int SaveApplication(string sess_cde, string editorUsername, List apartmentApplicants, List apartmentChoices); + int EditApplication(string username, string sess_cde, int applicationID, string newEditorUsername, List newApartmentApplicants, List newApartmentChoices); + bool ChangeApplicationEditor(string username, int applicationID, string newEditorUsername); + bool ChangeApplicationDateSubmitted(int applicationID); + } + + public interface IAcademicCheckInService + { + Task PutCellPhoneAsync(string id, AcademicCheckInViewModel data); + Task PutEmergencyContactAsync(EmergencyContactViewModel data, string id, string username); + Task> GetHoldsAsync(string id); + Task SetStatusAsync(string id); + Task PutDemographicAsync(string id, AcademicCheckInViewModel data); + Task GetStatusAsync(string id); + } + +} From 7496e725cc6ab3a7a055d2a590ee7c3e248f346d Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 10:06:49 -0400 Subject: [PATCH 10/49] LF for Services --- Gordon360/Services/AccountService.cs | 496 +++++++++++++-------------- 1 file changed, 248 insertions(+), 248 deletions(-) diff --git a/Gordon360/Services/AccountService.cs b/Gordon360/Services/AccountService.cs index c4068ddb6..c89aee35d 100644 --- a/Gordon360/Services/AccountService.cs +++ b/Gordon360/Services/AccountService.cs @@ -1,249 +1,249 @@ -using Gordon360.Authorization; -using Gordon360.Models.CCT.Context; -using Gordon360.Exceptions; -using Gordon360.Models.CCT; -using Gordon360.Models.ViewModels; -using Gordon360.Static.Names; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Services -{ - - /// - /// Service Class that facilitates data transactions between the AccountsController and the Account database model. - /// - public class AccountService : IAccountService - { - private readonly CCTContext _context; - - public AccountService(CCTContext context) - { - _context = context; - } - - /// - /// Fetches a single account record whose id matches the id provided as an argument - /// - /// The person's gordon id - /// AccountViewModel if found, null if not found - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.ACCOUNT)] - public AccountViewModel GetAccountByID(string id) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.gordon_id == id); - if (account == null) - { - // Custom Exception is thrown that will be cauth in the controller Exception filter. - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - /// - /// Fetches all the account records from storage. - /// - /// AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ACCOUNT)] - public IEnumerable GetAll() - { - return (IEnumerable)_context.ACCOUNT; //Map the database model to a more presentable version (a ViewModel) - } - - /// - /// Fetches the account record with the specified email. - /// - /// The email address associated with the account. - /// the account id number - public string GetGordonIDFromEmail(string email) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account.gordon_id; - } - - /// - /// Fetches the account record with the specified email. - /// - /// The email address associated with the account. - /// the first account object which matches the email - public AccountViewModel GetAccountByEmail(string email) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - /// - /// Fetches the account record with the specified username. - /// - /// The AD username associated with the account. - /// the student account information - public AccountViewModel GetAccountByUsername(string username) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username == username); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account; - } - - public IEnumerable AdvancedSearch( - List accountTypes, - string firstname, - string lastname, - string major, - string minor, - string hall, - string classType, - string homeCity, - string state, - string country, - string department, - string building) - { - // Accept common town abbreviations in advanced people search - // East = E, West = W, South = S, North = N - if ( - !string.IsNullOrEmpty(homeCity) - && ( - homeCity.StartsWith("e ") || - homeCity.StartsWith("w ") || - homeCity.StartsWith("s ") || - homeCity.StartsWith("n ") - ) - ) - { - homeCity = - homeCity - .Replace("e ", "east ") - .Replace("w ", "west ") - .Replace("s ", "south ") - .Replace("n ", "north "); - } - - // Create accounts viewmodel to search - IEnumerable accounts = new List(); - if (accountTypes.Contains("student")) - { - accounts = accounts.Union(GetAllPublicStudentAccounts()); - } - - if (accountTypes.Contains("facstaff")) - { - if (string.IsNullOrEmpty(homeCity)) - { - accounts = accounts.Union(GetAllPublicFacultyStaffAccounts()); - } - else - { - accounts = accounts.Union(GetAllPublicFacultyStaffAccounts().Where(a => a.KeepPrivate == "0")); - } - } - - if (accountTypes.Contains("alumni")) - { - if (string.IsNullOrEmpty(homeCity)) - { - accounts = accounts.Union(GetAllPublicAlumniAccounts()); - } - else - { - accounts = accounts.Union(GetAllPublicAlumniAccounts().Where(a => a.ShareAddress.ToLower() != "n")); - } - } - - return accounts - .Where(a => - ( - a.FirstName.ToLower().StartsWith(firstname) - || a.NickName.ToLower().StartsWith(firstname) - ) - && ( - a.LastName.ToLower().StartsWith(lastname) - || a.MaidenName.ToLower().StartsWith(lastname) - ) - && ( - a.Major1Description.StartsWith(major) - || a.Major2Description.StartsWith(major) - || a.Major3Description.StartsWith(major) - ) - && ( - a.Minor1Description.StartsWith(minor) - || a.Minor2Description.StartsWith(minor) - || a.Minor3Description.StartsWith(minor) - ) - && a.Hall.StartsWith(hall) - && a.Class.StartsWith(classType) - && a.HomeCity.ToLower().StartsWith(homeCity) - && a.HomeState.StartsWith(state) - && a.Country.StartsWith(country) - && a.OnCampusDepartment.StartsWith(department) - && a.BuildingDescription.StartsWith(building) - ) - .OrderBy(a => a.LastName) - .ThenBy(a => a.FirstName); - } - - /// - /// Get basic info for all accounts - /// - /// BasicInfoViewModel of all accounts - public async Task> GetAllBasicInfoAsync() - { - - var basicInfo = await _context.Procedures.ALL_BASIC_INFOAsync(); - return basicInfo.Select( - b => new BasicInfoViewModel - { - FirstName = b.FirstName, - LastName = b.LastName, - Nickname = b.Nickname, - UserName = b.UserName - }); - } - - /// - /// Get basic info for all accounts except alumni - /// - /// BasicInfoViewModel of all accounts except alumni - public async Task> GetAllBasicInfoExceptAlumniAsync() - { - var basicInfo = await _context.Procedures.ALL_BASIC_INFO_NOT_ALUMNIAsync(); - return basicInfo.Select( - b => new BasicInfoViewModel - { - FirstName = b.firstname, - LastName = b.lastname, - Nickname = b.Nickname, - UserName = b.Username - }); - } - - private IEnumerable GetAllPublicStudentAccounts() - { - return _context.Student.Select(s => s); - } - - private IEnumerable GetAllPublicFacultyStaffAccounts() - { - return _context.FacStaff.Select(fs => fs); - } - - private IEnumerable GetAllPublicAlumniAccounts() - { - return _context.Alumni.Select(a => a); - } - } +using Gordon360.Authorization; +using Gordon360.Models.CCT.Context; +using Gordon360.Exceptions; +using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; +using Gordon360.Static.Names; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Services +{ + + /// + /// Service Class that facilitates data transactions between the AccountsController and the Account database model. + /// + public class AccountService : IAccountService + { + private readonly CCTContext _context; + + public AccountService(CCTContext context) + { + _context = context; + } + + /// + /// Fetches a single account record whose id matches the id provided as an argument + /// + /// The person's gordon id + /// AccountViewModel if found, null if not found + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.ACCOUNT)] + public AccountViewModel GetAccountByID(string id) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.gordon_id == id); + if (account == null) + { + // Custom Exception is thrown that will be cauth in the controller Exception filter. + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + /// + /// Fetches all the account records from storage. + /// + /// AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ACCOUNT)] + public IEnumerable GetAll() + { + return (IEnumerable)_context.ACCOUNT; //Map the database model to a more presentable version (a ViewModel) + } + + /// + /// Fetches the account record with the specified email. + /// + /// The email address associated with the account. + /// the account id number + public string GetGordonIDFromEmail(string email) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account.gordon_id; + } + + /// + /// Fetches the account record with the specified email. + /// + /// The email address associated with the account. + /// the first account object which matches the email + public AccountViewModel GetAccountByEmail(string email) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + /// + /// Fetches the account record with the specified username. + /// + /// The AD username associated with the account. + /// the student account information + public AccountViewModel GetAccountByUsername(string username) + { + var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username == username); + if (account == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; + } + + return account; + } + + public IEnumerable AdvancedSearch( + List accountTypes, + string firstname, + string lastname, + string major, + string minor, + string hall, + string classType, + string homeCity, + string state, + string country, + string department, + string building) + { + // Accept common town abbreviations in advanced people search + // East = E, West = W, South = S, North = N + if ( + !string.IsNullOrEmpty(homeCity) + && ( + homeCity.StartsWith("e ") || + homeCity.StartsWith("w ") || + homeCity.StartsWith("s ") || + homeCity.StartsWith("n ") + ) + ) + { + homeCity = + homeCity + .Replace("e ", "east ") + .Replace("w ", "west ") + .Replace("s ", "south ") + .Replace("n ", "north "); + } + + // Create accounts viewmodel to search + IEnumerable accounts = new List(); + if (accountTypes.Contains("student")) + { + accounts = accounts.Union(GetAllPublicStudentAccounts()); + } + + if (accountTypes.Contains("facstaff")) + { + if (string.IsNullOrEmpty(homeCity)) + { + accounts = accounts.Union(GetAllPublicFacultyStaffAccounts()); + } + else + { + accounts = accounts.Union(GetAllPublicFacultyStaffAccounts().Where(a => a.KeepPrivate == "0")); + } + } + + if (accountTypes.Contains("alumni")) + { + if (string.IsNullOrEmpty(homeCity)) + { + accounts = accounts.Union(GetAllPublicAlumniAccounts()); + } + else + { + accounts = accounts.Union(GetAllPublicAlumniAccounts().Where(a => a.ShareAddress.ToLower() != "n")); + } + } + + return accounts + .Where(a => + ( + a.FirstName.ToLower().StartsWith(firstname) + || a.NickName.ToLower().StartsWith(firstname) + ) + && ( + a.LastName.ToLower().StartsWith(lastname) + || a.MaidenName.ToLower().StartsWith(lastname) + ) + && ( + a.Major1Description.StartsWith(major) + || a.Major2Description.StartsWith(major) + || a.Major3Description.StartsWith(major) + ) + && ( + a.Minor1Description.StartsWith(minor) + || a.Minor2Description.StartsWith(minor) + || a.Minor3Description.StartsWith(minor) + ) + && a.Hall.StartsWith(hall) + && a.Class.StartsWith(classType) + && a.HomeCity.ToLower().StartsWith(homeCity) + && a.HomeState.StartsWith(state) + && a.Country.StartsWith(country) + && a.OnCampusDepartment.StartsWith(department) + && a.BuildingDescription.StartsWith(building) + ) + .OrderBy(a => a.LastName) + .ThenBy(a => a.FirstName); + } + + /// + /// Get basic info for all accounts + /// + /// BasicInfoViewModel of all accounts + public async Task> GetAllBasicInfoAsync() + { + + var basicInfo = await _context.Procedures.ALL_BASIC_INFOAsync(); + return basicInfo.Select( + b => new BasicInfoViewModel + { + FirstName = b.FirstName, + LastName = b.LastName, + Nickname = b.Nickname, + UserName = b.UserName + }); + } + + /// + /// Get basic info for all accounts except alumni + /// + /// BasicInfoViewModel of all accounts except alumni + public async Task> GetAllBasicInfoExceptAlumniAsync() + { + var basicInfo = await _context.Procedures.ALL_BASIC_INFO_NOT_ALUMNIAsync(); + return basicInfo.Select( + b => new BasicInfoViewModel + { + FirstName = b.firstname, + LastName = b.lastname, + Nickname = b.Nickname, + UserName = b.Username + }); + } + + private IEnumerable GetAllPublicStudentAccounts() + { + return _context.Student.Select(s => s); + } + + private IEnumerable GetAllPublicFacultyStaffAccounts() + { + return _context.FacStaff.Select(fs => fs); + } + + private IEnumerable GetAllPublicAlumniAccounts() + { + return _context.Alumni.Select(a => a); + } + } } \ No newline at end of file From bd802803853f93b645510bf4998aff8f0bb241fa Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 10:08:03 -0400 Subject: [PATCH 11/49] LF for Services --- .../Controllers/MembershipsController.cs | 644 +-- Gordon360/Documentation/Gordon360.xml | 4348 ++++++++--------- 2 files changed, 2496 insertions(+), 2496 deletions(-) diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 697e3fb5e..3e75ef0c4 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -1,322 +1,322 @@ -using Gordon360.Authorization; -using Gordon360.Models.CCT; -using Gordon360.Models.CCT.Context; -using Gordon360.Models.ViewModels; -using Gordon360.Services; -using Gordon360.Static.Names; -using Microsoft.AspNetCore.Mvc; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Gordon360.Controllers -{ - [Route("api/[controller]")] - public class MembershipsController : GordonControllerBase - { - private readonly IMembershipService _membershipService; - private readonly IAccountService _accountService; - private readonly IActivityService _activityService; - - public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) - { - _activityService = activityService; - _accountService = accountService; - _membershipService = membershipService; - } - - /// - /// Get all the memberships associated with a given activity - /// - /// The activity ID - /// Optional code of session to get for - /// IHttpActionResult - [HttpGet] - [Route("activity/{activityCode}")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] - public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) - { - var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the group admin memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all leader-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/group-admin")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] - public ActionResult> GetGroupAdminForActivity(string activityCode) - { - var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the leader-type memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all leader-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/leaders")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] - public ActionResult> GetLeadersForActivity(string activityCode) - { - var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the advisor-type memberships associated with a given activity. - /// - /// The activity ID. - /// A list of all advisor-type memberships for the specified activity. - [HttpGet] - [Route("activity/{activityCode}/advisors")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] - public ActionResult> GetAdvisorsForActivityAsync(string activityCode) - { - var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the number of followers of an activity - /// - /// The activity ID. - /// The number of followers of the activity - [HttpGet] - [Route("activity/{activityCode}/followers")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCount(string activityCode) - { - var result = _membershipService.GetActivityFollowersCount(activityCode); - - return Ok(result); - } - - /// - /// Gets the number of members (besides followers) of an activity - /// - /// The activity ID. - /// The number of members of the activity - [HttpGet] - [Route("activity/{activityCode}/members")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCount(string activityCode) - { - var result = _membershipService.GetActivityMembersCount(activityCode); - - return Ok(result); - } - - /// - /// Gets the number of followers of an activity - /// - /// The activity ID. - /// The session code - /// The number of followers of the activity - [HttpGet] - [Route("activity/{activityCode}/followers/{sessionCode}")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) - { - var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); - - return Ok(result); - } - - /// - /// Gets the number of members (excluding followers) of an activity - /// - /// The activity ID. - /// The session code - /// The number of members of the activity - [HttpGet] - [Route("activity/{activityCode}/members/{sessionCode}")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) - { - var result = _membershipService.GetActivityMembersCountForSession(activityCode, sessionCode); - - return Ok(result); - } - - /// Create a new membership item to be added to database - /// The membership item containing all required and relevant information - /// - /// Posts a new membership to the server to be added into the database - // POST api/ - [HttpPost] - [Route("", Name = "Memberships")] - [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] - public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) - { - var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; - - if (idNum == null) - { - return NotFound(); - } - - var result = await _membershipService.AddAsync(membership); - - if (result == null) - { - return NotFound(); - } - - return Created("memberships", result); - - } - - /// - /// Fetch memberships that a specific student has been a part of - /// @TODO: Move security checks to state your business? Or consider changing implementation here - /// - /// The Student Username - /// The membership information that the student is a part of - [Route("student/{username}")] - [HttpGet] - public ActionResult> GetMembershipsForStudentByUsername(string username) - { - var result = _membershipService.GetMembershipsForStudent(username); - - if (result == null) - { - return NotFound(); - } - // privacy control of membership view model - var authenticatedUserUsername = AuthUtils.GetUsername(User); - var viewerGroups = AuthUtils.GetGroups(User); - - if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all - return Ok(result); - else - { - List list = new List(); - foreach (var item in result) - { - var act = _activityService.Get(item.ActivityCode); - if (!(act.Privacy == true || item.Privacy == true)) - { - list.Add(item); - } - else - { - // If the current authenticated user is an admin of this group, then include the membership - var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); - if (admins.Any(a => a.Username == authenticatedUserUsername)) - { - list.Add(item); - } - } - } - return Ok(list); - } - } - - /// Update an existing membership item - /// The membership id of whichever one is to be changed - /// The content within the membership that is to be changed and what it will change to - /// Calls the server to make a call and update the database with the changed information - /// The membership information that the student is a part of - // PUT api//5 - [HttpPut] - [Route("{membershipID}")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> PutAsync(int membershipID, [FromBody] MembershipUploadViewModel membership) - { - var result = await _membershipService.UpdateAsync(membershipID, membership); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// Update an existing membership item to be a group admin or not - /// /// The content within the membership that is to be changed - /// Calls the server to make a call and update the database with the changed information - [HttpPut] - [Route("{membershipID}/group-admin/{isGroupAdmin}")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> SetGroupAdminAsync(int membershipID, bool isGroupAdmin) - { - var result = await _membershipService.SetGroupAdminAsync(membershipID, isGroupAdmin); - - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// Update an existing membership item to be private or not - /// The membership to toggle privacy on - /// Calls the server to make a call and update the database with the changed information - [HttpPut] - [Route("{membershipID}/privacy/{isPrivate}")] - [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] - public async Task> SetPrivacyAsync(int membershipID, bool isPrivate) - { - - var updatedMembership = await _membershipService.SetPrivacyAsync(membershipID, isPrivate); - return Ok(updatedMembership); - } - - /// Delete an existing membership - /// The identifier for the membership to be deleted - /// Calls the server to make a call and remove the given membership from the database - // DELETE api//5 - [HttpDelete] - [Route("{id}")] - [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] - public ActionResult Delete(int id) - { - var result = _membershipService.Delete(id); - - if (result == null) - { - return NotFound(); - } - - return Ok(result); - } - - /// - /// Determines whether or not the given student is a Group Admin of some activity - /// - /// The account username to check - [HttpGet] - [Route("isGroupAdmin/{id}")] - public ActionResult IsGroupAdmin(string username) - { - var result = _membershipService.IsGroupAdmin(username); - - return Ok(result); - } - } -} +using Gordon360.Authorization; +using Gordon360.Models.CCT; +using Gordon360.Models.CCT.Context; +using Gordon360.Models.ViewModels; +using Gordon360.Services; +using Gordon360.Static.Names; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Gordon360.Controllers +{ + [Route("api/[controller]")] + public class MembershipsController : GordonControllerBase + { + private readonly IMembershipService _membershipService; + private readonly IAccountService _accountService; + private readonly IActivityService _activityService; + + public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) + { + _activityService = activityService; + _accountService = accountService; + _membershipService = membershipService; + } + + /// + /// Get all the memberships associated with a given activity + /// + /// The activity ID + /// Optional code of session to get for + /// IHttpActionResult + [HttpGet] + [Route("activity/{activityCode}")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] + public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) + { + var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the group admin memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all leader-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/group-admin")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] + public ActionResult> GetGroupAdminForActivity(string activityCode) + { + var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the leader-type memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all leader-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/leaders")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] + public ActionResult> GetLeadersForActivity(string activityCode) + { + var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the advisor-type memberships associated with a given activity. + /// + /// The activity ID. + /// A list of all advisor-type memberships for the specified activity. + [HttpGet] + [Route("activity/{activityCode}/advisors")] + [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] + public ActionResult> GetAdvisorsForActivityAsync(string activityCode) + { + var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// + /// Gets the number of followers of an activity + /// + /// The activity ID. + /// The number of followers of the activity + [HttpGet] + [Route("activity/{activityCode}/followers")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityFollowersCount(string activityCode) + { + var result = _membershipService.GetActivityFollowersCount(activityCode); + + return Ok(result); + } + + /// + /// Gets the number of members (besides followers) of an activity + /// + /// The activity ID. + /// The number of members of the activity + [HttpGet] + [Route("activity/{activityCode}/members")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityMembersCount(string activityCode) + { + var result = _membershipService.GetActivityMembersCount(activityCode); + + return Ok(result); + } + + /// + /// Gets the number of followers of an activity + /// + /// The activity ID. + /// The session code + /// The number of followers of the activity + [HttpGet] + [Route("activity/{activityCode}/followers/{sessionCode}")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) + { + var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); + + return Ok(result); + } + + /// + /// Gets the number of members (excluding followers) of an activity + /// + /// The activity ID. + /// The session code + /// The number of members of the activity + [HttpGet] + [Route("activity/{activityCode}/members/{sessionCode}")] + [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] + public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) + { + var result = _membershipService.GetActivityMembersCountForSession(activityCode, sessionCode); + + return Ok(result); + } + + /// Create a new membership item to be added to database + /// The membership item containing all required and relevant information + /// + /// Posts a new membership to the server to be added into the database + // POST api/ + [HttpPost] + [Route("", Name = "Memberships")] + [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] + public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) + { + var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; + + if (idNum == null) + { + return NotFound(); + } + + var result = await _membershipService.AddAsync(membership); + + if (result == null) + { + return NotFound(); + } + + return Created("memberships", result); + + } + + /// + /// Fetch memberships that a specific student has been a part of + /// @TODO: Move security checks to state your business? Or consider changing implementation here + /// + /// The Student Username + /// The membership information that the student is a part of + [Route("student/{username}")] + [HttpGet] + public ActionResult> GetMembershipsForStudentByUsername(string username) + { + var result = _membershipService.GetMembershipsForStudent(username); + + if (result == null) + { + return NotFound(); + } + // privacy control of membership view model + var authenticatedUserUsername = AuthUtils.GetUsername(User); + var viewerGroups = AuthUtils.GetGroups(User); + + if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all + return Ok(result); + else + { + List list = new List(); + foreach (var item in result) + { + var act = _activityService.Get(item.ActivityCode); + if (!(act.Privacy == true || item.Privacy == true)) + { + list.Add(item); + } + else + { + // If the current authenticated user is an admin of this group, then include the membership + var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); + if (admins.Any(a => a.Username == authenticatedUserUsername)) + { + list.Add(item); + } + } + } + return Ok(list); + } + } + + /// Update an existing membership item + /// The membership id of whichever one is to be changed + /// The content within the membership that is to be changed and what it will change to + /// Calls the server to make a call and update the database with the changed information + /// The membership information that the student is a part of + // PUT api//5 + [HttpPut] + [Route("{membershipID}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] + public async Task> PutAsync(int membershipID, [FromBody] MembershipUploadViewModel membership) + { + var result = await _membershipService.UpdateAsync(membershipID, membership); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// Update an existing membership item to be a group admin or not + /// /// The content within the membership that is to be changed + /// Calls the server to make a call and update the database with the changed information + [HttpPut] + [Route("{membershipID}/group-admin/{isGroupAdmin}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] + public async Task> SetGroupAdminAsync(int membershipID, bool isGroupAdmin) + { + var result = await _membershipService.SetGroupAdminAsync(membershipID, isGroupAdmin); + + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + /// Update an existing membership item to be private or not + /// The membership to toggle privacy on + /// Calls the server to make a call and update the database with the changed information + [HttpPut] + [Route("{membershipID}/privacy/{isPrivate}")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] + public async Task> SetPrivacyAsync(int membershipID, bool isPrivate) + { + + var updatedMembership = await _membershipService.SetPrivacyAsync(membershipID, isPrivate); + return Ok(updatedMembership); + } + + /// Delete an existing membership + /// The identifier for the membership to be deleted + /// Calls the server to make a call and remove the given membership from the database + // DELETE api//5 + [HttpDelete] + [Route("{id}")] + [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] + public ActionResult Delete(int id) + { + var result = _membershipService.Delete(id); + + if (result == null) + { + return NotFound(); + } + + return Ok(result); + } + + /// + /// Determines whether or not the given student is a Group Admin of some activity + /// + /// The account username to check + [HttpGet] + [Route("isGroupAdmin/{id}")] + public ActionResult IsGroupAdmin(string username) + { + var result = _membershipService.IsGroupAdmin(username); + + return Ok(result); + } + } +} diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 848db5219..d8b99393a 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -1,2174 +1,2174 @@ - - - - Gordon360 - - - - - Get the username of the authenticated user - - The ClaimsPrincipal representing the user's authentication claims - Username of the authenticated user - - - Set emergency contacts for student - The contact data to be stored - The data stored - - - Sets the students cell phone number - The phone number object to be added to the database - The data stored - - - Sets the students race and ethinicity - The object containing the race numbers of the users - The data stored - - - Gets and returns the user's holds - The user's stored holds - - - Sets the user as having completed Academic Checkin - The HTTP status indicating whether the request was completed or not - - - Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in - The HTTP status indicating whether the request was completed and returns the check in status of the student - - - - Return a list of accounts matching some or all of searchString. - - The input to search for - All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameter. - - The firstname portion of the search - The lastname portion of the search - All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameters - We are searching through all the info of a user, then narrowing it down to get only what we want - - Which account types to search. Accepted values: "student", "alumni", "facstaff" - The first name to search for - The last name to search for - - - - - - - - - - All accounts meeting some or all of the parameter - - - Gets the activities taking place during a given session - The session identifier - A list of all activities that are active during the given session determined by the id parameter - Queries the database to find which activities are active during the session desired - - - Gets the different types of activities taking place during a given session - The session identifier - A list of all the different types of activities that are active during the given session determined by the id parameter - Queries the database to find the distinct activities type of activities that are active during the session desired - - - - Get the status (open or closed) of an activity for a given session - - The session code that we want to check the status for - - - - - - Get all the activities that have not yet been closed out for the current session - - - - - - Get all the activities that have not yet been closed out for the current session for - which a given user is the group admin - - The id of the user who is group admin - - - - - Get all the activities that are already closed out for the current session - - - - - - Get all the activities that are already closed out for the current session for - which a given user is group admin - - The id of the user who is group admin - - - - - - The code of the activity to update - The updated involvement details - - - - - Set an image for the activity - - The activity code - The image file - - - - - Reset the activity Image - - The activity code - - - - Update an existing activity to be private or not - The id of the activity - the boolean value - Calls the server to make a call and update the database with the changed information - - - - Pulls all states available from Jenzabar States Table - - - - - - Pulls all Countries available from Jenzabar Countries Table - - - - - - Get all admins - - - A list of all admins - - - Server makes call to the database and returns all admins - - - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - - Create a new admin to be added to database - The admin item containing all required and relevant information - - Posts a new admin to the server to be added into the database - - - Delete an existing admin - The identifier for the admin to be deleted - Calls the server to make a call and remove the given admin from the database - - - - Return a list majors. - - All majors - - - - Return a list minors. - - All minors - - - - Return a list minors. - - All minors - - - - Return a list states. - - All states - - - - Return a list countries. - - All countries - - - - Return a list departments. - - All departments - - - - Return a list buildings. - - All buildings - - - Get all the slider content for the dashboard slider - A list of all the slides for the slider - Queries the database for all entries in slider table - - - Get all the banner slides for the dashboard banner - A list of all the slides for the banner - - - Post a new slide for the dashboard banner - The posted banner - - - Remove a slide from the dashboard banner - ID of the slide to remove - - - - Gets information about student's dining plan and balance - - A DiningInfo object - - - - This makes use of our cached request to 25Live, which stores AllEvents - - - - - - Delete an application (and consequently all rows that reference it) - - The id of the application to remove - - - - - Get a list of the apartment-style halls - - - - - - Get apartment application ID number of currently logged in user if that user is on an existing application - - - - - - Get apartment application ID number for a user if that user is on an existing application - - username of the profile info - - - - - save application - - Returns the application ID number if all the queries succeeded - - - - update existing application (Differentiated by HttpPut instead of HttpPost) - - Returns the application ID number if all the queries succeeded - - - - change the editor (i.e. primary applicant) of the application - - The result of changing the editor - - - - change the date an application was submitted - (changes it from null the first time they submit) - - The result of changing the date submitted - - - Get apartment application info for a given application ID number - application ID number of the apartment application - Object of type ApartmentAppViewModel - - - Get apartment application info for all applications if the current user is a housing admin - Object of type ApartmentApplicationViewModel - - - - Get a user's active jobs - - The datetime that the shift started - The datetime that the shift ended - The user's active jobs - - - - Get a user's saved shifts - - The user's saved shifts - - - - Get a user's active jobs - - - The result of saving a shift - - - - Edit a shift - The details that will be changed - - - - - Get a user's active jobs - - The result of deleting the shift - - - - Submit shifts - - The result of submitting the shifts - - - - Gets the name of a supervisor based on their ID number - - The name of the supervisor - - - - sends the current clock in status to the back end - true if user is clocked in and false if clocked out - - detail to be saved in the back end, true if user just clocked in - returns confirmation that the answer was recorded - - - - gets the the clock in status from the back end - true if user is clocked in and false if clocked out - - ClockInViewModel - - - - deletes the last clocked in status of a user - - returns confirmation that clock in status was deleted - - - Create a new error log item to be added to database - The error message containing all required and relevant information - - Posts a new message to the service to be added into the database - - - Create a new error log item to be added to database - The error log containing the ERROR_TIME, and the LOG_MESSAGE - - Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - - Get all the memberships associated with a given activity - - The activity ID - Optional code of session to get for - IHttpActionResult - - - - Gets the group admin memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the leader-type memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the advisor-type memberships associated with a given activity. - - The activity ID. - A list of all advisor-type memberships for the specified activity. - - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - - - - Gets the number of followers of an activity - - The activity ID. - The session code - The number of followers of the activity - - - - Gets the number of members (excluding followers) of an activity - - The activity ID. - The session code - The number of members of the activity - - - Create a new membership item to be added to database - The membership item containing all required and relevant information - - Posts a new membership to the server to be added into the database - - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - - - Update an existing membership item - The membership id of whichever one is to be changed - The content within the membership that is to be changed and what it will change to - Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of - - - Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed - Calls the server to make a call and update the database with the changed information - - - Update an existing membership item to be private or not - The membership to toggle privacy on - Calls the server to make a call and update the database with the changed information - - - Delete an existing membership - The identifier for the membership to be deleted - Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check - - - - Gets all custom events for a user - - A IEnumerable of custom events - - - - Gets specific custom event for a user - - The requested custom event - - - - Gets all myschedule objects for a user - - A IEnumerable of myschedule objects - - - Create a new myschedule to be added to database - The myschedule item containing all required and relevant information - Created schedule - Posts a new myschedule to the server to be added into the database - - - Delete an existing myschedule item - The identifier for the myschedule to be deleted - Calls the server to make a call and remove the given myschedule from the database - - - Update the existing myschedule in database - The updated myschedule item containing all required and relevant information - Original schedule - Put a myschedule to the server to be updated - - - Gets a news item by id from the database - The id of the news item to retrieve - The news item - - - Gets the base64 image data for an image corresponding - to a student news item. Only used by GO; when we move student news approval - to 360, this will be removed. - The id of the news item to retrieve image from - base64 string representing image - - - Call the service that gets all approved student news entries not yet expired, filtering - out the expired by comparing 2 weeks past date entered to current date - - - Call the service that gets all new and approved student news entries - which have not already expired, - checking novelty by comparing an entry's date entered to 10am on the previous day - - - Call the service that gets the list of categories - - - Call the service that gets all unapproved student news entries (by a particular user) - not yet expired, filtering out the expired news - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Create a new news item to be added to the database - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Deletes a news item from the database - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Controller) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item - The news item must be authored by the user and must not be expired and must be unapproved - - - Get profile info of currently logged in user - - - - Get public profile info for a user - username of the profile info - - - - Get the advisor(s) of a particular student - - All advisors of the given student. For each advisor, - provides first name, last name, and username. - - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Toggle privacy of the current user's Clifton Strengths - New privacy value - - - Gets the emergency contact information of a particular user - The username for which to retrieve info - Emergency contact information of the given user. - - - Gets the mailbox information of currently logged in user - - - - Gets the date of birth of the current logged-in user - - - - Get the profile image of currently logged in user - - - - Get the profile image of the given user - The profile image(s) that the authenticated user is allowed to see, if any - - - - Set an image for profile - - - - - - Set an IDimage for a user - - - - - - Reset the profile Image - - - - - - Update the profile social media links - - The type of social media - The path of the links - - - - - Update mobile phone number - - phoneNumber - - - - - Update privacy of mobile phone number - - Y or N - - - - - Update privacy of profile image - - Y or N - - - - - Posts fields into CCT.dbo.Information_Change_Request - Sends Alumni Profile Update Email to "devrequest@gordon.edu" - - Object with Field's Name and Field's Value, unused Field's Label - - - - - Gets the profile image at the given path or, if that file does not exist, the 360 default profile image - - - Note that the 360 default profile image is different from a user's default image. - A given user's default image is simply their approved ID photo. - The 360 default profile image, on the other hand, is a stock image of Scottie Lion. - Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. - - Path to the profile image to load - - - - - Gets all Membership Request Objects - - List of all requests for membership - - - - Gets a specific Membership Request Object - - The ID of the membership request - A memberships request with the specified id - - - - Gets the memberships requests for the specified activity - - The activity code - All membership requests associated with the activity - - - - Gets the memberships requests for the person making the request - - All membership requests associated with the student - - - - Creates a new membership request - - The request to be added - The added request if successful. HTTP error message if not. - - - - Updates a membership request - - The membership request id - The updated membership request object - The updated request if successful. HTTP error message if not. - - - - Sets a membership request to Approved - - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. - - - - Deletes a membership request - - The id of the membership request to delete - The deleted object - - - - Gets all upcoming ride objects - - A IEnumerable of rides objects - - - - Gets all upcoming ride objects for a user - - A IEnumerable of rides objects - - - - Create new ride object for a user - - Successfully posted ride object - - - Cancel an existing ride item - The identifier for the ride to be cancel - Calls the server to make a call and remove the given ride from the database - - - Delete an existing ride item - The identifier for the ride to be deleted - Calls the server to make a call and remove the given ride from the database - - - - Create new booking object for a user - - Successfully posted booking object - - - Delete an existing booking item - The identifier for the booking to be deleted - Calls the server to make a call and remove the given booking from the database - - - - Get schedule information of logged in user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO: Use Service Layer - - - - - - Get schedule information of specific user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO Use Service Layer - - username - - - - - Update privacy of schedule - - Y or N - - - - - Update schedule description - - New description - - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Get whether the currently logged-in user can read student schedules - - Whether they can read student schedules - - - Get a list of all sessions - All sessions within the database - Queries the database for all sessions, current and past - - - Get one specific session specified by the id in the URL string - The identifier for one specific session - The information about one specific session - Queries the database regarding a specific session with the given identifier - - - - Gets the current active session - - - - - - Gets the days left in the current session - - - - - - Gets student employment information about the user - - A Student Employment Json - - - - Get the short git SHA-1 and build date for the backend - - "Git Hash: {hashCode}; Build Time: {date and time}" - - - - - Gets current victory promise scores - - A VP Json - - - - Enum representing three possible wellness statuses. - GREEN - Healthy, no known contact/symptoms - YELLOW - Symptomatic or cautionary hold - RED - Quarantine/Isolation - - - - - Gets wellness status of current user - - A WellnessViewModel representing the most recent status of the user - - - - Gets question for wellness check from the back end - - A WellnessQuestionViewModel - - - - Stores the user's wellness status - - The current status of the user to post, of type WellnessStatusColor - The status that was stored in the database - - - - Whether the user wants their strengths to be private (not shown to other users) - - - - - Gordon ID Number - - - - - a job's unique id number - - - - - Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of the match, followed by the matched field. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The search input to match against - The match key if search matched a field, or null - - - - Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The first name of the search input to match against - The last name of the search input to match against - The match key if first and last name both matched a field, or null - - - - Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. - - - - - Stores the emergency contact information of a particular user - The object that stores the contact info - The students id number - The stored data - - - - Create the notes value for the database to be passed in with the rest of the data. - The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international - - The mobile phone of the contact - The home phone of the contact - The formatted notes parameter to be passed to the database - - - Stores the cellphone preferences for the current user - The phone number object for the user - The id of the student to be updated - The stored data - - - Stores the demographic data (race and ethnicity) of the current user - The race and ethnicity data for the user - The id of the user to be updated - The stored data - - - Gets the holds of the user with the given ID - The id of the user whose holds are to be found - The stored data - - - Sets the user as having been checked in - The id of the user who is to be marked as checked in - - - Gets the whether the user has completed Academic Checkin - The id of the user for which the data is to be found for - - - Formats a phone number for insertion into the database - The phone number to be formatted - The formatted number - - - - Service Class that facilitates data transactions between the AccountsController and the Account database model. - - - - - Fetches a single account record whose id matches the id provided as an argument - - The person's gordon id - AccountViewModel if found, null if not found - - - - Fetches all the account records from storage. - - AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the account id number - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the first account object which matches the email - - - - Fetches the account record with the specified username. - - The AD username associated with the account. - the student account information - - - - Get basic info for all accounts - - BasicInfoViewModel of all accounts - - - - Get basic info for all accounts except alumni - - BasicInfoViewModel of all accounts except alumni - - - - Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. - ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) - Activity Info and ACtivity may be talked about interchangeably. - - - - - Fetches a single activity record whose id matches the id provided as an argument - - The activity code - ActivityViewModel if found, null if not found - - - - Fetches the Activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the Activity types of activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches all activity records from storage. - - ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Checks to see if a specified activity is still open for this session - Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table - When an activity is closed out, the END_DTE is set to the date on which the closing happened - Otherwise, the END_DTE for all memberships of the activity will be null for that session - - The activity code for the activity in question - Code of the session to check - - - - - Gets a collection of all the current open activities, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current activities already closed out, by finding which activities have - memberships with an END_DTE that is not null - - The collection of activity codes for open activities - - - - Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is not null - - The user's id - The session we want to get the closed activities for - The collection of activity codes for open activities - - - - Updates the Activity Info - - The activity info resource with the updated information - The id of the activity info to be updated - The updated activity info resource - - - - Closes out a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Open a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Updates the image for the spcefied involvement - - The involvement to update the image of - The new image - The involvement with the updated image path - - - - Reset the path for the activity image - - The activity code - - - - change activty privacy - - The activity code - activity private or not - - - - Service class to facilitate interacting with the Admin table. - - - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - - - Fetches the admin resource whose username matches the specified argument - - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. - - - - Fetches all the administrators from the database - - Returns a list of administrators. If no administrators were found, an empty list is returned. - - - - Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateAdmin() method. - - The admin to be added - The newly added Admin object - - - - Delete the admin whose id is specified by the parameter. - - The admin id - The admin that was just deleted - - - - Helper method to Validate an admin - - The admin to validate - True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - - - - Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. - - - - - Fetches the dashboard slider content from the database. - - If found, returns a set of SliderViewModel's, based on each slide entry in the db. - If not returns an empty IEnumerable. - - - - Retrieve all banner slides from the database - - An IEnumerable of the slides in the database - - - - Inserts a banner slide in the database and uploads the image to the local slider folder - - The slide to add - The url of the server that the image is being posted to. - This is needed to save the image path into the database. The URL is different depending on where the API is running. - The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. - - The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. - The inserted slide - - - - Deletes a banner slide from the database and deletes the local image file - - The deleted slide - - - - Service that allows for meal control - - - - - - - - - - - - - Get information about the selected plan for the student user - - Student's Gordon ID - Current Session Code - - - - - Service class to facilitate getting emails for members of an activity. - - - - - Get a list of the emails for all members in the activity during the current session. - - The code of the activity to get emails for. - Optionally, the session to get emails for. Defaults to the current session - The participation type to get emails of. If unspecified, gets emails of all participation types. - A list of emails (along with first and last name) associated with that activity - - - - Send a email to a list of email addresses - - All addresses to send this email to - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Send a email to members of an activity - - The activity code to send this email to - The session of activity to select members from - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. - - - - - Adds a new error log to storage. - - The error log to be added - The newly added error_log object - - - - Adds a new error log to storage, after creating the timestamp. - - The error message for the error log to be added - The newly added error_log object - - - - Service that allows for event control - - - - URL to retrieve events from the 25Live API. - event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). - All other event types are not appropiate for the 360 events feed. - end_after parameter limits the request to events from the current academic year. - state parameter fetches only confirmed events - - - - Access the memory stream created by the cached task and parse it into events - Splits events with multiple repeated occurrences into individual records for each occurrence - - All events for the current academic year. - - - - Select only events that are marked for Public promotion - - All Public Events - - - - Select only events that are Approved to give CLAW credit - - All CLAW Events - - - - Returns all attended events for a student in a specific term - - The student's AD Username - The current term - - - - - Helper function to determine the current academic year - - - - - - Calls a stored procedure that returns a row in the staff whitelist which has the given user id, - if it is in the whitelist - - The id of the person using the page - Whether or not the user is on the staff whitelist - - - - Deletes the application with given id, - removing all rows that reference it. - - The id of the application to delete - Whether or not this was successful - - - - Gets all names of apartment halls - - AN array of hall names - - - - Calls a stored procedure that tries to get the id of an the application that a given user is - applicant on for a given session - - The student username to look for - Session for which the application would be - - The id of the application or - null if the user is not on an application for that session - - - - - Get the editor ID of a given application ID - - The application ID for which the editor ID would be - - The id of the editor or - null if the user is a member but not an editor of a given application - - - - - Saves student housing info - - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp - - second, it retrieves the application id of the application with the information we just inserted (because - the database creates the application ID so we have to ask it which number it generated for it) - - third, it inserts each applicant into the applicants table along with the application ID so we know - which application on which they are an applicant - - - The current session code - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Edit an existings apartment application - - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username - - second, it gets an array of the applicants that are already stored in the database for the given application ID - - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database - - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array - - - The student username of the user who is attempting to save the apartment application (retrieved via authentication token) - The current session code - The application ID number of the application to be edited - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Changes the student user who has permission to edit the given application - - - Whether or not all the queries succeeded - - - application ID number of the apartment application - boolean indicating whether the current user is an admin, permits access to restricted information such as birth date - Apartment Application formatted for display in the UI - - - Array of ApartmentApplicationViewModels - - - - "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked - - The application ID number of the application to be submitted - Returns whether the query succeeded - - - - Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. - - - - - Service class to facilitate data transactions between the MembershipRequestController and the database - - - - - Generate a new request to join an activity at a participation level higher than 'Guest' - - The membership request object - The membership request object once it is added - - - - Approves the request with the specified ID. - - The ID of the request to be approved - The approved membership - - - - Delete the membershipRequest object whose id is given in the parameters - - The membership request id - A copy of the deleted membership request - - - - Denies the membership request object whose id is given in the parameters - - The membership request id - - - - - Get the membership request object whose Id is specified in the parameters. - - The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. - - - - Fetches all the membership request objects from the database. - - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this activity - - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this student - - The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Update an existing membership request object - - The membership request id - The newly modified membership request - - - - - Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - - - - - Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateMembership() method. - - The membership to be added - The newly added Membership object - - - - Delete the membership whose id is specified by the parameter. - - The membership id - The membership that was just deleted - - - - Fetch the membership whose id is specified by the parameter - - The membership id - MembershipViewModel if found, null if not found - - - - Fetches the memberships associated with the activity whose code is specified by the parameter. - - The activity code. - Optional code of session to get memberships for - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the leaders of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the advisors of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches all the membership information linked to the student whose id appears as a parameter. - - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int. - - - - Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int - - - - Updates the membership whose id is given as the first parameter to the contents of the second parameter. - - The updated membership. - The newly modified membership. - - - - Switches the group-admin property of the person whose membership id is given - - The corresponding membership object - The newly modified membership. - - - - Switches the privacy property of the person whose membership id is given - - The membership object passed. - The newly modified membership. - - - - Helper method to Validate a membership - - The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Determines whether or not the given user is a Group Admin of some activity - - Username of the user to check - true if student is a Group Admin, else false - - - - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. - - - - - Fetch the myschedule item whose id is specified by the parameter - - The myschedule id - AD Username - Myschedule if found, null if not found - - - - Fetch all myschedule items belonging to the given user - - The AD Username - Array of Myschedule if found, null if not found - - - - Adds a new mySchedule record to storage. - - The membership to be added - The newly added custom event - - - - Delete the myschedule whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Update the myschedule item. - - The schedule information - The original schedule - - - - Gets a news item entity by id - NOTE: Also a helper method, hence why it returns a StudentNews model - rather than a StudentNewsViewModel - must be casted as the latter in its own - controller - - The SNID (id of news item) - The news item - - - - Gets unapproved unexpired news submitted by user. - - username - Result of query - - - - Adds a news item record to storage. - - The news item to be added - username - The newly added Membership object - - - - (Service) Deletes a news item from the database - - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Service) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item's view model - The news item must be authored by the user and must not be expired and must be unapproved - - - - Helper method to verify that a given news item has not yet been approved - - The news item to verify - true if unapproved, otherwise throws some kind of meaningful exception - - - - Helper method to verify that a given news item has not expired - (see documentation for expiration definition) - - The news item to verify - true if unexpired, otherwise throws some kind of meaningful exception - - - - Helper method to validate a news item - - The news item to validate - True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Verifies that a student account exists - - The AD Username of the student - true if account exists, ResourceNotFoundException if null - - - - get student profile info - - username - StudentProfileViewModel if found, null if not found - - - - get faculty staff profile info - - username - FacultyStaffProfileViewModel if found, null if not found - - - - get alumni profile info - - username - AlumniProfileViewModel if found, null if not found - - - - get mailbox combination - - The current user's username - MailboxViewModel with the combination - - - - get a user's birthday - - The username of the person to get the birthdate of - Date the user's date of birth - - - - get advisors for particular student - - AD username - - - - Gets the clifton strengths of a particular user - The id of the user for which to retrieve info - Clifton strengths of the given user. - - - - Toggles the privacy of the Clifton Strengths data associated with the given id - - ID of the user whose Clifton Strengths privacy is toggled - The new privacy value - Thrown when the given ID doesn't match any Clifton Strengths rows - - - Gets the emergency contact information of a particular user - The username of the user for which to retrieve info - Emergency contact information of the given user. - - - - Get photo path for profile - - AD username - PhotoPathViewModel if found, null if not found - - - - Fetches a single profile whose username matches the username provided as an argument - - The username - ProfileViewModel if found, null if not found - - - - Sets the path for the profile image. - - AD Username - - - - - - Sets the path for the profile links. - - The username - - - - - - privacy setting of mobile phone. - - AD Username - Y or N - - - - mobile phone number setting - - The username for the user whose phone is to be updated - The new number to update the user's phone number to - - - - privacy setting user profile photo. - - AD Username - Y or N - - - - Fetch all upcoming ride items - - IEnumerable of ride items if found, null if not found - - - - Fetch the ride items a user is part of - - The ride id - ride items if found, null if not found - - - - Adds a new ride record to storage. - - The Save_Rides object to be added - The gordon_id of the user creating the ride - The newly added custom event - - - - Delete the ride whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Cancel the ride whose id is specified by the parameter. - - The ride id - The gordon id - The ride that was just deleted - - - - Adds a new booking record to storage. - - The Save_Bookings object to be added - The newly added custom event - - - - Delete the booking whose ids are specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. - - - - - privacy setting of schedule. - - AD Username - Y or N - - - - description of schedule. - - AD Username - New description - - - - Update timestamp of modification in schedule. - - AD Username - Modified Time - - - - Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. - - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the student - StudentScheduleViewModel if found, null if not found - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the instructor - StudentScheduleViewModel if found, null if not found - - - - Service class to facilitate data transactions between the Controller and the database model. - - - - - Get the session record whose sesssion code matches the parameter. - - The session code. - A SessionViewModel if found, null if not found. - - - - Fetches all the session records from the database. - - A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - get Student Employment records of given user - - AD Username of user to get employment - VictoryPromiseViewModel if found, null if not found - - - - get victory promise scores - - id - VictoryPromiseViewModel if found, null if not found - - - - Get the status of the user by id - - AD Username of the user to get the status of - The status of the user, a WellnessViewModel - - - - Stores wellness Status in database. - - AD Username of the user to post the status for - Status that is being posted, one of the WellnessStatusColors - Status that was successfully recorded - - - - gets the question for the wellness check from the back end - - A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. - - - - Creates an expiration date for a check in at the current time - - The time of the check in - When the check in should expire (the next 5AM). - - - - Service class for methods that are shared between all services. - - - - - Helper method that gets the current session we are in. - - The session code of the current session - - - - Deletes an image from the filesystem, if there is one. - - The path to which the image belonged. - - - - Takes an image path and returns the data of the image at that path. - If given path is null it returns an empty string. - - The path to the image - The base64 data of the image - - - - Uploads a news image - - - Takes base64 image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The base64 image data to be stored - The format to save the image as. Defaults to Jpeg - - - - Uploads image from HTTP FormFile - - - Takes image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The image data to be stored - - - - Takes a filepath for an image, navigates to it, collects the raw data - of the file and converts it to base64 format. - - The path to the image - The base64 content of the image - - - + + + + Gordon360 + + + + + Get the username of the authenticated user + + The ClaimsPrincipal representing the user's authentication claims + Username of the authenticated user + + + Set emergency contacts for student + The contact data to be stored + The data stored + + + Sets the students cell phone number + The phone number object to be added to the database + The data stored + + + Sets the students race and ethinicity + The object containing the race numbers of the users + The data stored + + + Gets and returns the user's holds + The user's stored holds + + + Sets the user as having completed Academic Checkin + The HTTP status indicating whether the request was completed or not + + + Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in + The HTTP status indicating whether the request was completed and returns the check in status of the student + + + + Return a list of accounts matching some or all of searchString. + + The input to search for + All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameter. + + The firstname portion of the search + The lastname portion of the search + All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameters + We are searching through all the info of a user, then narrowing it down to get only what we want + + Which account types to search. Accepted values: "student", "alumni", "facstaff" + The first name to search for + The last name to search for + + + + + + + + + + All accounts meeting some or all of the parameter + + + Gets the activities taking place during a given session + The session identifier + A list of all activities that are active during the given session determined by the id parameter + Queries the database to find which activities are active during the session desired + + + Gets the different types of activities taking place during a given session + The session identifier + A list of all the different types of activities that are active during the given session determined by the id parameter + Queries the database to find the distinct activities type of activities that are active during the session desired + + + + Get the status (open or closed) of an activity for a given session + + The session code that we want to check the status for + + + + + + Get all the activities that have not yet been closed out for the current session + + + + + + Get all the activities that have not yet been closed out for the current session for + which a given user is the group admin + + The id of the user who is group admin + + + + + Get all the activities that are already closed out for the current session + + + + + + Get all the activities that are already closed out for the current session for + which a given user is group admin + + The id of the user who is group admin + + + + + + The code of the activity to update + The updated involvement details + + + + + Set an image for the activity + + The activity code + The image file + + + + + Reset the activity Image + + The activity code + + + + Update an existing activity to be private or not + The id of the activity + the boolean value + Calls the server to make a call and update the database with the changed information + + + + Pulls all states available from Jenzabar States Table + + + + + + Pulls all Countries available from Jenzabar Countries Table + + + + + + Get all admins + + + A list of all admins + + + Server makes call to the database and returns all admins + + + + + Get a specific admin + + + The specific admin + + + Server makes call to the database and returns the specific admin + + + + Create a new admin to be added to database + The admin item containing all required and relevant information + + Posts a new admin to the server to be added into the database + + + Delete an existing admin + The identifier for the admin to be deleted + Calls the server to make a call and remove the given admin from the database + + + + Return a list majors. + + All majors + + + + Return a list minors. + + All minors + + + + Return a list minors. + + All minors + + + + Return a list states. + + All states + + + + Return a list countries. + + All countries + + + + Return a list departments. + + All departments + + + + Return a list buildings. + + All buildings + + + Get all the slider content for the dashboard slider + A list of all the slides for the slider + Queries the database for all entries in slider table + + + Get all the banner slides for the dashboard banner + A list of all the slides for the banner + + + Post a new slide for the dashboard banner + The posted banner + + + Remove a slide from the dashboard banner + ID of the slide to remove + + + + Gets information about student's dining plan and balance + + A DiningInfo object + + + + This makes use of our cached request to 25Live, which stores AllEvents + + + + + + Delete an application (and consequently all rows that reference it) + + The id of the application to remove + + + + + Get a list of the apartment-style halls + + + + + + Get apartment application ID number of currently logged in user if that user is on an existing application + + + + + + Get apartment application ID number for a user if that user is on an existing application + + username of the profile info + + + + + save application + + Returns the application ID number if all the queries succeeded + + + + update existing application (Differentiated by HttpPut instead of HttpPost) + + Returns the application ID number if all the queries succeeded + + + + change the editor (i.e. primary applicant) of the application + + The result of changing the editor + + + + change the date an application was submitted + (changes it from null the first time they submit) + + The result of changing the date submitted + + + Get apartment application info for a given application ID number + application ID number of the apartment application + Object of type ApartmentAppViewModel + + + Get apartment application info for all applications if the current user is a housing admin + Object of type ApartmentApplicationViewModel + + + + Get a user's active jobs + + The datetime that the shift started + The datetime that the shift ended + The user's active jobs + + + + Get a user's saved shifts + + The user's saved shifts + + + + Get a user's active jobs + + + The result of saving a shift + + + + Edit a shift + The details that will be changed + + + + + Get a user's active jobs + + The result of deleting the shift + + + + Submit shifts + + The result of submitting the shifts + + + + Gets the name of a supervisor based on their ID number + + The name of the supervisor + + + + sends the current clock in status to the back end + true if user is clocked in and false if clocked out + + detail to be saved in the back end, true if user just clocked in + returns confirmation that the answer was recorded + + + + gets the the clock in status from the back end + true if user is clocked in and false if clocked out + + ClockInViewModel + + + + deletes the last clocked in status of a user + + returns confirmation that clock in status was deleted + + + Create a new error log item to be added to database + The error message containing all required and relevant information + + Posts a new message to the service to be added into the database + + + Create a new error log item to be added to database + The error log containing the ERROR_TIME, and the LOG_MESSAGE + + Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy + + + + Get all the memberships associated with a given activity + + The activity ID + Optional code of session to get for + IHttpActionResult + + + + Gets the group admin memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the leader-type memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the advisor-type memberships associated with a given activity. + + The activity ID. + A list of all advisor-type memberships for the specified activity. + + + + Gets the number of followers of an activity + + The activity ID. + The number of followers of the activity + + + + Gets the number of members (besides followers) of an activity + + The activity ID. + The number of members of the activity + + + + Gets the number of followers of an activity + + The activity ID. + The session code + The number of followers of the activity + + + + Gets the number of members (excluding followers) of an activity + + The activity ID. + The session code + The number of members of the activity + + + Create a new membership item to be added to database + The membership item containing all required and relevant information + + Posts a new membership to the server to be added into the database + + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + + + Update an existing membership item + The membership id of whichever one is to be changed + The content within the membership that is to be changed and what it will change to + Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of + + + Update an existing membership item to be a group admin or not + /// The content within the membership that is to be changed + Calls the server to make a call and update the database with the changed information + + + Update an existing membership item to be private or not + The membership to toggle privacy on + Calls the server to make a call and update the database with the changed information + + + Delete an existing membership + The identifier for the membership to be deleted + Calls the server to make a call and remove the given membership from the database + + + + Determines whether or not the given student is a Group Admin of some activity + + The account username to check + + + + Gets all custom events for a user + + A IEnumerable of custom events + + + + Gets specific custom event for a user + + The requested custom event + + + + Gets all myschedule objects for a user + + A IEnumerable of myschedule objects + + + Create a new myschedule to be added to database + The myschedule item containing all required and relevant information + Created schedule + Posts a new myschedule to the server to be added into the database + + + Delete an existing myschedule item + The identifier for the myschedule to be deleted + Calls the server to make a call and remove the given myschedule from the database + + + Update the existing myschedule in database + The updated myschedule item containing all required and relevant information + Original schedule + Put a myschedule to the server to be updated + + + Gets a news item by id from the database + The id of the news item to retrieve + The news item + + + Gets the base64 image data for an image corresponding + to a student news item. Only used by GO; when we move student news approval + to 360, this will be removed. + The id of the news item to retrieve image from + base64 string representing image + + + Call the service that gets all approved student news entries not yet expired, filtering + out the expired by comparing 2 weeks past date entered to current date + + + Call the service that gets all new and approved student news entries + which have not already expired, + checking novelty by comparing an entry's date entered to 10am on the previous day + + + Call the service that gets the list of categories + + + Call the service that gets all unapproved student news entries (by a particular user) + not yet expired, filtering out the expired news + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Create a new news item to be added to the database + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Deletes a news item from the database + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Controller) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item + The news item must be authored by the user and must not be expired and must be unapproved + + + Get profile info of currently logged in user + + + + Get public profile info for a user + username of the profile info + + + + Get the advisor(s) of a particular student + + All advisors of the given student. For each advisor, + provides first name, last name, and username. + + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Toggle privacy of the current user's Clifton Strengths + New privacy value + + + Gets the emergency contact information of a particular user + The username for which to retrieve info + Emergency contact information of the given user. + + + Gets the mailbox information of currently logged in user + + + + Gets the date of birth of the current logged-in user + + + + Get the profile image of currently logged in user + + + + Get the profile image of the given user + The profile image(s) that the authenticated user is allowed to see, if any + + + + Set an image for profile + + + + + + Set an IDimage for a user + + + + + + Reset the profile Image + + + + + + Update the profile social media links + + The type of social media + The path of the links + + + + + Update mobile phone number + + phoneNumber + + + + + Update privacy of mobile phone number + + Y or N + + + + + Update privacy of profile image + + Y or N + + + + + Posts fields into CCT.dbo.Information_Change_Request + Sends Alumni Profile Update Email to "devrequest@gordon.edu" + + Object with Field's Name and Field's Value, unused Field's Label + + + + + Gets the profile image at the given path or, if that file does not exist, the 360 default profile image + + + Note that the 360 default profile image is different from a user's default image. + A given user's default image is simply their approved ID photo. + The 360 default profile image, on the other hand, is a stock image of Scottie Lion. + Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. + + Path to the profile image to load + + + + + Gets all Membership Request Objects + + List of all requests for membership + + + + Gets a specific Membership Request Object + + The ID of the membership request + A memberships request with the specified id + + + + Gets the memberships requests for the specified activity + + The activity code + All membership requests associated with the activity + + + + Gets the memberships requests for the person making the request + + All membership requests associated with the student + + + + Creates a new membership request + + The request to be added + The added request if successful. HTTP error message if not. + + + + Updates a membership request + + The membership request id + The updated membership request object + The updated request if successful. HTTP error message if not. + + + + Sets a membership request to Approved + + The id of the membership request in question. + If successful: THe updated membership request wrapped in an OK Http status code. + + + + Sets the membership request to Denied + + The id of the membership request in question. + If successful: The updated membership request wrapped in an OK Http status code. + + + + Deletes a membership request + + The id of the membership request to delete + The deleted object + + + + Gets all upcoming ride objects + + A IEnumerable of rides objects + + + + Gets all upcoming ride objects for a user + + A IEnumerable of rides objects + + + + Create new ride object for a user + + Successfully posted ride object + + + Cancel an existing ride item + The identifier for the ride to be cancel + Calls the server to make a call and remove the given ride from the database + + + Delete an existing ride item + The identifier for the ride to be deleted + Calls the server to make a call and remove the given ride from the database + + + + Create new booking object for a user + + Successfully posted booking object + + + Delete an existing booking item + The identifier for the booking to be deleted + Calls the server to make a call and remove the given booking from the database + + + + Get schedule information of logged in user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO: Use Service Layer + + + + + + Get schedule information of specific user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO Use Service Layer + + username + + + + + Update privacy of schedule + + Y or N + + + + + Update schedule description + + New description + + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Get whether the currently logged-in user can read student schedules + + Whether they can read student schedules + + + Get a list of all sessions + All sessions within the database + Queries the database for all sessions, current and past + + + Get one specific session specified by the id in the URL string + The identifier for one specific session + The information about one specific session + Queries the database regarding a specific session with the given identifier + + + + Gets the current active session + + + + + + Gets the days left in the current session + + + + + + Gets student employment information about the user + + A Student Employment Json + + + + Get the short git SHA-1 and build date for the backend + + "Git Hash: {hashCode}; Build Time: {date and time}" + + + + + Gets current victory promise scores + + A VP Json + + + + Enum representing three possible wellness statuses. + GREEN - Healthy, no known contact/symptoms + YELLOW - Symptomatic or cautionary hold + RED - Quarantine/Isolation + + + + + Gets wellness status of current user + + A WellnessViewModel representing the most recent status of the user + + + + Gets question for wellness check from the back end + + A WellnessQuestionViewModel + + + + Stores the user's wellness status + + The current status of the user to post, of type WellnessStatusColor + The status that was stored in the database + + + + Whether the user wants their strengths to be private (not shown to other users) + + + + + Gordon ID Number + + + + + a job's unique id number + + + + + Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of the match, followed by the matched field. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The search input to match against + The match key if search matched a field, or null + + + + Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The first name of the search input to match against + The last name of the search input to match against + The match key if first and last name both matched a field, or null + + + + Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. + + + + + Stores the emergency contact information of a particular user + The object that stores the contact info + The students id number + The stored data + + + + Create the notes value for the database to be passed in with the rest of the data. + The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international + + The mobile phone of the contact + The home phone of the contact + The formatted notes parameter to be passed to the database + + + Stores the cellphone preferences for the current user + The phone number object for the user + The id of the student to be updated + The stored data + + + Stores the demographic data (race and ethnicity) of the current user + The race and ethnicity data for the user + The id of the user to be updated + The stored data + + + Gets the holds of the user with the given ID + The id of the user whose holds are to be found + The stored data + + + Sets the user as having been checked in + The id of the user who is to be marked as checked in + + + Gets the whether the user has completed Academic Checkin + The id of the user for which the data is to be found for + + + Formats a phone number for insertion into the database + The phone number to be formatted + The formatted number + + + + Service Class that facilitates data transactions between the AccountsController and the Account database model. + + + + + Fetches a single account record whose id matches the id provided as an argument + + The person's gordon id + AccountViewModel if found, null if not found + + + + Fetches all the account records from storage. + + AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the account id number + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the first account object which matches the email + + + + Fetches the account record with the specified username. + + The AD username associated with the account. + the student account information + + + + Get basic info for all accounts + + BasicInfoViewModel of all accounts + + + + Get basic info for all accounts except alumni + + BasicInfoViewModel of all accounts except alumni + + + + Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. + ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) + Activity Info and ACtivity may be talked about interchangeably. + + + + + Fetches a single activity record whose id matches the id provided as an argument + + The activity code + ActivityViewModel if found, null if not found + + + + Fetches the Activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the Activity types of activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches all activity records from storage. + + ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Checks to see if a specified activity is still open for this session + Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table + When an activity is closed out, the END_DTE is set to the date on which the closing happened + Otherwise, the END_DTE for all memberships of the activity will be null for that session + + The activity code for the activity in question + Code of the session to check + + + + + Gets a collection of all the current open activities, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current activities already closed out, by finding which activities have + memberships with an END_DTE that is not null + + The collection of activity codes for open activities + + + + Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is not null + + The user's id + The session we want to get the closed activities for + The collection of activity codes for open activities + + + + Updates the Activity Info + + The activity info resource with the updated information + The id of the activity info to be updated + The updated activity info resource + + + + Closes out a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Open a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Updates the image for the spcefied involvement + + The involvement to update the image of + The new image + The involvement with the updated image path + + + + Reset the path for the activity image + + The activity code + + + + change activty privacy + + The activity code + activity private or not + + + + Service class to facilitate interacting with the Admin table. + + + + + Fetches the admin resource whose id is specified as an argument. + + The admin ID.l + The Specified administrator. If none was found, a null value is returned. + + + + Fetches the admin resource whose username matches the specified argument + + The administrator's gordon id + The Specified administrator. If none was found, a null value is returned. + + + + Fetches all the administrators from the database + + Returns a list of administrators. If no administrators were found, an empty list is returned. + + + + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateAdmin() method. + + The admin to be added + The newly added Admin object + + + + Delete the admin whose id is specified by the parameter. + + The admin id + The admin that was just deleted + + + + Helper method to Validate an admin + + The admin to validate + True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter + + + + Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. + + + + + Fetches the dashboard slider content from the database. + + If found, returns a set of SliderViewModel's, based on each slide entry in the db. + If not returns an empty IEnumerable. + + + + Retrieve all banner slides from the database + + An IEnumerable of the slides in the database + + + + Inserts a banner slide in the database and uploads the image to the local slider folder + + The slide to add + The url of the server that the image is being posted to. + This is needed to save the image path into the database. The URL is different depending on where the API is running. + The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. + + The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. + The inserted slide + + + + Deletes a banner slide from the database and deletes the local image file + + The deleted slide + + + + Service that allows for meal control + + + + + + + + + + + + + Get information about the selected plan for the student user + + Student's Gordon ID + Current Session Code + + + + + Service class to facilitate getting emails for members of an activity. + + + + + Get a list of the emails for all members in the activity during the current session. + + The code of the activity to get emails for. + Optionally, the session to get emails for. Defaults to the current session + The participation type to get emails of. If unspecified, gets emails of all participation types. + A list of emails (along with first and last name) associated with that activity + + + + Send a email to a list of email addresses + + All addresses to send this email to + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Send a email to members of an activity + + The activity code to send this email to + The session of activity to select members from + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. + + + + + Adds a new error log to storage. + + The error log to be added + The newly added error_log object + + + + Adds a new error log to storage, after creating the timestamp. + + The error message for the error log to be added + The newly added error_log object + + + + Service that allows for event control + + + + URL to retrieve events from the 25Live API. + event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). + All other event types are not appropiate for the 360 events feed. + end_after parameter limits the request to events from the current academic year. + state parameter fetches only confirmed events + + + + Access the memory stream created by the cached task and parse it into events + Splits events with multiple repeated occurrences into individual records for each occurrence + + All events for the current academic year. + + + + Select only events that are marked for Public promotion + + All Public Events + + + + Select only events that are Approved to give CLAW credit + + All CLAW Events + + + + Returns all attended events for a student in a specific term + + The student's AD Username + The current term + + + + + Helper function to determine the current academic year + + + + + + Calls a stored procedure that returns a row in the staff whitelist which has the given user id, + if it is in the whitelist + + The id of the person using the page + Whether or not the user is on the staff whitelist + + + + Deletes the application with given id, + removing all rows that reference it. + + The id of the application to delete + Whether or not this was successful + + + + Gets all names of apartment halls + + AN array of hall names + + + + Calls a stored procedure that tries to get the id of an the application that a given user is + applicant on for a given session + + The student username to look for + Session for which the application would be + + The id of the application or + null if the user is not on an application for that session + + + + + Get the editor ID of a given application ID + + The application ID for which the editor ID would be + + The id of the editor or + null if the user is a member but not an editor of a given application + + + + + Saves student housing info + - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp + - second, it retrieves the application id of the application with the information we just inserted (because + the database creates the application ID so we have to ask it which number it generated for it) + - third, it inserts each applicant into the applicants table along with the application ID so we know + which application on which they are an applicant + + + The current session code + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Edit an existings apartment application + - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username + - second, it gets an array of the applicants that are already stored in the database for the given application ID + - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database + - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array + + + The student username of the user who is attempting to save the apartment application (retrieved via authentication token) + The current session code + The application ID number of the application to be edited + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Changes the student user who has permission to edit the given application + + + Whether or not all the queries succeeded + + + application ID number of the apartment application + boolean indicating whether the current user is an admin, permits access to restricted information such as birth date + Apartment Application formatted for display in the UI + + + Array of ApartmentApplicationViewModels + + + + "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked + + The application ID number of the application to be submitted + Returns whether the query succeeded + + + + Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. + + + + + Service class to facilitate data transactions between the MembershipRequestController and the database + + + + + Generate a new request to join an activity at a participation level higher than 'Guest' + + The membership request object + The membership request object once it is added + + + + Approves the request with the specified ID. + + The ID of the request to be approved + The approved membership + + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + + + + Denies the membership request object whose id is given in the parameters + + The membership request id + + + + + Get the membership request object whose Id is specified in the parameters. + + The membership request id + If found, returns MembershipRequestViewModel. If not found, returns null. + + + + Fetches all the membership request objects from the database. + + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this activity + + The activity id + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this student + + The AD Username of the user + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Update an existing membership request object + + The membership request id + The newly modified membership request + + + + + Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + + + + + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateMembership() method. + + The membership to be added + The newly added Membership object + + + + Delete the membership whose id is specified by the parameter. + + The membership id + The membership that was just deleted + + + + Fetch the membership whose id is specified by the parameter + + The membership id + MembershipViewModel if found, null if not found + + + + Fetches the memberships associated with the activity whose code is specified by the parameter. + + The activity code. + Optional code of session to get memberships for + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the leaders of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the advisors of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches all the membership information linked to the student whose id appears as a parameter. + + The student's AD Username. + A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the number of followers associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of memberships associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int. + + + + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int + + + + Updates the membership whose id is given as the first parameter to the contents of the second parameter. + + The updated membership. + The newly modified membership. + + + + Switches the group-admin property of the person whose membership id is given + + The corresponding membership object + The newly modified membership. + + + + Switches the privacy property of the person whose membership id is given + + The membership object passed. + The newly modified membership. + + + + Helper method to Validate a membership + + The membership to validate + True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Determines whether or not the given user is a Group Admin of some activity + + Username of the user to check + true if student is a Group Admin, else false + + + + Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. + + + + + Fetch the myschedule item whose id is specified by the parameter + + The myschedule id + AD Username + Myschedule if found, null if not found + + + + Fetch all myschedule items belonging to the given user + + The AD Username + Array of Myschedule if found, null if not found + + + + Adds a new mySchedule record to storage. + + The membership to be added + The newly added custom event + + + + Delete the myschedule whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Update the myschedule item. + + The schedule information + The original schedule + + + + Gets a news item entity by id + NOTE: Also a helper method, hence why it returns a StudentNews model + rather than a StudentNewsViewModel - must be casted as the latter in its own + controller + + The SNID (id of news item) + The news item + + + + Gets unapproved unexpired news submitted by user. + + username + Result of query + + + + Adds a news item record to storage. + + The news item to be added + username + The newly added Membership object + + + + (Service) Deletes a news item from the database + + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Service) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item's view model + The news item must be authored by the user and must not be expired and must be unapproved + + + + Helper method to verify that a given news item has not yet been approved + + The news item to verify + true if unapproved, otherwise throws some kind of meaningful exception + + + + Helper method to verify that a given news item has not expired + (see documentation for expiration definition) + + The news item to verify + true if unexpired, otherwise throws some kind of meaningful exception + + + + Helper method to validate a news item + + The news item to validate + True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Verifies that a student account exists + + The AD Username of the student + true if account exists, ResourceNotFoundException if null + + + + get student profile info + + username + StudentProfileViewModel if found, null if not found + + + + get faculty staff profile info + + username + FacultyStaffProfileViewModel if found, null if not found + + + + get alumni profile info + + username + AlumniProfileViewModel if found, null if not found + + + + get mailbox combination + + The current user's username + MailboxViewModel with the combination + + + + get a user's birthday + + The username of the person to get the birthdate of + Date the user's date of birth + + + + get advisors for particular student + + AD username + + + + Gets the clifton strengths of a particular user + The id of the user for which to retrieve info + Clifton strengths of the given user. + + + + Toggles the privacy of the Clifton Strengths data associated with the given id + + ID of the user whose Clifton Strengths privacy is toggled + The new privacy value + Thrown when the given ID doesn't match any Clifton Strengths rows + + + Gets the emergency contact information of a particular user + The username of the user for which to retrieve info + Emergency contact information of the given user. + + + + Get photo path for profile + + AD username + PhotoPathViewModel if found, null if not found + + + + Fetches a single profile whose username matches the username provided as an argument + + The username + ProfileViewModel if found, null if not found + + + + Sets the path for the profile image. + + AD Username + + + + + + Sets the path for the profile links. + + The username + + + + + + privacy setting of mobile phone. + + AD Username + Y or N + + + + mobile phone number setting + + The username for the user whose phone is to be updated + The new number to update the user's phone number to + + + + privacy setting user profile photo. + + AD Username + Y or N + + + + Fetch all upcoming ride items + + IEnumerable of ride items if found, null if not found + + + + Fetch the ride items a user is part of + + The ride id + ride items if found, null if not found + + + + Adds a new ride record to storage. + + The Save_Rides object to be added + The gordon_id of the user creating the ride + The newly added custom event + + + + Delete the ride whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Cancel the ride whose id is specified by the parameter. + + The ride id + The gordon id + The ride that was just deleted + + + + Adds a new booking record to storage. + + The Save_Bookings object to be added + The newly added custom event + + + + Delete the booking whose ids are specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. + + + + + privacy setting of schedule. + + AD Username + Y or N + + + + description of schedule. + + AD Username + New description + + + + Update timestamp of modification in schedule. + + AD Username + Modified Time + + + + Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. + + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the student + StudentScheduleViewModel if found, null if not found + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the instructor + StudentScheduleViewModel if found, null if not found + + + + Service class to facilitate data transactions between the Controller and the database model. + + + + + Get the session record whose sesssion code matches the parameter. + + The session code. + A SessionViewModel if found, null if not found. + + + + Fetches all the session records from the database. + + A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + get Student Employment records of given user + + AD Username of user to get employment + VictoryPromiseViewModel if found, null if not found + + + + get victory promise scores + + id + VictoryPromiseViewModel if found, null if not found + + + + Get the status of the user by id + + AD Username of the user to get the status of + The status of the user, a WellnessViewModel + + + + Stores wellness Status in database. + + AD Username of the user to post the status for + Status that is being posted, one of the WellnessStatusColors + Status that was successfully recorded + + + + gets the question for the wellness check from the back end + + A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. + + + + Creates an expiration date for a check in at the current time + + The time of the check in + When the check in should expire (the next 5AM). + + + + Service class for methods that are shared between all services. + + + + + Helper method that gets the current session we are in. + + The session code of the current session + + + + Deletes an image from the filesystem, if there is one. + + The path to which the image belonged. + + + + Takes an image path and returns the data of the image at that path. + If given path is null it returns an empty string. + + The path to the image + The base64 data of the image + + + + Uploads a news image + + + Takes base64 image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The base64 image data to be stored + The format to save the image as. Defaults to Jpeg + + + + Uploads image from HTTP FormFile + + + Takes image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The image data to be stored + + + + Takes a filepath for an image, navigates to it, collects the raw data + of the file and converts it to base64 format. + + The path to the image + The base64 content of the image + + + From 94704fe815d2b778f2d0d57f1eac1b831ce31be9 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 10:19:51 -0400 Subject: [PATCH 12/49] Removing unused service method --- Gordon360/Documentation/Gordon360.xml | 4341 ++++++++--------- .../Models/CCT/Context/DbContextExtensions.cs | 9 + Gordon360/Services/AccountService.cs | 16 - Gordon360/Services/ServiceInterfaces.cs | 1 - 4 files changed, 2176 insertions(+), 2191 deletions(-) diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index d8b99393a..c06336c69 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -1,2174 +1,2167 @@ - - - - Gordon360 - - - - - Get the username of the authenticated user - - The ClaimsPrincipal representing the user's authentication claims - Username of the authenticated user - - - Set emergency contacts for student - The contact data to be stored - The data stored - - - Sets the students cell phone number - The phone number object to be added to the database - The data stored - - - Sets the students race and ethinicity - The object containing the race numbers of the users - The data stored - - - Gets and returns the user's holds - The user's stored holds - - - Sets the user as having completed Academic Checkin - The HTTP status indicating whether the request was completed or not - - - Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in - The HTTP status indicating whether the request was completed and returns the check in status of the student - - - - Return a list of accounts matching some or all of searchString. - - The input to search for - All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameter. - - The firstname portion of the search - The lastname portion of the search - All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameters - We are searching through all the info of a user, then narrowing it down to get only what we want - - Which account types to search. Accepted values: "student", "alumni", "facstaff" - The first name to search for - The last name to search for - - - - - - - - - - All accounts meeting some or all of the parameter - - - Gets the activities taking place during a given session - The session identifier - A list of all activities that are active during the given session determined by the id parameter - Queries the database to find which activities are active during the session desired - - - Gets the different types of activities taking place during a given session - The session identifier - A list of all the different types of activities that are active during the given session determined by the id parameter - Queries the database to find the distinct activities type of activities that are active during the session desired - - - - Get the status (open or closed) of an activity for a given session - - The session code that we want to check the status for - - - - - - Get all the activities that have not yet been closed out for the current session - - - - - - Get all the activities that have not yet been closed out for the current session for - which a given user is the group admin - - The id of the user who is group admin - - - - - Get all the activities that are already closed out for the current session - - - - - - Get all the activities that are already closed out for the current session for - which a given user is group admin - - The id of the user who is group admin - - - - - - The code of the activity to update - The updated involvement details - - - - - Set an image for the activity - - The activity code - The image file - - - - - Reset the activity Image - - The activity code - - - - Update an existing activity to be private or not - The id of the activity - the boolean value - Calls the server to make a call and update the database with the changed information - - - - Pulls all states available from Jenzabar States Table - - - - - - Pulls all Countries available from Jenzabar Countries Table - - - - - - Get all admins - - - A list of all admins - - - Server makes call to the database and returns all admins - - - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - - Create a new admin to be added to database - The admin item containing all required and relevant information - - Posts a new admin to the server to be added into the database - - - Delete an existing admin - The identifier for the admin to be deleted - Calls the server to make a call and remove the given admin from the database - - - - Return a list majors. - - All majors - - - - Return a list minors. - - All minors - - - - Return a list minors. - - All minors - - - - Return a list states. - - All states - - - - Return a list countries. - - All countries - - - - Return a list departments. - - All departments - - - - Return a list buildings. - - All buildings - - - Get all the slider content for the dashboard slider - A list of all the slides for the slider - Queries the database for all entries in slider table - - - Get all the banner slides for the dashboard banner - A list of all the slides for the banner - - - Post a new slide for the dashboard banner - The posted banner - - - Remove a slide from the dashboard banner - ID of the slide to remove - - - - Gets information about student's dining plan and balance - - A DiningInfo object - - - - This makes use of our cached request to 25Live, which stores AllEvents - - - - - - Delete an application (and consequently all rows that reference it) - - The id of the application to remove - - - - - Get a list of the apartment-style halls - - - - - - Get apartment application ID number of currently logged in user if that user is on an existing application - - - - - - Get apartment application ID number for a user if that user is on an existing application - - username of the profile info - - - - - save application - - Returns the application ID number if all the queries succeeded - - - - update existing application (Differentiated by HttpPut instead of HttpPost) - - Returns the application ID number if all the queries succeeded - - - - change the editor (i.e. primary applicant) of the application - - The result of changing the editor - - - - change the date an application was submitted - (changes it from null the first time they submit) - - The result of changing the date submitted - - - Get apartment application info for a given application ID number - application ID number of the apartment application - Object of type ApartmentAppViewModel - - - Get apartment application info for all applications if the current user is a housing admin - Object of type ApartmentApplicationViewModel - - - - Get a user's active jobs - - The datetime that the shift started - The datetime that the shift ended - The user's active jobs - - - - Get a user's saved shifts - - The user's saved shifts - - - - Get a user's active jobs - - - The result of saving a shift - - - - Edit a shift - The details that will be changed - - - - - Get a user's active jobs - - The result of deleting the shift - - - - Submit shifts - - The result of submitting the shifts - - - - Gets the name of a supervisor based on their ID number - - The name of the supervisor - - - - sends the current clock in status to the back end - true if user is clocked in and false if clocked out - - detail to be saved in the back end, true if user just clocked in - returns confirmation that the answer was recorded - - - - gets the the clock in status from the back end - true if user is clocked in and false if clocked out - - ClockInViewModel - - - - deletes the last clocked in status of a user - - returns confirmation that clock in status was deleted - - - Create a new error log item to be added to database - The error message containing all required and relevant information - - Posts a new message to the service to be added into the database - - - Create a new error log item to be added to database - The error log containing the ERROR_TIME, and the LOG_MESSAGE - - Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - - Get all the memberships associated with a given activity - - The activity ID - Optional code of session to get for - IHttpActionResult - - - - Gets the group admin memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the leader-type memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the advisor-type memberships associated with a given activity. - - The activity ID. - A list of all advisor-type memberships for the specified activity. - - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - - - - Gets the number of followers of an activity - - The activity ID. - The session code - The number of followers of the activity - - - - Gets the number of members (excluding followers) of an activity - - The activity ID. - The session code - The number of members of the activity - - - Create a new membership item to be added to database - The membership item containing all required and relevant information - - Posts a new membership to the server to be added into the database - - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - - - Update an existing membership item - The membership id of whichever one is to be changed - The content within the membership that is to be changed and what it will change to - Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of - - - Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed - Calls the server to make a call and update the database with the changed information - - - Update an existing membership item to be private or not - The membership to toggle privacy on - Calls the server to make a call and update the database with the changed information - - - Delete an existing membership - The identifier for the membership to be deleted - Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check - - - - Gets all custom events for a user - - A IEnumerable of custom events - - - - Gets specific custom event for a user - - The requested custom event - - - - Gets all myschedule objects for a user - - A IEnumerable of myschedule objects - - - Create a new myschedule to be added to database - The myschedule item containing all required and relevant information - Created schedule - Posts a new myschedule to the server to be added into the database - - - Delete an existing myschedule item - The identifier for the myschedule to be deleted - Calls the server to make a call and remove the given myschedule from the database - - - Update the existing myschedule in database - The updated myschedule item containing all required and relevant information - Original schedule - Put a myschedule to the server to be updated - - - Gets a news item by id from the database - The id of the news item to retrieve - The news item - - - Gets the base64 image data for an image corresponding - to a student news item. Only used by GO; when we move student news approval - to 360, this will be removed. - The id of the news item to retrieve image from - base64 string representing image - - - Call the service that gets all approved student news entries not yet expired, filtering - out the expired by comparing 2 weeks past date entered to current date - - - Call the service that gets all new and approved student news entries - which have not already expired, - checking novelty by comparing an entry's date entered to 10am on the previous day - - - Call the service that gets the list of categories - - - Call the service that gets all unapproved student news entries (by a particular user) - not yet expired, filtering out the expired news - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Create a new news item to be added to the database - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Deletes a news item from the database - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Controller) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item - The news item must be authored by the user and must not be expired and must be unapproved - - - Get profile info of currently logged in user - - - - Get public profile info for a user - username of the profile info - - - - Get the advisor(s) of a particular student - - All advisors of the given student. For each advisor, - provides first name, last name, and username. - - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Toggle privacy of the current user's Clifton Strengths - New privacy value - - - Gets the emergency contact information of a particular user - The username for which to retrieve info - Emergency contact information of the given user. - - - Gets the mailbox information of currently logged in user - - - - Gets the date of birth of the current logged-in user - - - - Get the profile image of currently logged in user - - - - Get the profile image of the given user - The profile image(s) that the authenticated user is allowed to see, if any - - - - Set an image for profile - - - - - - Set an IDimage for a user - - - - - - Reset the profile Image - - - - - - Update the profile social media links - - The type of social media - The path of the links - - - - - Update mobile phone number - - phoneNumber - - - - - Update privacy of mobile phone number - - Y or N - - - - - Update privacy of profile image - - Y or N - - - - - Posts fields into CCT.dbo.Information_Change_Request - Sends Alumni Profile Update Email to "devrequest@gordon.edu" - - Object with Field's Name and Field's Value, unused Field's Label - - - - - Gets the profile image at the given path or, if that file does not exist, the 360 default profile image - - - Note that the 360 default profile image is different from a user's default image. - A given user's default image is simply their approved ID photo. - The 360 default profile image, on the other hand, is a stock image of Scottie Lion. - Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. - - Path to the profile image to load - - - - - Gets all Membership Request Objects - - List of all requests for membership - - - - Gets a specific Membership Request Object - - The ID of the membership request - A memberships request with the specified id - - - - Gets the memberships requests for the specified activity - - The activity code - All membership requests associated with the activity - - - - Gets the memberships requests for the person making the request - - All membership requests associated with the student - - - - Creates a new membership request - - The request to be added - The added request if successful. HTTP error message if not. - - - - Updates a membership request - - The membership request id - The updated membership request object - The updated request if successful. HTTP error message if not. - - - - Sets a membership request to Approved - - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. - - - - Deletes a membership request - - The id of the membership request to delete - The deleted object - - - - Gets all upcoming ride objects - - A IEnumerable of rides objects - - - - Gets all upcoming ride objects for a user - - A IEnumerable of rides objects - - - - Create new ride object for a user - - Successfully posted ride object - - - Cancel an existing ride item - The identifier for the ride to be cancel - Calls the server to make a call and remove the given ride from the database - - - Delete an existing ride item - The identifier for the ride to be deleted - Calls the server to make a call and remove the given ride from the database - - - - Create new booking object for a user - - Successfully posted booking object - - - Delete an existing booking item - The identifier for the booking to be deleted - Calls the server to make a call and remove the given booking from the database - - - - Get schedule information of logged in user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO: Use Service Layer - - - - - - Get schedule information of specific user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO Use Service Layer - - username - - - - - Update privacy of schedule - - Y or N - - - - - Update schedule description - - New description - - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Get whether the currently logged-in user can read student schedules - - Whether they can read student schedules - - - Get a list of all sessions - All sessions within the database - Queries the database for all sessions, current and past - - - Get one specific session specified by the id in the URL string - The identifier for one specific session - The information about one specific session - Queries the database regarding a specific session with the given identifier - - - - Gets the current active session - - - - - - Gets the days left in the current session - - - - - - Gets student employment information about the user - - A Student Employment Json - - - - Get the short git SHA-1 and build date for the backend - - "Git Hash: {hashCode}; Build Time: {date and time}" - - - - - Gets current victory promise scores - - A VP Json - - - - Enum representing three possible wellness statuses. - GREEN - Healthy, no known contact/symptoms - YELLOW - Symptomatic or cautionary hold - RED - Quarantine/Isolation - - - - - Gets wellness status of current user - - A WellnessViewModel representing the most recent status of the user - - - - Gets question for wellness check from the back end - - A WellnessQuestionViewModel - - - - Stores the user's wellness status - - The current status of the user to post, of type WellnessStatusColor - The status that was stored in the database - - - - Whether the user wants their strengths to be private (not shown to other users) - - - - - Gordon ID Number - - - - - a job's unique id number - - - - - Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of the match, followed by the matched field. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The search input to match against - The match key if search matched a field, or null - - - - Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The first name of the search input to match against - The last name of the search input to match against - The match key if first and last name both matched a field, or null - - - - Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. - - - - - Stores the emergency contact information of a particular user - The object that stores the contact info - The students id number - The stored data - - - - Create the notes value for the database to be passed in with the rest of the data. - The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international - - The mobile phone of the contact - The home phone of the contact - The formatted notes parameter to be passed to the database - - - Stores the cellphone preferences for the current user - The phone number object for the user - The id of the student to be updated - The stored data - - - Stores the demographic data (race and ethnicity) of the current user - The race and ethnicity data for the user - The id of the user to be updated - The stored data - - - Gets the holds of the user with the given ID - The id of the user whose holds are to be found - The stored data - - - Sets the user as having been checked in - The id of the user who is to be marked as checked in - - - Gets the whether the user has completed Academic Checkin - The id of the user for which the data is to be found for - - - Formats a phone number for insertion into the database - The phone number to be formatted - The formatted number - - - - Service Class that facilitates data transactions between the AccountsController and the Account database model. - - - - - Fetches a single account record whose id matches the id provided as an argument - - The person's gordon id - AccountViewModel if found, null if not found - - - - Fetches all the account records from storage. - - AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the account id number - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the first account object which matches the email - - - - Fetches the account record with the specified username. - - The AD username associated with the account. - the student account information - - - - Get basic info for all accounts - - BasicInfoViewModel of all accounts - - - - Get basic info for all accounts except alumni - - BasicInfoViewModel of all accounts except alumni - - - - Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. - ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) - Activity Info and ACtivity may be talked about interchangeably. - - - - - Fetches a single activity record whose id matches the id provided as an argument - - The activity code - ActivityViewModel if found, null if not found - - - - Fetches the Activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the Activity types of activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches all activity records from storage. - - ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Checks to see if a specified activity is still open for this session - Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table - When an activity is closed out, the END_DTE is set to the date on which the closing happened - Otherwise, the END_DTE for all memberships of the activity will be null for that session - - The activity code for the activity in question - Code of the session to check - - - - - Gets a collection of all the current open activities, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current activities already closed out, by finding which activities have - memberships with an END_DTE that is not null - - The collection of activity codes for open activities - - - - Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is not null - - The user's id - The session we want to get the closed activities for - The collection of activity codes for open activities - - - - Updates the Activity Info - - The activity info resource with the updated information - The id of the activity info to be updated - The updated activity info resource - - - - Closes out a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Open a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Updates the image for the spcefied involvement - - The involvement to update the image of - The new image - The involvement with the updated image path - - - - Reset the path for the activity image - - The activity code - - - - change activty privacy - - The activity code - activity private or not - - - - Service class to facilitate interacting with the Admin table. - - - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - - - Fetches the admin resource whose username matches the specified argument - - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. - - - - Fetches all the administrators from the database - - Returns a list of administrators. If no administrators were found, an empty list is returned. - - - - Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateAdmin() method. - - The admin to be added - The newly added Admin object - - - - Delete the admin whose id is specified by the parameter. - - The admin id - The admin that was just deleted - - - - Helper method to Validate an admin - - The admin to validate - True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - - - - Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. - - - - - Fetches the dashboard slider content from the database. - - If found, returns a set of SliderViewModel's, based on each slide entry in the db. - If not returns an empty IEnumerable. - - - - Retrieve all banner slides from the database - - An IEnumerable of the slides in the database - - - - Inserts a banner slide in the database and uploads the image to the local slider folder - - The slide to add - The url of the server that the image is being posted to. - This is needed to save the image path into the database. The URL is different depending on where the API is running. - The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. - - The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. - The inserted slide - - - - Deletes a banner slide from the database and deletes the local image file - - The deleted slide - - - - Service that allows for meal control - - - - - - - - - - - - - Get information about the selected plan for the student user - - Student's Gordon ID - Current Session Code - - - - - Service class to facilitate getting emails for members of an activity. - - - - - Get a list of the emails for all members in the activity during the current session. - - The code of the activity to get emails for. - Optionally, the session to get emails for. Defaults to the current session - The participation type to get emails of. If unspecified, gets emails of all participation types. - A list of emails (along with first and last name) associated with that activity - - - - Send a email to a list of email addresses - - All addresses to send this email to - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Send a email to members of an activity - - The activity code to send this email to - The session of activity to select members from - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. - - - - - Adds a new error log to storage. - - The error log to be added - The newly added error_log object - - - - Adds a new error log to storage, after creating the timestamp. - - The error message for the error log to be added - The newly added error_log object - - - - Service that allows for event control - - - - URL to retrieve events from the 25Live API. - event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). - All other event types are not appropiate for the 360 events feed. - end_after parameter limits the request to events from the current academic year. - state parameter fetches only confirmed events - - - - Access the memory stream created by the cached task and parse it into events - Splits events with multiple repeated occurrences into individual records for each occurrence - - All events for the current academic year. - - - - Select only events that are marked for Public promotion - - All Public Events - - - - Select only events that are Approved to give CLAW credit - - All CLAW Events - - - - Returns all attended events for a student in a specific term - - The student's AD Username - The current term - - - - - Helper function to determine the current academic year - - - - - - Calls a stored procedure that returns a row in the staff whitelist which has the given user id, - if it is in the whitelist - - The id of the person using the page - Whether or not the user is on the staff whitelist - - - - Deletes the application with given id, - removing all rows that reference it. - - The id of the application to delete - Whether or not this was successful - - - - Gets all names of apartment halls - - AN array of hall names - - - - Calls a stored procedure that tries to get the id of an the application that a given user is - applicant on for a given session - - The student username to look for - Session for which the application would be - - The id of the application or - null if the user is not on an application for that session - - - - - Get the editor ID of a given application ID - - The application ID for which the editor ID would be - - The id of the editor or - null if the user is a member but not an editor of a given application - - - - - Saves student housing info - - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp - - second, it retrieves the application id of the application with the information we just inserted (because - the database creates the application ID so we have to ask it which number it generated for it) - - third, it inserts each applicant into the applicants table along with the application ID so we know - which application on which they are an applicant - - - The current session code - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Edit an existings apartment application - - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username - - second, it gets an array of the applicants that are already stored in the database for the given application ID - - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database - - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array - - - The student username of the user who is attempting to save the apartment application (retrieved via authentication token) - The current session code - The application ID number of the application to be edited - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Changes the student user who has permission to edit the given application - - - Whether or not all the queries succeeded - - - application ID number of the apartment application - boolean indicating whether the current user is an admin, permits access to restricted information such as birth date - Apartment Application formatted for display in the UI - - - Array of ApartmentApplicationViewModels - - - - "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked - - The application ID number of the application to be submitted - Returns whether the query succeeded - - - - Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. - - - - - Service class to facilitate data transactions between the MembershipRequestController and the database - - - - - Generate a new request to join an activity at a participation level higher than 'Guest' - - The membership request object - The membership request object once it is added - - - - Approves the request with the specified ID. - - The ID of the request to be approved - The approved membership - - - - Delete the membershipRequest object whose id is given in the parameters - - The membership request id - A copy of the deleted membership request - - - - Denies the membership request object whose id is given in the parameters - - The membership request id - - - - - Get the membership request object whose Id is specified in the parameters. - - The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. - - - - Fetches all the membership request objects from the database. - - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this activity - - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this student - - The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Update an existing membership request object - - The membership request id - The newly modified membership request - - - - - Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - - - - - Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateMembership() method. - - The membership to be added - The newly added Membership object - - - - Delete the membership whose id is specified by the parameter. - - The membership id - The membership that was just deleted - - - - Fetch the membership whose id is specified by the parameter - - The membership id - MembershipViewModel if found, null if not found - - - - Fetches the memberships associated with the activity whose code is specified by the parameter. - - The activity code. - Optional code of session to get memberships for - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the leaders of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the advisors of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches all the membership information linked to the student whose id appears as a parameter. - - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int. - - - - Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int - - - - Updates the membership whose id is given as the first parameter to the contents of the second parameter. - - The updated membership. - The newly modified membership. - - - - Switches the group-admin property of the person whose membership id is given - - The corresponding membership object - The newly modified membership. - - - - Switches the privacy property of the person whose membership id is given - - The membership object passed. - The newly modified membership. - - - - Helper method to Validate a membership - - The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Determines whether or not the given user is a Group Admin of some activity - - Username of the user to check - true if student is a Group Admin, else false - - - - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. - - - - - Fetch the myschedule item whose id is specified by the parameter - - The myschedule id - AD Username - Myschedule if found, null if not found - - - - Fetch all myschedule items belonging to the given user - - The AD Username - Array of Myschedule if found, null if not found - - - - Adds a new mySchedule record to storage. - - The membership to be added - The newly added custom event - - - - Delete the myschedule whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Update the myschedule item. - - The schedule information - The original schedule - - - - Gets a news item entity by id - NOTE: Also a helper method, hence why it returns a StudentNews model - rather than a StudentNewsViewModel - must be casted as the latter in its own - controller - - The SNID (id of news item) - The news item - - - - Gets unapproved unexpired news submitted by user. - - username - Result of query - - - - Adds a news item record to storage. - - The news item to be added - username - The newly added Membership object - - - - (Service) Deletes a news item from the database - - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Service) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item's view model - The news item must be authored by the user and must not be expired and must be unapproved - - - - Helper method to verify that a given news item has not yet been approved - - The news item to verify - true if unapproved, otherwise throws some kind of meaningful exception - - - - Helper method to verify that a given news item has not expired - (see documentation for expiration definition) - - The news item to verify - true if unexpired, otherwise throws some kind of meaningful exception - - - - Helper method to validate a news item - - The news item to validate - True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Verifies that a student account exists - - The AD Username of the student - true if account exists, ResourceNotFoundException if null - - - - get student profile info - - username - StudentProfileViewModel if found, null if not found - - - - get faculty staff profile info - - username - FacultyStaffProfileViewModel if found, null if not found - - - - get alumni profile info - - username - AlumniProfileViewModel if found, null if not found - - - - get mailbox combination - - The current user's username - MailboxViewModel with the combination - - - - get a user's birthday - - The username of the person to get the birthdate of - Date the user's date of birth - - - - get advisors for particular student - - AD username - - - - Gets the clifton strengths of a particular user - The id of the user for which to retrieve info - Clifton strengths of the given user. - - - - Toggles the privacy of the Clifton Strengths data associated with the given id - - ID of the user whose Clifton Strengths privacy is toggled - The new privacy value - Thrown when the given ID doesn't match any Clifton Strengths rows - - - Gets the emergency contact information of a particular user - The username of the user for which to retrieve info - Emergency contact information of the given user. - - - - Get photo path for profile - - AD username - PhotoPathViewModel if found, null if not found - - - - Fetches a single profile whose username matches the username provided as an argument - - The username - ProfileViewModel if found, null if not found - - - - Sets the path for the profile image. - - AD Username - - - - - - Sets the path for the profile links. - - The username - - - - - - privacy setting of mobile phone. - - AD Username - Y or N - - - - mobile phone number setting - - The username for the user whose phone is to be updated - The new number to update the user's phone number to - - - - privacy setting user profile photo. - - AD Username - Y or N - - - - Fetch all upcoming ride items - - IEnumerable of ride items if found, null if not found - - - - Fetch the ride items a user is part of - - The ride id - ride items if found, null if not found - - - - Adds a new ride record to storage. - - The Save_Rides object to be added - The gordon_id of the user creating the ride - The newly added custom event - - - - Delete the ride whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Cancel the ride whose id is specified by the parameter. - - The ride id - The gordon id - The ride that was just deleted - - - - Adds a new booking record to storage. - - The Save_Bookings object to be added - The newly added custom event - - - - Delete the booking whose ids are specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. - - - - - privacy setting of schedule. - - AD Username - Y or N - - - - description of schedule. - - AD Username - New description - - - - Update timestamp of modification in schedule. - - AD Username - Modified Time - - - - Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. - - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the student - StudentScheduleViewModel if found, null if not found - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the instructor - StudentScheduleViewModel if found, null if not found - - - - Service class to facilitate data transactions between the Controller and the database model. - - - - - Get the session record whose sesssion code matches the parameter. - - The session code. - A SessionViewModel if found, null if not found. - - - - Fetches all the session records from the database. - - A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - get Student Employment records of given user - - AD Username of user to get employment - VictoryPromiseViewModel if found, null if not found - - - - get victory promise scores - - id - VictoryPromiseViewModel if found, null if not found - - - - Get the status of the user by id - - AD Username of the user to get the status of - The status of the user, a WellnessViewModel - - - - Stores wellness Status in database. - - AD Username of the user to post the status for - Status that is being posted, one of the WellnessStatusColors - Status that was successfully recorded - - - - gets the question for the wellness check from the back end - - A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. - - - - Creates an expiration date for a check in at the current time - - The time of the check in - When the check in should expire (the next 5AM). - - - - Service class for methods that are shared between all services. - - - - - Helper method that gets the current session we are in. - - The session code of the current session - - - - Deletes an image from the filesystem, if there is one. - - The path to which the image belonged. - - - - Takes an image path and returns the data of the image at that path. - If given path is null it returns an empty string. - - The path to the image - The base64 data of the image - - - - Uploads a news image - - - Takes base64 image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The base64 image data to be stored - The format to save the image as. Defaults to Jpeg - - - - Uploads image from HTTP FormFile - - - Takes image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The image data to be stored - - - - Takes a filepath for an image, navigates to it, collects the raw data - of the file and converts it to base64 format. - - The path to the image - The base64 content of the image - - - + + + + Gordon360 + + + + + Get the username of the authenticated user + + The ClaimsPrincipal representing the user's authentication claims + Username of the authenticated user + + + Set emergency contacts for student + The contact data to be stored + The data stored + + + Sets the students cell phone number + The phone number object to be added to the database + The data stored + + + Sets the students race and ethinicity + The object containing the race numbers of the users + The data stored + + + Gets and returns the user's holds + The user's stored holds + + + Sets the user as having completed Academic Checkin + The HTTP status indicating whether the request was completed or not + + + Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in + The HTTP status indicating whether the request was completed and returns the check in status of the student + + + + Return a list of accounts matching some or all of searchString. + + The input to search for + All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameter. + + The firstname portion of the search + The lastname portion of the search + All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameters + We are searching through all the info of a user, then narrowing it down to get only what we want + + Which account types to search. Accepted values: "student", "alumni", "facstaff" + The first name to search for + The last name to search for + + + + + + + + + + All accounts meeting some or all of the parameter + + + Gets the activities taking place during a given session + The session identifier + A list of all activities that are active during the given session determined by the id parameter + Queries the database to find which activities are active during the session desired + + + Gets the different types of activities taking place during a given session + The session identifier + A list of all the different types of activities that are active during the given session determined by the id parameter + Queries the database to find the distinct activities type of activities that are active during the session desired + + + + Get the status (open or closed) of an activity for a given session + + The session code that we want to check the status for + + + + + + Get all the activities that have not yet been closed out for the current session + + + + + + Get all the activities that have not yet been closed out for the current session for + which a given user is the group admin + + The id of the user who is group admin + + + + + Get all the activities that are already closed out for the current session + + + + + + Get all the activities that are already closed out for the current session for + which a given user is group admin + + The id of the user who is group admin + + + + + + The code of the activity to update + The updated involvement details + + + + + Set an image for the activity + + The activity code + The image file + + + + + Reset the activity Image + + The activity code + + + + Update an existing activity to be private or not + The id of the activity + the boolean value + Calls the server to make a call and update the database with the changed information + + + + Pulls all states available from Jenzabar States Table + + + + + + Pulls all Countries available from Jenzabar Countries Table + + + + + + Get all admins + + + A list of all admins + + + Server makes call to the database and returns all admins + + + + + Get a specific admin + + + The specific admin + + + Server makes call to the database and returns the specific admin + + + + Create a new admin to be added to database + The admin item containing all required and relevant information + + Posts a new admin to the server to be added into the database + + + Delete an existing admin + The identifier for the admin to be deleted + Calls the server to make a call and remove the given admin from the database + + + + Return a list majors. + + All majors + + + + Return a list minors. + + All minors + + + + Return a list minors. + + All minors + + + + Return a list states. + + All states + + + + Return a list countries. + + All countries + + + + Return a list departments. + + All departments + + + + Return a list buildings. + + All buildings + + + Get all the slider content for the dashboard slider + A list of all the slides for the slider + Queries the database for all entries in slider table + + + Get all the banner slides for the dashboard banner + A list of all the slides for the banner + + + Post a new slide for the dashboard banner + The posted banner + + + Remove a slide from the dashboard banner + ID of the slide to remove + + + + Gets information about student's dining plan and balance + + A DiningInfo object + + + + This makes use of our cached request to 25Live, which stores AllEvents + + + + + + Delete an application (and consequently all rows that reference it) + + The id of the application to remove + + + + + Get a list of the apartment-style halls + + + + + + Get apartment application ID number of currently logged in user if that user is on an existing application + + + + + + Get apartment application ID number for a user if that user is on an existing application + + username of the profile info + + + + + save application + + Returns the application ID number if all the queries succeeded + + + + update existing application (Differentiated by HttpPut instead of HttpPost) + + Returns the application ID number if all the queries succeeded + + + + change the editor (i.e. primary applicant) of the application + + The result of changing the editor + + + + change the date an application was submitted + (changes it from null the first time they submit) + + The result of changing the date submitted + + + Get apartment application info for a given application ID number + application ID number of the apartment application + Object of type ApartmentAppViewModel + + + Get apartment application info for all applications if the current user is a housing admin + Object of type ApartmentApplicationViewModel + + + + Get a user's active jobs + + The datetime that the shift started + The datetime that the shift ended + The user's active jobs + + + + Get a user's saved shifts + + The user's saved shifts + + + + Get a user's active jobs + + + The result of saving a shift + + + + Edit a shift + The details that will be changed + + + + + Get a user's active jobs + + The result of deleting the shift + + + + Submit shifts + + The result of submitting the shifts + + + + Gets the name of a supervisor based on their ID number + + The name of the supervisor + + + + sends the current clock in status to the back end + true if user is clocked in and false if clocked out + + detail to be saved in the back end, true if user just clocked in + returns confirmation that the answer was recorded + + + + gets the the clock in status from the back end + true if user is clocked in and false if clocked out + + ClockInViewModel + + + + deletes the last clocked in status of a user + + returns confirmation that clock in status was deleted + + + Create a new error log item to be added to database + The error message containing all required and relevant information + + Posts a new message to the service to be added into the database + + + Create a new error log item to be added to database + The error log containing the ERROR_TIME, and the LOG_MESSAGE + + Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy + + + + Get all the memberships associated with a given activity + + The activity ID + Optional code of session to get for + IHttpActionResult + + + + Gets the group admin memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the leader-type memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the advisor-type memberships associated with a given activity. + + The activity ID. + A list of all advisor-type memberships for the specified activity. + + + + Gets the number of followers of an activity + + The activity ID. + The number of followers of the activity + + + + Gets the number of members (besides followers) of an activity + + The activity ID. + The number of members of the activity + + + + Gets the number of followers of an activity + + The activity ID. + The session code + The number of followers of the activity + + + + Gets the number of members (excluding followers) of an activity + + The activity ID. + The session code + The number of members of the activity + + + Create a new membership item to be added to database + The membership item containing all required and relevant information + + Posts a new membership to the server to be added into the database + + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + + + Update an existing membership item + The membership id of whichever one is to be changed + The content within the membership that is to be changed and what it will change to + Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of + + + Update an existing membership item to be a group admin or not + /// The content within the membership that is to be changed + Calls the server to make a call and update the database with the changed information + + + Update an existing membership item to be private or not + The membership to toggle privacy on + Calls the server to make a call and update the database with the changed information + + + Delete an existing membership + The identifier for the membership to be deleted + Calls the server to make a call and remove the given membership from the database + + + + Determines whether or not the given student is a Group Admin of some activity + + The account username to check + + + + Gets all custom events for a user + + A IEnumerable of custom events + + + + Gets specific custom event for a user + + The requested custom event + + + + Gets all myschedule objects for a user + + A IEnumerable of myschedule objects + + + Create a new myschedule to be added to database + The myschedule item containing all required and relevant information + Created schedule + Posts a new myschedule to the server to be added into the database + + + Delete an existing myschedule item + The identifier for the myschedule to be deleted + Calls the server to make a call and remove the given myschedule from the database + + + Update the existing myschedule in database + The updated myschedule item containing all required and relevant information + Original schedule + Put a myschedule to the server to be updated + + + Gets a news item by id from the database + The id of the news item to retrieve + The news item + + + Gets the base64 image data for an image corresponding + to a student news item. Only used by GO; when we move student news approval + to 360, this will be removed. + The id of the news item to retrieve image from + base64 string representing image + + + Call the service that gets all approved student news entries not yet expired, filtering + out the expired by comparing 2 weeks past date entered to current date + + + Call the service that gets all new and approved student news entries + which have not already expired, + checking novelty by comparing an entry's date entered to 10am on the previous day + + + Call the service that gets the list of categories + + + Call the service that gets all unapproved student news entries (by a particular user) + not yet expired, filtering out the expired news + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Create a new news item to be added to the database + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Deletes a news item from the database + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Controller) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item + The news item must be authored by the user and must not be expired and must be unapproved + + + Get profile info of currently logged in user + + + + Get public profile info for a user + username of the profile info + + + + Get the advisor(s) of a particular student + + All advisors of the given student. For each advisor, + provides first name, last name, and username. + + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Toggle privacy of the current user's Clifton Strengths + New privacy value + + + Gets the emergency contact information of a particular user + The username for which to retrieve info + Emergency contact information of the given user. + + + Gets the mailbox information of currently logged in user + + + + Gets the date of birth of the current logged-in user + + + + Get the profile image of currently logged in user + + + + Get the profile image of the given user + The profile image(s) that the authenticated user is allowed to see, if any + + + + Set an image for profile + + + + + + Set an IDimage for a user + + + + + + Reset the profile Image + + + + + + Update the profile social media links + + The type of social media + The path of the links + + + + + Update mobile phone number + + phoneNumber + + + + + Update privacy of mobile phone number + + Y or N + + + + + Update privacy of profile image + + Y or N + + + + + Posts fields into CCT.dbo.Information_Change_Request + Sends Alumni Profile Update Email to "devrequest@gordon.edu" + + Object with Field's Name and Field's Value, unused Field's Label + + + + + Gets the profile image at the given path or, if that file does not exist, the 360 default profile image + + + Note that the 360 default profile image is different from a user's default image. + A given user's default image is simply their approved ID photo. + The 360 default profile image, on the other hand, is a stock image of Scottie Lion. + Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. + + Path to the profile image to load + + + + + Gets all Membership Request Objects + + List of all requests for membership + + + + Gets a specific Membership Request Object + + The ID of the membership request + A memberships request with the specified id + + + + Gets the memberships requests for the specified activity + + The activity code + All membership requests associated with the activity + + + + Gets the memberships requests for the person making the request + + All membership requests associated with the student + + + + Creates a new membership request + + The request to be added + The added request if successful. HTTP error message if not. + + + + Updates a membership request + + The membership request id + The updated membership request object + The updated request if successful. HTTP error message if not. + + + + Sets a membership request to Approved + + The id of the membership request in question. + If successful: THe updated membership request wrapped in an OK Http status code. + + + + Sets the membership request to Denied + + The id of the membership request in question. + If successful: The updated membership request wrapped in an OK Http status code. + + + + Deletes a membership request + + The id of the membership request to delete + The deleted object + + + + Gets all upcoming ride objects + + A IEnumerable of rides objects + + + + Gets all upcoming ride objects for a user + + A IEnumerable of rides objects + + + + Create new ride object for a user + + Successfully posted ride object + + + Cancel an existing ride item + The identifier for the ride to be cancel + Calls the server to make a call and remove the given ride from the database + + + Delete an existing ride item + The identifier for the ride to be deleted + Calls the server to make a call and remove the given ride from the database + + + + Create new booking object for a user + + Successfully posted booking object + + + Delete an existing booking item + The identifier for the booking to be deleted + Calls the server to make a call and remove the given booking from the database + + + + Get schedule information of logged in user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO: Use Service Layer + + + + + + Get schedule information of specific user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO Use Service Layer + + username + + + + + Update privacy of schedule + + Y or N + + + + + Update schedule description + + New description + + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Get whether the currently logged-in user can read student schedules + + Whether they can read student schedules + + + Get a list of all sessions + All sessions within the database + Queries the database for all sessions, current and past + + + Get one specific session specified by the id in the URL string + The identifier for one specific session + The information about one specific session + Queries the database regarding a specific session with the given identifier + + + + Gets the current active session + + + + + + Gets the days left in the current session + + + + + + Gets student employment information about the user + + A Student Employment Json + + + + Get the short git SHA-1 and build date for the backend + + "Git Hash: {hashCode}; Build Time: {date and time}" + + + + + Gets current victory promise scores + + A VP Json + + + + Enum representing three possible wellness statuses. + GREEN - Healthy, no known contact/symptoms + YELLOW - Symptomatic or cautionary hold + RED - Quarantine/Isolation + + + + + Gets wellness status of current user + + A WellnessViewModel representing the most recent status of the user + + + + Gets question for wellness check from the back end + + A WellnessQuestionViewModel + + + + Stores the user's wellness status + + The current status of the user to post, of type WellnessStatusColor + The status that was stored in the database + + + + Whether the user wants their strengths to be private (not shown to other users) + + + + + Gordon ID Number + + + + + a job's unique id number + + + + + Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of the match, followed by the matched field. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The search input to match against + The match key if search matched a field, or null + + + + Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The first name of the search input to match against + The last name of the search input to match against + The match key if first and last name both matched a field, or null + + + + Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. + + + + + Stores the emergency contact information of a particular user + The object that stores the contact info + The students id number + The stored data + + + + Create the notes value for the database to be passed in with the rest of the data. + The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international + + The mobile phone of the contact + The home phone of the contact + The formatted notes parameter to be passed to the database + + + Stores the cellphone preferences for the current user + The phone number object for the user + The id of the student to be updated + The stored data + + + Stores the demographic data (race and ethnicity) of the current user + The race and ethnicity data for the user + The id of the user to be updated + The stored data + + + Gets the holds of the user with the given ID + The id of the user whose holds are to be found + The stored data + + + Sets the user as having been checked in + The id of the user who is to be marked as checked in + + + Gets the whether the user has completed Academic Checkin + The id of the user for which the data is to be found for + + + Formats a phone number for insertion into the database + The phone number to be formatted + The formatted number + + + + Service Class that facilitates data transactions between the AccountsController and the Account database model. + + + + + Fetches a single account record whose id matches the id provided as an argument + + The person's gordon id + AccountViewModel if found, null if not found + + + + Fetches all the account records from storage. + + AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the first account object which matches the email + + + + Fetches the account record with the specified username. + + The AD username associated with the account. + the student account information + + + + Get basic info for all accounts + + BasicInfoViewModel of all accounts + + + + Get basic info for all accounts except alumni + + BasicInfoViewModel of all accounts except alumni + + + + Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. + ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) + Activity Info and ACtivity may be talked about interchangeably. + + + + + Fetches a single activity record whose id matches the id provided as an argument + + The activity code + ActivityViewModel if found, null if not found + + + + Fetches the Activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the Activity types of activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches all activity records from storage. + + ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Checks to see if a specified activity is still open for this session + Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table + When an activity is closed out, the END_DTE is set to the date on which the closing happened + Otherwise, the END_DTE for all memberships of the activity will be null for that session + + The activity code for the activity in question + Code of the session to check + + + + + Gets a collection of all the current open activities, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current activities already closed out, by finding which activities have + memberships with an END_DTE that is not null + + The collection of activity codes for open activities + + + + Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is not null + + The user's id + The session we want to get the closed activities for + The collection of activity codes for open activities + + + + Updates the Activity Info + + The activity info resource with the updated information + The id of the activity info to be updated + The updated activity info resource + + + + Closes out a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Open a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Updates the image for the spcefied involvement + + The involvement to update the image of + The new image + The involvement with the updated image path + + + + Reset the path for the activity image + + The activity code + + + + change activty privacy + + The activity code + activity private or not + + + + Service class to facilitate interacting with the Admin table. + + + + + Fetches the admin resource whose id is specified as an argument. + + The admin ID.l + The Specified administrator. If none was found, a null value is returned. + + + + Fetches the admin resource whose username matches the specified argument + + The administrator's gordon id + The Specified administrator. If none was found, a null value is returned. + + + + Fetches all the administrators from the database + + Returns a list of administrators. If no administrators were found, an empty list is returned. + + + + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateAdmin() method. + + The admin to be added + The newly added Admin object + + + + Delete the admin whose id is specified by the parameter. + + The admin id + The admin that was just deleted + + + + Helper method to Validate an admin + + The admin to validate + True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter + + + + Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. + + + + + Fetches the dashboard slider content from the database. + + If found, returns a set of SliderViewModel's, based on each slide entry in the db. + If not returns an empty IEnumerable. + + + + Retrieve all banner slides from the database + + An IEnumerable of the slides in the database + + + + Inserts a banner slide in the database and uploads the image to the local slider folder + + The slide to add + The url of the server that the image is being posted to. + This is needed to save the image path into the database. The URL is different depending on where the API is running. + The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. + + The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. + The inserted slide + + + + Deletes a banner slide from the database and deletes the local image file + + The deleted slide + + + + Service that allows for meal control + + + + + + + + + + + + + Get information about the selected plan for the student user + + Student's Gordon ID + Current Session Code + + + + + Service class to facilitate getting emails for members of an activity. + + + + + Get a list of the emails for all members in the activity during the current session. + + The code of the activity to get emails for. + Optionally, the session to get emails for. Defaults to the current session + The participation type to get emails of. If unspecified, gets emails of all participation types. + A list of emails (along with first and last name) associated with that activity + + + + Send a email to a list of email addresses + + All addresses to send this email to + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Send a email to members of an activity + + The activity code to send this email to + The session of activity to select members from + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. + + + + + Adds a new error log to storage. + + The error log to be added + The newly added error_log object + + + + Adds a new error log to storage, after creating the timestamp. + + The error message for the error log to be added + The newly added error_log object + + + + Service that allows for event control + + + + URL to retrieve events from the 25Live API. + event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). + All other event types are not appropiate for the 360 events feed. + end_after parameter limits the request to events from the current academic year. + state parameter fetches only confirmed events + + + + Access the memory stream created by the cached task and parse it into events + Splits events with multiple repeated occurrences into individual records for each occurrence + + All events for the current academic year. + + + + Select only events that are marked for Public promotion + + All Public Events + + + + Select only events that are Approved to give CLAW credit + + All CLAW Events + + + + Returns all attended events for a student in a specific term + + The student's AD Username + The current term + + + + + Helper function to determine the current academic year + + + + + + Calls a stored procedure that returns a row in the staff whitelist which has the given user id, + if it is in the whitelist + + The id of the person using the page + Whether or not the user is on the staff whitelist + + + + Deletes the application with given id, + removing all rows that reference it. + + The id of the application to delete + Whether or not this was successful + + + + Gets all names of apartment halls + + AN array of hall names + + + + Calls a stored procedure that tries to get the id of an the application that a given user is + applicant on for a given session + + The student username to look for + Session for which the application would be + + The id of the application or + null if the user is not on an application for that session + + + + + Get the editor ID of a given application ID + + The application ID for which the editor ID would be + + The id of the editor or + null if the user is a member but not an editor of a given application + + + + + Saves student housing info + - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp + - second, it retrieves the application id of the application with the information we just inserted (because + the database creates the application ID so we have to ask it which number it generated for it) + - third, it inserts each applicant into the applicants table along with the application ID so we know + which application on which they are an applicant + + + The current session code + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Edit an existings apartment application + - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username + - second, it gets an array of the applicants that are already stored in the database for the given application ID + - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database + - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array + + + The student username of the user who is attempting to save the apartment application (retrieved via authentication token) + The current session code + The application ID number of the application to be edited + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Changes the student user who has permission to edit the given application + + + Whether or not all the queries succeeded + + + application ID number of the apartment application + boolean indicating whether the current user is an admin, permits access to restricted information such as birth date + Apartment Application formatted for display in the UI + + + Array of ApartmentApplicationViewModels + + + + "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked + + The application ID number of the application to be submitted + Returns whether the query succeeded + + + + Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. + + + + + Service class to facilitate data transactions between the MembershipRequestController and the database + + + + + Generate a new request to join an activity at a participation level higher than 'Guest' + + The membership request object + The membership request object once it is added + + + + Approves the request with the specified ID. + + The ID of the request to be approved + The approved membership + + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + + + + Denies the membership request object whose id is given in the parameters + + The membership request id + + + + + Get the membership request object whose Id is specified in the parameters. + + The membership request id + If found, returns MembershipRequestViewModel. If not found, returns null. + + + + Fetches all the membership request objects from the database. + + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this activity + + The activity id + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this student + + The AD Username of the user + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Update an existing membership request object + + The membership request id + The newly modified membership request + + + + + Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + + + + + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateMembership() method. + + The membership to be added + The newly added Membership object + + + + Delete the membership whose id is specified by the parameter. + + The membership id + The membership that was just deleted + + + + Fetch the membership whose id is specified by the parameter + + The membership id + MembershipViewModel if found, null if not found + + + + Fetches the memberships associated with the activity whose code is specified by the parameter. + + The activity code. + Optional code of session to get memberships for + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the leaders of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the advisors of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches all the membership information linked to the student whose id appears as a parameter. + + The student's AD Username. + A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the number of followers associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of memberships associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int. + + + + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int + + + + Updates the membership whose id is given as the first parameter to the contents of the second parameter. + + The updated membership. + The newly modified membership. + + + + Switches the group-admin property of the person whose membership id is given + + The corresponding membership object + The newly modified membership. + + + + Switches the privacy property of the person whose membership id is given + + The membership object passed. + The newly modified membership. + + + + Helper method to Validate a membership + + The membership to validate + True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Determines whether or not the given user is a Group Admin of some activity + + Username of the user to check + true if student is a Group Admin, else false + + + + Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. + + + + + Fetch the myschedule item whose id is specified by the parameter + + The myschedule id + AD Username + Myschedule if found, null if not found + + + + Fetch all myschedule items belonging to the given user + + The AD Username + Array of Myschedule if found, null if not found + + + + Adds a new mySchedule record to storage. + + The membership to be added + The newly added custom event + + + + Delete the myschedule whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Update the myschedule item. + + The schedule information + The original schedule + + + + Gets a news item entity by id + NOTE: Also a helper method, hence why it returns a StudentNews model + rather than a StudentNewsViewModel - must be casted as the latter in its own + controller + + The SNID (id of news item) + The news item + + + + Gets unapproved unexpired news submitted by user. + + username + Result of query + + + + Adds a news item record to storage. + + The news item to be added + username + The newly added Membership object + + + + (Service) Deletes a news item from the database + + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Service) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item's view model + The news item must be authored by the user and must not be expired and must be unapproved + + + + Helper method to verify that a given news item has not yet been approved + + The news item to verify + true if unapproved, otherwise throws some kind of meaningful exception + + + + Helper method to verify that a given news item has not expired + (see documentation for expiration definition) + + The news item to verify + true if unexpired, otherwise throws some kind of meaningful exception + + + + Helper method to validate a news item + + The news item to validate + True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Verifies that a student account exists + + The AD Username of the student + true if account exists, ResourceNotFoundException if null + + + + get student profile info + + username + StudentProfileViewModel if found, null if not found + + + + get faculty staff profile info + + username + FacultyStaffProfileViewModel if found, null if not found + + + + get alumni profile info + + username + AlumniProfileViewModel if found, null if not found + + + + get mailbox combination + + The current user's username + MailboxViewModel with the combination + + + + get a user's birthday + + The username of the person to get the birthdate of + Date the user's date of birth + + + + get advisors for particular student + + AD username + + + + Gets the clifton strengths of a particular user + The id of the user for which to retrieve info + Clifton strengths of the given user. + + + + Toggles the privacy of the Clifton Strengths data associated with the given id + + ID of the user whose Clifton Strengths privacy is toggled + The new privacy value + Thrown when the given ID doesn't match any Clifton Strengths rows + + + Gets the emergency contact information of a particular user + The username of the user for which to retrieve info + Emergency contact information of the given user. + + + + Get photo path for profile + + AD username + PhotoPathViewModel if found, null if not found + + + + Fetches a single profile whose username matches the username provided as an argument + + The username + ProfileViewModel if found, null if not found + + + + Sets the path for the profile image. + + AD Username + + + + + + Sets the path for the profile links. + + The username + + + + + + privacy setting of mobile phone. + + AD Username + Y or N + + + + mobile phone number setting + + The username for the user whose phone is to be updated + The new number to update the user's phone number to + + + + privacy setting user profile photo. + + AD Username + Y or N + + + + Fetch all upcoming ride items + + IEnumerable of ride items if found, null if not found + + + + Fetch the ride items a user is part of + + The ride id + ride items if found, null if not found + + + + Adds a new ride record to storage. + + The Save_Rides object to be added + The gordon_id of the user creating the ride + The newly added custom event + + + + Delete the ride whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Cancel the ride whose id is specified by the parameter. + + The ride id + The gordon id + The ride that was just deleted + + + + Adds a new booking record to storage. + + The Save_Bookings object to be added + The newly added custom event + + + + Delete the booking whose ids are specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. + + + + + privacy setting of schedule. + + AD Username + Y or N + + + + description of schedule. + + AD Username + New description + + + + Update timestamp of modification in schedule. + + AD Username + Modified Time + + + + Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. + + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the student + StudentScheduleViewModel if found, null if not found + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the instructor + StudentScheduleViewModel if found, null if not found + + + + Service class to facilitate data transactions between the Controller and the database model. + + + + + Get the session record whose sesssion code matches the parameter. + + The session code. + A SessionViewModel if found, null if not found. + + + + Fetches all the session records from the database. + + A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + get Student Employment records of given user + + AD Username of user to get employment + VictoryPromiseViewModel if found, null if not found + + + + get victory promise scores + + id + VictoryPromiseViewModel if found, null if not found + + + + Get the status of the user by id + + AD Username of the user to get the status of + The status of the user, a WellnessViewModel + + + + Stores wellness Status in database. + + AD Username of the user to post the status for + Status that is being posted, one of the WellnessStatusColors + Status that was successfully recorded + + + + gets the question for the wellness check from the back end + + A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. + + + + Creates an expiration date for a check in at the current time + + The time of the check in + When the check in should expire (the next 5AM). + + + + Service class for methods that are shared between all services. + + + + + Helper method that gets the current session we are in. + + The session code of the current session + + + + Deletes an image from the filesystem, if there is one. + + The path to which the image belonged. + + + + Takes an image path and returns the data of the image at that path. + If given path is null it returns an empty string. + + The path to the image + The base64 data of the image + + + + Uploads a news image + + + Takes base64 image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The base64 image data to be stored + The format to save the image as. Defaults to Jpeg + + + + Uploads image from HTTP FormFile + + + Takes image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The image data to be stored + + + + Takes a filepath for an image, navigates to it, collects the raw data + of the file and converts it to base64 format. + + The path to the image + The base64 content of the image + + + diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index 925c7e6ee..edaf41b6c 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,9 +1,11 @@ // This file has been auto generated by EF Core Power Tools. +using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Data.Common; using System.Linq; using System.Threading; @@ -30,6 +32,13 @@ public static async Task> SqlQueryAsync(this DbContext db, string sql return default; } } + + public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) + { + SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; + await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); + return (int)result.Value; + } } public class OutputParameter diff --git a/Gordon360/Services/AccountService.cs b/Gordon360/Services/AccountService.cs index c89aee35d..f806838a6 100644 --- a/Gordon360/Services/AccountService.cs +++ b/Gordon360/Services/AccountService.cs @@ -51,22 +51,6 @@ public IEnumerable GetAll() return (IEnumerable)_context.ACCOUNT; //Map the database model to a more presentable version (a ViewModel) } - /// - /// Fetches the account record with the specified email. - /// - /// The email address associated with the account. - /// the account id number - public string GetGordonIDFromEmail(string email) - { - var account = _context.ACCOUNT.FirstOrDefault(x => x.email == email); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } - - return account.gordon_id; - } - /// /// Fetches the account record with the specified email. /// diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index d6aac42be..3d36d403d 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -59,7 +59,6 @@ public interface IAccountService { AccountViewModel GetAccountByID(string id); IEnumerable GetAll(); - string GetGordonIDFromEmail(string email); AccountViewModel GetAccountByEmail(string email); AccountViewModel GetAccountByUsername(string username); IEnumerable AdvancedSearch(List accountTypes, From 9e34a28e49f10c23a6e1d4666cb5b55e810e7239 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 26 Sep 2022 10:21:13 -0400 Subject: [PATCH 13/49] force LF --- Gordon360/Documentation/Gordon360.xml | 4334 ++++++++++++------------- 1 file changed, 2167 insertions(+), 2167 deletions(-) diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index c06336c69..ce4203f89 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -1,2167 +1,2167 @@ - - - - Gordon360 - - - - - Get the username of the authenticated user - - The ClaimsPrincipal representing the user's authentication claims - Username of the authenticated user - - - Set emergency contacts for student - The contact data to be stored - The data stored - - - Sets the students cell phone number - The phone number object to be added to the database - The data stored - - - Sets the students race and ethinicity - The object containing the race numbers of the users - The data stored - - - Gets and returns the user's holds - The user's stored holds - - - Sets the user as having completed Academic Checkin - The HTTP status indicating whether the request was completed or not - - - Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in - The HTTP status indicating whether the request was completed and returns the check in status of the student - - - - Return a list of accounts matching some or all of searchString. - - The input to search for - All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameter. - - The firstname portion of the search - The lastname portion of the search - All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameters - We are searching through all the info of a user, then narrowing it down to get only what we want - - Which account types to search. Accepted values: "student", "alumni", "facstaff" - The first name to search for - The last name to search for - - - - - - - - - - All accounts meeting some or all of the parameter - - - Gets the activities taking place during a given session - The session identifier - A list of all activities that are active during the given session determined by the id parameter - Queries the database to find which activities are active during the session desired - - - Gets the different types of activities taking place during a given session - The session identifier - A list of all the different types of activities that are active during the given session determined by the id parameter - Queries the database to find the distinct activities type of activities that are active during the session desired - - - - Get the status (open or closed) of an activity for a given session - - The session code that we want to check the status for - - - - - - Get all the activities that have not yet been closed out for the current session - - - - - - Get all the activities that have not yet been closed out for the current session for - which a given user is the group admin - - The id of the user who is group admin - - - - - Get all the activities that are already closed out for the current session - - - - - - Get all the activities that are already closed out for the current session for - which a given user is group admin - - The id of the user who is group admin - - - - - - The code of the activity to update - The updated involvement details - - - - - Set an image for the activity - - The activity code - The image file - - - - - Reset the activity Image - - The activity code - - - - Update an existing activity to be private or not - The id of the activity - the boolean value - Calls the server to make a call and update the database with the changed information - - - - Pulls all states available from Jenzabar States Table - - - - - - Pulls all Countries available from Jenzabar Countries Table - - - - - - Get all admins - - - A list of all admins - - - Server makes call to the database and returns all admins - - - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - - Create a new admin to be added to database - The admin item containing all required and relevant information - - Posts a new admin to the server to be added into the database - - - Delete an existing admin - The identifier for the admin to be deleted - Calls the server to make a call and remove the given admin from the database - - - - Return a list majors. - - All majors - - - - Return a list minors. - - All minors - - - - Return a list minors. - - All minors - - - - Return a list states. - - All states - - - - Return a list countries. - - All countries - - - - Return a list departments. - - All departments - - - - Return a list buildings. - - All buildings - - - Get all the slider content for the dashboard slider - A list of all the slides for the slider - Queries the database for all entries in slider table - - - Get all the banner slides for the dashboard banner - A list of all the slides for the banner - - - Post a new slide for the dashboard banner - The posted banner - - - Remove a slide from the dashboard banner - ID of the slide to remove - - - - Gets information about student's dining plan and balance - - A DiningInfo object - - - - This makes use of our cached request to 25Live, which stores AllEvents - - - - - - Delete an application (and consequently all rows that reference it) - - The id of the application to remove - - - - - Get a list of the apartment-style halls - - - - - - Get apartment application ID number of currently logged in user if that user is on an existing application - - - - - - Get apartment application ID number for a user if that user is on an existing application - - username of the profile info - - - - - save application - - Returns the application ID number if all the queries succeeded - - - - update existing application (Differentiated by HttpPut instead of HttpPost) - - Returns the application ID number if all the queries succeeded - - - - change the editor (i.e. primary applicant) of the application - - The result of changing the editor - - - - change the date an application was submitted - (changes it from null the first time they submit) - - The result of changing the date submitted - - - Get apartment application info for a given application ID number - application ID number of the apartment application - Object of type ApartmentAppViewModel - - - Get apartment application info for all applications if the current user is a housing admin - Object of type ApartmentApplicationViewModel - - - - Get a user's active jobs - - The datetime that the shift started - The datetime that the shift ended - The user's active jobs - - - - Get a user's saved shifts - - The user's saved shifts - - - - Get a user's active jobs - - - The result of saving a shift - - - - Edit a shift - The details that will be changed - - - - - Get a user's active jobs - - The result of deleting the shift - - - - Submit shifts - - The result of submitting the shifts - - - - Gets the name of a supervisor based on their ID number - - The name of the supervisor - - - - sends the current clock in status to the back end - true if user is clocked in and false if clocked out - - detail to be saved in the back end, true if user just clocked in - returns confirmation that the answer was recorded - - - - gets the the clock in status from the back end - true if user is clocked in and false if clocked out - - ClockInViewModel - - - - deletes the last clocked in status of a user - - returns confirmation that clock in status was deleted - - - Create a new error log item to be added to database - The error message containing all required and relevant information - - Posts a new message to the service to be added into the database - - - Create a new error log item to be added to database - The error log containing the ERROR_TIME, and the LOG_MESSAGE - - Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - - Get all the memberships associated with a given activity - - The activity ID - Optional code of session to get for - IHttpActionResult - - - - Gets the group admin memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the leader-type memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the advisor-type memberships associated with a given activity. - - The activity ID. - A list of all advisor-type memberships for the specified activity. - - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - - - - Gets the number of followers of an activity - - The activity ID. - The session code - The number of followers of the activity - - - - Gets the number of members (excluding followers) of an activity - - The activity ID. - The session code - The number of members of the activity - - - Create a new membership item to be added to database - The membership item containing all required and relevant information - - Posts a new membership to the server to be added into the database - - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - - - Update an existing membership item - The membership id of whichever one is to be changed - The content within the membership that is to be changed and what it will change to - Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of - - - Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed - Calls the server to make a call and update the database with the changed information - - - Update an existing membership item to be private or not - The membership to toggle privacy on - Calls the server to make a call and update the database with the changed information - - - Delete an existing membership - The identifier for the membership to be deleted - Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check - - - - Gets all custom events for a user - - A IEnumerable of custom events - - - - Gets specific custom event for a user - - The requested custom event - - - - Gets all myschedule objects for a user - - A IEnumerable of myschedule objects - - - Create a new myschedule to be added to database - The myschedule item containing all required and relevant information - Created schedule - Posts a new myschedule to the server to be added into the database - - - Delete an existing myschedule item - The identifier for the myschedule to be deleted - Calls the server to make a call and remove the given myschedule from the database - - - Update the existing myschedule in database - The updated myschedule item containing all required and relevant information - Original schedule - Put a myschedule to the server to be updated - - - Gets a news item by id from the database - The id of the news item to retrieve - The news item - - - Gets the base64 image data for an image corresponding - to a student news item. Only used by GO; when we move student news approval - to 360, this will be removed. - The id of the news item to retrieve image from - base64 string representing image - - - Call the service that gets all approved student news entries not yet expired, filtering - out the expired by comparing 2 weeks past date entered to current date - - - Call the service that gets all new and approved student news entries - which have not already expired, - checking novelty by comparing an entry's date entered to 10am on the previous day - - - Call the service that gets the list of categories - - - Call the service that gets all unapproved student news entries (by a particular user) - not yet expired, filtering out the expired news - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Create a new news item to be added to the database - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Deletes a news item from the database - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Controller) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item - The news item must be authored by the user and must not be expired and must be unapproved - - - Get profile info of currently logged in user - - - - Get public profile info for a user - username of the profile info - - - - Get the advisor(s) of a particular student - - All advisors of the given student. For each advisor, - provides first name, last name, and username. - - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Toggle privacy of the current user's Clifton Strengths - New privacy value - - - Gets the emergency contact information of a particular user - The username for which to retrieve info - Emergency contact information of the given user. - - - Gets the mailbox information of currently logged in user - - - - Gets the date of birth of the current logged-in user - - - - Get the profile image of currently logged in user - - - - Get the profile image of the given user - The profile image(s) that the authenticated user is allowed to see, if any - - - - Set an image for profile - - - - - - Set an IDimage for a user - - - - - - Reset the profile Image - - - - - - Update the profile social media links - - The type of social media - The path of the links - - - - - Update mobile phone number - - phoneNumber - - - - - Update privacy of mobile phone number - - Y or N - - - - - Update privacy of profile image - - Y or N - - - - - Posts fields into CCT.dbo.Information_Change_Request - Sends Alumni Profile Update Email to "devrequest@gordon.edu" - - Object with Field's Name and Field's Value, unused Field's Label - - - - - Gets the profile image at the given path or, if that file does not exist, the 360 default profile image - - - Note that the 360 default profile image is different from a user's default image. - A given user's default image is simply their approved ID photo. - The 360 default profile image, on the other hand, is a stock image of Scottie Lion. - Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. - - Path to the profile image to load - - - - - Gets all Membership Request Objects - - List of all requests for membership - - - - Gets a specific Membership Request Object - - The ID of the membership request - A memberships request with the specified id - - - - Gets the memberships requests for the specified activity - - The activity code - All membership requests associated with the activity - - - - Gets the memberships requests for the person making the request - - All membership requests associated with the student - - - - Creates a new membership request - - The request to be added - The added request if successful. HTTP error message if not. - - - - Updates a membership request - - The membership request id - The updated membership request object - The updated request if successful. HTTP error message if not. - - - - Sets a membership request to Approved - - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. - - - - Deletes a membership request - - The id of the membership request to delete - The deleted object - - - - Gets all upcoming ride objects - - A IEnumerable of rides objects - - - - Gets all upcoming ride objects for a user - - A IEnumerable of rides objects - - - - Create new ride object for a user - - Successfully posted ride object - - - Cancel an existing ride item - The identifier for the ride to be cancel - Calls the server to make a call and remove the given ride from the database - - - Delete an existing ride item - The identifier for the ride to be deleted - Calls the server to make a call and remove the given ride from the database - - - - Create new booking object for a user - - Successfully posted booking object - - - Delete an existing booking item - The identifier for the booking to be deleted - Calls the server to make a call and remove the given booking from the database - - - - Get schedule information of logged in user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO: Use Service Layer - - - - - - Get schedule information of specific user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO Use Service Layer - - username - - - - - Update privacy of schedule - - Y or N - - - - - Update schedule description - - New description - - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Get whether the currently logged-in user can read student schedules - - Whether they can read student schedules - - - Get a list of all sessions - All sessions within the database - Queries the database for all sessions, current and past - - - Get one specific session specified by the id in the URL string - The identifier for one specific session - The information about one specific session - Queries the database regarding a specific session with the given identifier - - - - Gets the current active session - - - - - - Gets the days left in the current session - - - - - - Gets student employment information about the user - - A Student Employment Json - - - - Get the short git SHA-1 and build date for the backend - - "Git Hash: {hashCode}; Build Time: {date and time}" - - - - - Gets current victory promise scores - - A VP Json - - - - Enum representing three possible wellness statuses. - GREEN - Healthy, no known contact/symptoms - YELLOW - Symptomatic or cautionary hold - RED - Quarantine/Isolation - - - - - Gets wellness status of current user - - A WellnessViewModel representing the most recent status of the user - - - - Gets question for wellness check from the back end - - A WellnessQuestionViewModel - - - - Stores the user's wellness status - - The current status of the user to post, of type WellnessStatusColor - The status that was stored in the database - - - - Whether the user wants their strengths to be private (not shown to other users) - - - - - Gordon ID Number - - - - - a job's unique id number - - - - - Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of the match, followed by the matched field. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The search input to match against - The match key if search matched a field, or null - - - - Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The first name of the search input to match against - The last name of the search input to match against - The match key if first and last name both matched a field, or null - - - - Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. - - - - - Stores the emergency contact information of a particular user - The object that stores the contact info - The students id number - The stored data - - - - Create the notes value for the database to be passed in with the rest of the data. - The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international - - The mobile phone of the contact - The home phone of the contact - The formatted notes parameter to be passed to the database - - - Stores the cellphone preferences for the current user - The phone number object for the user - The id of the student to be updated - The stored data - - - Stores the demographic data (race and ethnicity) of the current user - The race and ethnicity data for the user - The id of the user to be updated - The stored data - - - Gets the holds of the user with the given ID - The id of the user whose holds are to be found - The stored data - - - Sets the user as having been checked in - The id of the user who is to be marked as checked in - - - Gets the whether the user has completed Academic Checkin - The id of the user for which the data is to be found for - - - Formats a phone number for insertion into the database - The phone number to be formatted - The formatted number - - - - Service Class that facilitates data transactions between the AccountsController and the Account database model. - - - - - Fetches a single account record whose id matches the id provided as an argument - - The person's gordon id - AccountViewModel if found, null if not found - - - - Fetches all the account records from storage. - - AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the first account object which matches the email - - - - Fetches the account record with the specified username. - - The AD username associated with the account. - the student account information - - - - Get basic info for all accounts - - BasicInfoViewModel of all accounts - - - - Get basic info for all accounts except alumni - - BasicInfoViewModel of all accounts except alumni - - - - Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. - ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) - Activity Info and ACtivity may be talked about interchangeably. - - - - - Fetches a single activity record whose id matches the id provided as an argument - - The activity code - ActivityViewModel if found, null if not found - - - - Fetches the Activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the Activity types of activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches all activity records from storage. - - ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Checks to see if a specified activity is still open for this session - Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table - When an activity is closed out, the END_DTE is set to the date on which the closing happened - Otherwise, the END_DTE for all memberships of the activity will be null for that session - - The activity code for the activity in question - Code of the session to check - - - - - Gets a collection of all the current open activities, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current activities already closed out, by finding which activities have - memberships with an END_DTE that is not null - - The collection of activity codes for open activities - - - - Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is not null - - The user's id - The session we want to get the closed activities for - The collection of activity codes for open activities - - - - Updates the Activity Info - - The activity info resource with the updated information - The id of the activity info to be updated - The updated activity info resource - - - - Closes out a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Open a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Updates the image for the spcefied involvement - - The involvement to update the image of - The new image - The involvement with the updated image path - - - - Reset the path for the activity image - - The activity code - - - - change activty privacy - - The activity code - activity private or not - - - - Service class to facilitate interacting with the Admin table. - - - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - - - Fetches the admin resource whose username matches the specified argument - - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. - - - - Fetches all the administrators from the database - - Returns a list of administrators. If no administrators were found, an empty list is returned. - - - - Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateAdmin() method. - - The admin to be added - The newly added Admin object - - - - Delete the admin whose id is specified by the parameter. - - The admin id - The admin that was just deleted - - - - Helper method to Validate an admin - - The admin to validate - True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - - - - Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. - - - - - Fetches the dashboard slider content from the database. - - If found, returns a set of SliderViewModel's, based on each slide entry in the db. - If not returns an empty IEnumerable. - - - - Retrieve all banner slides from the database - - An IEnumerable of the slides in the database - - - - Inserts a banner slide in the database and uploads the image to the local slider folder - - The slide to add - The url of the server that the image is being posted to. - This is needed to save the image path into the database. The URL is different depending on where the API is running. - The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. - - The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. - The inserted slide - - - - Deletes a banner slide from the database and deletes the local image file - - The deleted slide - - - - Service that allows for meal control - - - - - - - - - - - - - Get information about the selected plan for the student user - - Student's Gordon ID - Current Session Code - - - - - Service class to facilitate getting emails for members of an activity. - - - - - Get a list of the emails for all members in the activity during the current session. - - The code of the activity to get emails for. - Optionally, the session to get emails for. Defaults to the current session - The participation type to get emails of. If unspecified, gets emails of all participation types. - A list of emails (along with first and last name) associated with that activity - - - - Send a email to a list of email addresses - - All addresses to send this email to - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Send a email to members of an activity - - The activity code to send this email to - The session of activity to select members from - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. - - - - - Adds a new error log to storage. - - The error log to be added - The newly added error_log object - - - - Adds a new error log to storage, after creating the timestamp. - - The error message for the error log to be added - The newly added error_log object - - - - Service that allows for event control - - - - URL to retrieve events from the 25Live API. - event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). - All other event types are not appropiate for the 360 events feed. - end_after parameter limits the request to events from the current academic year. - state parameter fetches only confirmed events - - - - Access the memory stream created by the cached task and parse it into events - Splits events with multiple repeated occurrences into individual records for each occurrence - - All events for the current academic year. - - - - Select only events that are marked for Public promotion - - All Public Events - - - - Select only events that are Approved to give CLAW credit - - All CLAW Events - - - - Returns all attended events for a student in a specific term - - The student's AD Username - The current term - - - - - Helper function to determine the current academic year - - - - - - Calls a stored procedure that returns a row in the staff whitelist which has the given user id, - if it is in the whitelist - - The id of the person using the page - Whether or not the user is on the staff whitelist - - - - Deletes the application with given id, - removing all rows that reference it. - - The id of the application to delete - Whether or not this was successful - - - - Gets all names of apartment halls - - AN array of hall names - - - - Calls a stored procedure that tries to get the id of an the application that a given user is - applicant on for a given session - - The student username to look for - Session for which the application would be - - The id of the application or - null if the user is not on an application for that session - - - - - Get the editor ID of a given application ID - - The application ID for which the editor ID would be - - The id of the editor or - null if the user is a member but not an editor of a given application - - - - - Saves student housing info - - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp - - second, it retrieves the application id of the application with the information we just inserted (because - the database creates the application ID so we have to ask it which number it generated for it) - - third, it inserts each applicant into the applicants table along with the application ID so we know - which application on which they are an applicant - - - The current session code - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Edit an existings apartment application - - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username - - second, it gets an array of the applicants that are already stored in the database for the given application ID - - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database - - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array - - - The student username of the user who is attempting to save the apartment application (retrieved via authentication token) - The current session code - The application ID number of the application to be edited - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Changes the student user who has permission to edit the given application - - - Whether or not all the queries succeeded - - - application ID number of the apartment application - boolean indicating whether the current user is an admin, permits access to restricted information such as birth date - Apartment Application formatted for display in the UI - - - Array of ApartmentApplicationViewModels - - - - "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked - - The application ID number of the application to be submitted - Returns whether the query succeeded - - - - Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. - - - - - Service class to facilitate data transactions between the MembershipRequestController and the database - - - - - Generate a new request to join an activity at a participation level higher than 'Guest' - - The membership request object - The membership request object once it is added - - - - Approves the request with the specified ID. - - The ID of the request to be approved - The approved membership - - - - Delete the membershipRequest object whose id is given in the parameters - - The membership request id - A copy of the deleted membership request - - - - Denies the membership request object whose id is given in the parameters - - The membership request id - - - - - Get the membership request object whose Id is specified in the parameters. - - The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. - - - - Fetches all the membership request objects from the database. - - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this activity - - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this student - - The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Update an existing membership request object - - The membership request id - The newly modified membership request - - - - - Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - - - - - Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateMembership() method. - - The membership to be added - The newly added Membership object - - - - Delete the membership whose id is specified by the parameter. - - The membership id - The membership that was just deleted - - - - Fetch the membership whose id is specified by the parameter - - The membership id - MembershipViewModel if found, null if not found - - - - Fetches the memberships associated with the activity whose code is specified by the parameter. - - The activity code. - Optional code of session to get memberships for - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the leaders of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the advisors of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches all the membership information linked to the student whose id appears as a parameter. - - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int. - - - - Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int - - - - Updates the membership whose id is given as the first parameter to the contents of the second parameter. - - The updated membership. - The newly modified membership. - - - - Switches the group-admin property of the person whose membership id is given - - The corresponding membership object - The newly modified membership. - - - - Switches the privacy property of the person whose membership id is given - - The membership object passed. - The newly modified membership. - - - - Helper method to Validate a membership - - The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Determines whether or not the given user is a Group Admin of some activity - - Username of the user to check - true if student is a Group Admin, else false - - - - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. - - - - - Fetch the myschedule item whose id is specified by the parameter - - The myschedule id - AD Username - Myschedule if found, null if not found - - - - Fetch all myschedule items belonging to the given user - - The AD Username - Array of Myschedule if found, null if not found - - - - Adds a new mySchedule record to storage. - - The membership to be added - The newly added custom event - - - - Delete the myschedule whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Update the myschedule item. - - The schedule information - The original schedule - - - - Gets a news item entity by id - NOTE: Also a helper method, hence why it returns a StudentNews model - rather than a StudentNewsViewModel - must be casted as the latter in its own - controller - - The SNID (id of news item) - The news item - - - - Gets unapproved unexpired news submitted by user. - - username - Result of query - - - - Adds a news item record to storage. - - The news item to be added - username - The newly added Membership object - - - - (Service) Deletes a news item from the database - - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Service) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item's view model - The news item must be authored by the user and must not be expired and must be unapproved - - - - Helper method to verify that a given news item has not yet been approved - - The news item to verify - true if unapproved, otherwise throws some kind of meaningful exception - - - - Helper method to verify that a given news item has not expired - (see documentation for expiration definition) - - The news item to verify - true if unexpired, otherwise throws some kind of meaningful exception - - - - Helper method to validate a news item - - The news item to validate - True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Verifies that a student account exists - - The AD Username of the student - true if account exists, ResourceNotFoundException if null - - - - get student profile info - - username - StudentProfileViewModel if found, null if not found - - - - get faculty staff profile info - - username - FacultyStaffProfileViewModel if found, null if not found - - - - get alumni profile info - - username - AlumniProfileViewModel if found, null if not found - - - - get mailbox combination - - The current user's username - MailboxViewModel with the combination - - - - get a user's birthday - - The username of the person to get the birthdate of - Date the user's date of birth - - - - get advisors for particular student - - AD username - - - - Gets the clifton strengths of a particular user - The id of the user for which to retrieve info - Clifton strengths of the given user. - - - - Toggles the privacy of the Clifton Strengths data associated with the given id - - ID of the user whose Clifton Strengths privacy is toggled - The new privacy value - Thrown when the given ID doesn't match any Clifton Strengths rows - - - Gets the emergency contact information of a particular user - The username of the user for which to retrieve info - Emergency contact information of the given user. - - - - Get photo path for profile - - AD username - PhotoPathViewModel if found, null if not found - - - - Fetches a single profile whose username matches the username provided as an argument - - The username - ProfileViewModel if found, null if not found - - - - Sets the path for the profile image. - - AD Username - - - - - - Sets the path for the profile links. - - The username - - - - - - privacy setting of mobile phone. - - AD Username - Y or N - - - - mobile phone number setting - - The username for the user whose phone is to be updated - The new number to update the user's phone number to - - - - privacy setting user profile photo. - - AD Username - Y or N - - - - Fetch all upcoming ride items - - IEnumerable of ride items if found, null if not found - - - - Fetch the ride items a user is part of - - The ride id - ride items if found, null if not found - - - - Adds a new ride record to storage. - - The Save_Rides object to be added - The gordon_id of the user creating the ride - The newly added custom event - - - - Delete the ride whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Cancel the ride whose id is specified by the parameter. - - The ride id - The gordon id - The ride that was just deleted - - - - Adds a new booking record to storage. - - The Save_Bookings object to be added - The newly added custom event - - - - Delete the booking whose ids are specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. - - - - - privacy setting of schedule. - - AD Username - Y or N - - - - description of schedule. - - AD Username - New description - - - - Update timestamp of modification in schedule. - - AD Username - Modified Time - - - - Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. - - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the student - StudentScheduleViewModel if found, null if not found - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the instructor - StudentScheduleViewModel if found, null if not found - - - - Service class to facilitate data transactions between the Controller and the database model. - - - - - Get the session record whose sesssion code matches the parameter. - - The session code. - A SessionViewModel if found, null if not found. - - - - Fetches all the session records from the database. - - A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - get Student Employment records of given user - - AD Username of user to get employment - VictoryPromiseViewModel if found, null if not found - - - - get victory promise scores - - id - VictoryPromiseViewModel if found, null if not found - - - - Get the status of the user by id - - AD Username of the user to get the status of - The status of the user, a WellnessViewModel - - - - Stores wellness Status in database. - - AD Username of the user to post the status for - Status that is being posted, one of the WellnessStatusColors - Status that was successfully recorded - - - - gets the question for the wellness check from the back end - - A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. - - - - Creates an expiration date for a check in at the current time - - The time of the check in - When the check in should expire (the next 5AM). - - - - Service class for methods that are shared between all services. - - - - - Helper method that gets the current session we are in. - - The session code of the current session - - - - Deletes an image from the filesystem, if there is one. - - The path to which the image belonged. - - - - Takes an image path and returns the data of the image at that path. - If given path is null it returns an empty string. - - The path to the image - The base64 data of the image - - - - Uploads a news image - - - Takes base64 image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The base64 image data to be stored - The format to save the image as. Defaults to Jpeg - - - - Uploads image from HTTP FormFile - - - Takes image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The image data to be stored - - - - Takes a filepath for an image, navigates to it, collects the raw data - of the file and converts it to base64 format. - - The path to the image - The base64 content of the image - - - + + + + Gordon360 + + + + + Get the username of the authenticated user + + The ClaimsPrincipal representing the user's authentication claims + Username of the authenticated user + + + Set emergency contacts for student + The contact data to be stored + The data stored + + + Sets the students cell phone number + The phone number object to be added to the database + The data stored + + + Sets the students race and ethinicity + The object containing the race numbers of the users + The data stored + + + Gets and returns the user's holds + The user's stored holds + + + Sets the user as having completed Academic Checkin + The HTTP status indicating whether the request was completed or not + + + Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in + The HTTP status indicating whether the request was completed and returns the check in status of the student + + + + Return a list of accounts matching some or all of searchString. + + The input to search for + All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameter. + + The firstname portion of the search + The lastname portion of the search + All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameters + We are searching through all the info of a user, then narrowing it down to get only what we want + + Which account types to search. Accepted values: "student", "alumni", "facstaff" + The first name to search for + The last name to search for + + + + + + + + + + All accounts meeting some or all of the parameter + + + Gets the activities taking place during a given session + The session identifier + A list of all activities that are active during the given session determined by the id parameter + Queries the database to find which activities are active during the session desired + + + Gets the different types of activities taking place during a given session + The session identifier + A list of all the different types of activities that are active during the given session determined by the id parameter + Queries the database to find the distinct activities type of activities that are active during the session desired + + + + Get the status (open or closed) of an activity for a given session + + The session code that we want to check the status for + + + + + + Get all the activities that have not yet been closed out for the current session + + + + + + Get all the activities that have not yet been closed out for the current session for + which a given user is the group admin + + The id of the user who is group admin + + + + + Get all the activities that are already closed out for the current session + + + + + + Get all the activities that are already closed out for the current session for + which a given user is group admin + + The id of the user who is group admin + + + + + + The code of the activity to update + The updated involvement details + + + + + Set an image for the activity + + The activity code + The image file + + + + + Reset the activity Image + + The activity code + + + + Update an existing activity to be private or not + The id of the activity + the boolean value + Calls the server to make a call and update the database with the changed information + + + + Pulls all states available from Jenzabar States Table + + + + + + Pulls all Countries available from Jenzabar Countries Table + + + + + + Get all admins + + + A list of all admins + + + Server makes call to the database and returns all admins + + + + + Get a specific admin + + + The specific admin + + + Server makes call to the database and returns the specific admin + + + + Create a new admin to be added to database + The admin item containing all required and relevant information + + Posts a new admin to the server to be added into the database + + + Delete an existing admin + The identifier for the admin to be deleted + Calls the server to make a call and remove the given admin from the database + + + + Return a list majors. + + All majors + + + + Return a list minors. + + All minors + + + + Return a list minors. + + All minors + + + + Return a list states. + + All states + + + + Return a list countries. + + All countries + + + + Return a list departments. + + All departments + + + + Return a list buildings. + + All buildings + + + Get all the slider content for the dashboard slider + A list of all the slides for the slider + Queries the database for all entries in slider table + + + Get all the banner slides for the dashboard banner + A list of all the slides for the banner + + + Post a new slide for the dashboard banner + The posted banner + + + Remove a slide from the dashboard banner + ID of the slide to remove + + + + Gets information about student's dining plan and balance + + A DiningInfo object + + + + This makes use of our cached request to 25Live, which stores AllEvents + + + + + + Delete an application (and consequently all rows that reference it) + + The id of the application to remove + + + + + Get a list of the apartment-style halls + + + + + + Get apartment application ID number of currently logged in user if that user is on an existing application + + + + + + Get apartment application ID number for a user if that user is on an existing application + + username of the profile info + + + + + save application + + Returns the application ID number if all the queries succeeded + + + + update existing application (Differentiated by HttpPut instead of HttpPost) + + Returns the application ID number if all the queries succeeded + + + + change the editor (i.e. primary applicant) of the application + + The result of changing the editor + + + + change the date an application was submitted + (changes it from null the first time they submit) + + The result of changing the date submitted + + + Get apartment application info for a given application ID number + application ID number of the apartment application + Object of type ApartmentAppViewModel + + + Get apartment application info for all applications if the current user is a housing admin + Object of type ApartmentApplicationViewModel + + + + Get a user's active jobs + + The datetime that the shift started + The datetime that the shift ended + The user's active jobs + + + + Get a user's saved shifts + + The user's saved shifts + + + + Get a user's active jobs + + + The result of saving a shift + + + + Edit a shift + The details that will be changed + + + + + Get a user's active jobs + + The result of deleting the shift + + + + Submit shifts + + The result of submitting the shifts + + + + Gets the name of a supervisor based on their ID number + + The name of the supervisor + + + + sends the current clock in status to the back end + true if user is clocked in and false if clocked out + + detail to be saved in the back end, true if user just clocked in + returns confirmation that the answer was recorded + + + + gets the the clock in status from the back end + true if user is clocked in and false if clocked out + + ClockInViewModel + + + + deletes the last clocked in status of a user + + returns confirmation that clock in status was deleted + + + Create a new error log item to be added to database + The error message containing all required and relevant information + + Posts a new message to the service to be added into the database + + + Create a new error log item to be added to database + The error log containing the ERROR_TIME, and the LOG_MESSAGE + + Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy + + + + Get all the memberships associated with a given activity + + The activity ID + Optional code of session to get for + IHttpActionResult + + + + Gets the group admin memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the leader-type memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the advisor-type memberships associated with a given activity. + + The activity ID. + A list of all advisor-type memberships for the specified activity. + + + + Gets the number of followers of an activity + + The activity ID. + The number of followers of the activity + + + + Gets the number of members (besides followers) of an activity + + The activity ID. + The number of members of the activity + + + + Gets the number of followers of an activity + + The activity ID. + The session code + The number of followers of the activity + + + + Gets the number of members (excluding followers) of an activity + + The activity ID. + The session code + The number of members of the activity + + + Create a new membership item to be added to database + The membership item containing all required and relevant information + + Posts a new membership to the server to be added into the database + + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + + + Update an existing membership item + The membership id of whichever one is to be changed + The content within the membership that is to be changed and what it will change to + Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of + + + Update an existing membership item to be a group admin or not + /// The content within the membership that is to be changed + Calls the server to make a call and update the database with the changed information + + + Update an existing membership item to be private or not + The membership to toggle privacy on + Calls the server to make a call and update the database with the changed information + + + Delete an existing membership + The identifier for the membership to be deleted + Calls the server to make a call and remove the given membership from the database + + + + Determines whether or not the given student is a Group Admin of some activity + + The account username to check + + + + Gets all custom events for a user + + A IEnumerable of custom events + + + + Gets specific custom event for a user + + The requested custom event + + + + Gets all myschedule objects for a user + + A IEnumerable of myschedule objects + + + Create a new myschedule to be added to database + The myschedule item containing all required and relevant information + Created schedule + Posts a new myschedule to the server to be added into the database + + + Delete an existing myschedule item + The identifier for the myschedule to be deleted + Calls the server to make a call and remove the given myschedule from the database + + + Update the existing myschedule in database + The updated myschedule item containing all required and relevant information + Original schedule + Put a myschedule to the server to be updated + + + Gets a news item by id from the database + The id of the news item to retrieve + The news item + + + Gets the base64 image data for an image corresponding + to a student news item. Only used by GO; when we move student news approval + to 360, this will be removed. + The id of the news item to retrieve image from + base64 string representing image + + + Call the service that gets all approved student news entries not yet expired, filtering + out the expired by comparing 2 weeks past date entered to current date + + + Call the service that gets all new and approved student news entries + which have not already expired, + checking novelty by comparing an entry's date entered to 10am on the previous day + + + Call the service that gets the list of categories + + + Call the service that gets all unapproved student news entries (by a particular user) + not yet expired, filtering out the expired news + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Create a new news item to be added to the database + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Deletes a news item from the database + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Controller) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item + The news item must be authored by the user and must not be expired and must be unapproved + + + Get profile info of currently logged in user + + + + Get public profile info for a user + username of the profile info + + + + Get the advisor(s) of a particular student + + All advisors of the given student. For each advisor, + provides first name, last name, and username. + + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Toggle privacy of the current user's Clifton Strengths + New privacy value + + + Gets the emergency contact information of a particular user + The username for which to retrieve info + Emergency contact information of the given user. + + + Gets the mailbox information of currently logged in user + + + + Gets the date of birth of the current logged-in user + + + + Get the profile image of currently logged in user + + + + Get the profile image of the given user + The profile image(s) that the authenticated user is allowed to see, if any + + + + Set an image for profile + + + + + + Set an IDimage for a user + + + + + + Reset the profile Image + + + + + + Update the profile social media links + + The type of social media + The path of the links + + + + + Update mobile phone number + + phoneNumber + + + + + Update privacy of mobile phone number + + Y or N + + + + + Update privacy of profile image + + Y or N + + + + + Posts fields into CCT.dbo.Information_Change_Request + Sends Alumni Profile Update Email to "devrequest@gordon.edu" + + Object with Field's Name and Field's Value, unused Field's Label + + + + + Gets the profile image at the given path or, if that file does not exist, the 360 default profile image + + + Note that the 360 default profile image is different from a user's default image. + A given user's default image is simply their approved ID photo. + The 360 default profile image, on the other hand, is a stock image of Scottie Lion. + Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. + + Path to the profile image to load + + + + + Gets all Membership Request Objects + + List of all requests for membership + + + + Gets a specific Membership Request Object + + The ID of the membership request + A memberships request with the specified id + + + + Gets the memberships requests for the specified activity + + The activity code + All membership requests associated with the activity + + + + Gets the memberships requests for the person making the request + + All membership requests associated with the student + + + + Creates a new membership request + + The request to be added + The added request if successful. HTTP error message if not. + + + + Updates a membership request + + The membership request id + The updated membership request object + The updated request if successful. HTTP error message if not. + + + + Sets a membership request to Approved + + The id of the membership request in question. + If successful: THe updated membership request wrapped in an OK Http status code. + + + + Sets the membership request to Denied + + The id of the membership request in question. + If successful: The updated membership request wrapped in an OK Http status code. + + + + Deletes a membership request + + The id of the membership request to delete + The deleted object + + + + Gets all upcoming ride objects + + A IEnumerable of rides objects + + + + Gets all upcoming ride objects for a user + + A IEnumerable of rides objects + + + + Create new ride object for a user + + Successfully posted ride object + + + Cancel an existing ride item + The identifier for the ride to be cancel + Calls the server to make a call and remove the given ride from the database + + + Delete an existing ride item + The identifier for the ride to be deleted + Calls the server to make a call and remove the given ride from the database + + + + Create new booking object for a user + + Successfully posted booking object + + + Delete an existing booking item + The identifier for the booking to be deleted + Calls the server to make a call and remove the given booking from the database + + + + Get schedule information of logged in user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO: Use Service Layer + + + + + + Get schedule information of specific user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO Use Service Layer + + username + + + + + Update privacy of schedule + + Y or N + + + + + Update schedule description + + New description + + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Get whether the currently logged-in user can read student schedules + + Whether they can read student schedules + + + Get a list of all sessions + All sessions within the database + Queries the database for all sessions, current and past + + + Get one specific session specified by the id in the URL string + The identifier for one specific session + The information about one specific session + Queries the database regarding a specific session with the given identifier + + + + Gets the current active session + + + + + + Gets the days left in the current session + + + + + + Gets student employment information about the user + + A Student Employment Json + + + + Get the short git SHA-1 and build date for the backend + + "Git Hash: {hashCode}; Build Time: {date and time}" + + + + + Gets current victory promise scores + + A VP Json + + + + Enum representing three possible wellness statuses. + GREEN - Healthy, no known contact/symptoms + YELLOW - Symptomatic or cautionary hold + RED - Quarantine/Isolation + + + + + Gets wellness status of current user + + A WellnessViewModel representing the most recent status of the user + + + + Gets question for wellness check from the back end + + A WellnessQuestionViewModel + + + + Stores the user's wellness status + + The current status of the user to post, of type WellnessStatusColor + The status that was stored in the database + + + + Whether the user wants their strengths to be private (not shown to other users) + + + + + Gordon ID Number + + + + + a job's unique id number + + + + + Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of the match, followed by the matched field. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The search input to match against + The match key if search matched a field, or null + + + + Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The first name of the search input to match against + The last name of the search input to match against + The match key if first and last name both matched a field, or null + + + + Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. + + + + + Stores the emergency contact information of a particular user + The object that stores the contact info + The students id number + The stored data + + + + Create the notes value for the database to be passed in with the rest of the data. + The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international + + The mobile phone of the contact + The home phone of the contact + The formatted notes parameter to be passed to the database + + + Stores the cellphone preferences for the current user + The phone number object for the user + The id of the student to be updated + The stored data + + + Stores the demographic data (race and ethnicity) of the current user + The race and ethnicity data for the user + The id of the user to be updated + The stored data + + + Gets the holds of the user with the given ID + The id of the user whose holds are to be found + The stored data + + + Sets the user as having been checked in + The id of the user who is to be marked as checked in + + + Gets the whether the user has completed Academic Checkin + The id of the user for which the data is to be found for + + + Formats a phone number for insertion into the database + The phone number to be formatted + The formatted number + + + + Service Class that facilitates data transactions between the AccountsController and the Account database model. + + + + + Fetches a single account record whose id matches the id provided as an argument + + The person's gordon id + AccountViewModel if found, null if not found + + + + Fetches all the account records from storage. + + AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the first account object which matches the email + + + + Fetches the account record with the specified username. + + The AD username associated with the account. + the student account information + + + + Get basic info for all accounts + + BasicInfoViewModel of all accounts + + + + Get basic info for all accounts except alumni + + BasicInfoViewModel of all accounts except alumni + + + + Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. + ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) + Activity Info and ACtivity may be talked about interchangeably. + + + + + Fetches a single activity record whose id matches the id provided as an argument + + The activity code + ActivityViewModel if found, null if not found + + + + Fetches the Activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the Activity types of activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches all activity records from storage. + + ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Checks to see if a specified activity is still open for this session + Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table + When an activity is closed out, the END_DTE is set to the date on which the closing happened + Otherwise, the END_DTE for all memberships of the activity will be null for that session + + The activity code for the activity in question + Code of the session to check + + + + + Gets a collection of all the current open activities, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current activities already closed out, by finding which activities have + memberships with an END_DTE that is not null + + The collection of activity codes for open activities + + + + Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is not null + + The user's id + The session we want to get the closed activities for + The collection of activity codes for open activities + + + + Updates the Activity Info + + The activity info resource with the updated information + The id of the activity info to be updated + The updated activity info resource + + + + Closes out a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Open a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Updates the image for the spcefied involvement + + The involvement to update the image of + The new image + The involvement with the updated image path + + + + Reset the path for the activity image + + The activity code + + + + change activty privacy + + The activity code + activity private or not + + + + Service class to facilitate interacting with the Admin table. + + + + + Fetches the admin resource whose id is specified as an argument. + + The admin ID.l + The Specified administrator. If none was found, a null value is returned. + + + + Fetches the admin resource whose username matches the specified argument + + The administrator's gordon id + The Specified administrator. If none was found, a null value is returned. + + + + Fetches all the administrators from the database + + Returns a list of administrators. If no administrators were found, an empty list is returned. + + + + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateAdmin() method. + + The admin to be added + The newly added Admin object + + + + Delete the admin whose id is specified by the parameter. + + The admin id + The admin that was just deleted + + + + Helper method to Validate an admin + + The admin to validate + True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter + + + + Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. + + + + + Fetches the dashboard slider content from the database. + + If found, returns a set of SliderViewModel's, based on each slide entry in the db. + If not returns an empty IEnumerable. + + + + Retrieve all banner slides from the database + + An IEnumerable of the slides in the database + + + + Inserts a banner slide in the database and uploads the image to the local slider folder + + The slide to add + The url of the server that the image is being posted to. + This is needed to save the image path into the database. The URL is different depending on where the API is running. + The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. + + The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. + The inserted slide + + + + Deletes a banner slide from the database and deletes the local image file + + The deleted slide + + + + Service that allows for meal control + + + + + + + + + + + + + Get information about the selected plan for the student user + + Student's Gordon ID + Current Session Code + + + + + Service class to facilitate getting emails for members of an activity. + + + + + Get a list of the emails for all members in the activity during the current session. + + The code of the activity to get emails for. + Optionally, the session to get emails for. Defaults to the current session + The participation type to get emails of. If unspecified, gets emails of all participation types. + A list of emails (along with first and last name) associated with that activity + + + + Send a email to a list of email addresses + + All addresses to send this email to + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Send a email to members of an activity + + The activity code to send this email to + The session of activity to select members from + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. + + + + + Adds a new error log to storage. + + The error log to be added + The newly added error_log object + + + + Adds a new error log to storage, after creating the timestamp. + + The error message for the error log to be added + The newly added error_log object + + + + Service that allows for event control + + + + URL to retrieve events from the 25Live API. + event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). + All other event types are not appropiate for the 360 events feed. + end_after parameter limits the request to events from the current academic year. + state parameter fetches only confirmed events + + + + Access the memory stream created by the cached task and parse it into events + Splits events with multiple repeated occurrences into individual records for each occurrence + + All events for the current academic year. + + + + Select only events that are marked for Public promotion + + All Public Events + + + + Select only events that are Approved to give CLAW credit + + All CLAW Events + + + + Returns all attended events for a student in a specific term + + The student's AD Username + The current term + + + + + Helper function to determine the current academic year + + + + + + Calls a stored procedure that returns a row in the staff whitelist which has the given user id, + if it is in the whitelist + + The id of the person using the page + Whether or not the user is on the staff whitelist + + + + Deletes the application with given id, + removing all rows that reference it. + + The id of the application to delete + Whether or not this was successful + + + + Gets all names of apartment halls + + AN array of hall names + + + + Calls a stored procedure that tries to get the id of an the application that a given user is + applicant on for a given session + + The student username to look for + Session for which the application would be + + The id of the application or + null if the user is not on an application for that session + + + + + Get the editor ID of a given application ID + + The application ID for which the editor ID would be + + The id of the editor or + null if the user is a member but not an editor of a given application + + + + + Saves student housing info + - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp + - second, it retrieves the application id of the application with the information we just inserted (because + the database creates the application ID so we have to ask it which number it generated for it) + - third, it inserts each applicant into the applicants table along with the application ID so we know + which application on which they are an applicant + + + The current session code + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Edit an existings apartment application + - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username + - second, it gets an array of the applicants that are already stored in the database for the given application ID + - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database + - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array + + + The student username of the user who is attempting to save the apartment application (retrieved via authentication token) + The current session code + The application ID number of the application to be edited + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Changes the student user who has permission to edit the given application + + + Whether or not all the queries succeeded + + + application ID number of the apartment application + boolean indicating whether the current user is an admin, permits access to restricted information such as birth date + Apartment Application formatted for display in the UI + + + Array of ApartmentApplicationViewModels + + + + "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked + + The application ID number of the application to be submitted + Returns whether the query succeeded + + + + Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. + + + + + Service class to facilitate data transactions between the MembershipRequestController and the database + + + + + Generate a new request to join an activity at a participation level higher than 'Guest' + + The membership request object + The membership request object once it is added + + + + Approves the request with the specified ID. + + The ID of the request to be approved + The approved membership + + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + + + + Denies the membership request object whose id is given in the parameters + + The membership request id + + + + + Get the membership request object whose Id is specified in the parameters. + + The membership request id + If found, returns MembershipRequestViewModel. If not found, returns null. + + + + Fetches all the membership request objects from the database. + + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this activity + + The activity id + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this student + + The AD Username of the user + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Update an existing membership request object + + The membership request id + The newly modified membership request + + + + + Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + + + + + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateMembership() method. + + The membership to be added + The newly added Membership object + + + + Delete the membership whose id is specified by the parameter. + + The membership id + The membership that was just deleted + + + + Fetch the membership whose id is specified by the parameter + + The membership id + MembershipViewModel if found, null if not found + + + + Fetches the memberships associated with the activity whose code is specified by the parameter. + + The activity code. + Optional code of session to get memberships for + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the leaders of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the advisors of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches all the membership information linked to the student whose id appears as a parameter. + + The student's AD Username. + A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the number of followers associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of memberships associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int. + + + + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int + + + + Updates the membership whose id is given as the first parameter to the contents of the second parameter. + + The updated membership. + The newly modified membership. + + + + Switches the group-admin property of the person whose membership id is given + + The corresponding membership object + The newly modified membership. + + + + Switches the privacy property of the person whose membership id is given + + The membership object passed. + The newly modified membership. + + + + Helper method to Validate a membership + + The membership to validate + True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Determines whether or not the given user is a Group Admin of some activity + + Username of the user to check + true if student is a Group Admin, else false + + + + Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. + + + + + Fetch the myschedule item whose id is specified by the parameter + + The myschedule id + AD Username + Myschedule if found, null if not found + + + + Fetch all myschedule items belonging to the given user + + The AD Username + Array of Myschedule if found, null if not found + + + + Adds a new mySchedule record to storage. + + The membership to be added + The newly added custom event + + + + Delete the myschedule whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Update the myschedule item. + + The schedule information + The original schedule + + + + Gets a news item entity by id + NOTE: Also a helper method, hence why it returns a StudentNews model + rather than a StudentNewsViewModel - must be casted as the latter in its own + controller + + The SNID (id of news item) + The news item + + + + Gets unapproved unexpired news submitted by user. + + username + Result of query + + + + Adds a news item record to storage. + + The news item to be added + username + The newly added Membership object + + + + (Service) Deletes a news item from the database + + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Service) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item's view model + The news item must be authored by the user and must not be expired and must be unapproved + + + + Helper method to verify that a given news item has not yet been approved + + The news item to verify + true if unapproved, otherwise throws some kind of meaningful exception + + + + Helper method to verify that a given news item has not expired + (see documentation for expiration definition) + + The news item to verify + true if unexpired, otherwise throws some kind of meaningful exception + + + + Helper method to validate a news item + + The news item to validate + True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Verifies that a student account exists + + The AD Username of the student + true if account exists, ResourceNotFoundException if null + + + + get student profile info + + username + StudentProfileViewModel if found, null if not found + + + + get faculty staff profile info + + username + FacultyStaffProfileViewModel if found, null if not found + + + + get alumni profile info + + username + AlumniProfileViewModel if found, null if not found + + + + get mailbox combination + + The current user's username + MailboxViewModel with the combination + + + + get a user's birthday + + The username of the person to get the birthdate of + Date the user's date of birth + + + + get advisors for particular student + + AD username + + + + Gets the clifton strengths of a particular user + The id of the user for which to retrieve info + Clifton strengths of the given user. + + + + Toggles the privacy of the Clifton Strengths data associated with the given id + + ID of the user whose Clifton Strengths privacy is toggled + The new privacy value + Thrown when the given ID doesn't match any Clifton Strengths rows + + + Gets the emergency contact information of a particular user + The username of the user for which to retrieve info + Emergency contact information of the given user. + + + + Get photo path for profile + + AD username + PhotoPathViewModel if found, null if not found + + + + Fetches a single profile whose username matches the username provided as an argument + + The username + ProfileViewModel if found, null if not found + + + + Sets the path for the profile image. + + AD Username + + + + + + Sets the path for the profile links. + + The username + + + + + + privacy setting of mobile phone. + + AD Username + Y or N + + + + mobile phone number setting + + The username for the user whose phone is to be updated + The new number to update the user's phone number to + + + + privacy setting user profile photo. + + AD Username + Y or N + + + + Fetch all upcoming ride items + + IEnumerable of ride items if found, null if not found + + + + Fetch the ride items a user is part of + + The ride id + ride items if found, null if not found + + + + Adds a new ride record to storage. + + The Save_Rides object to be added + The gordon_id of the user creating the ride + The newly added custom event + + + + Delete the ride whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Cancel the ride whose id is specified by the parameter. + + The ride id + The gordon id + The ride that was just deleted + + + + Adds a new booking record to storage. + + The Save_Bookings object to be added + The newly added custom event + + + + Delete the booking whose ids are specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. + + + + + privacy setting of schedule. + + AD Username + Y or N + + + + description of schedule. + + AD Username + New description + + + + Update timestamp of modification in schedule. + + AD Username + Modified Time + + + + Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. + + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the student + StudentScheduleViewModel if found, null if not found + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the instructor + StudentScheduleViewModel if found, null if not found + + + + Service class to facilitate data transactions between the Controller and the database model. + + + + + Get the session record whose sesssion code matches the parameter. + + The session code. + A SessionViewModel if found, null if not found. + + + + Fetches all the session records from the database. + + A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + get Student Employment records of given user + + AD Username of user to get employment + VictoryPromiseViewModel if found, null if not found + + + + get victory promise scores + + id + VictoryPromiseViewModel if found, null if not found + + + + Get the status of the user by id + + AD Username of the user to get the status of + The status of the user, a WellnessViewModel + + + + Stores wellness Status in database. + + AD Username of the user to post the status for + Status that is being posted, one of the WellnessStatusColors + Status that was successfully recorded + + + + gets the question for the wellness check from the back end + + A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. + + + + Creates an expiration date for a check in at the current time + + The time of the check in + When the check in should expire (the next 5AM). + + + + Service class for methods that are shared between all services. + + + + + Helper method that gets the current session we are in. + + The session code of the current session + + + + Deletes an image from the filesystem, if there is one. + + The path to which the image belonged. + + + + Takes an image path and returns the data of the image at that path. + If given path is null it returns an empty string. + + The path to the image + The base64 data of the image + + + + Uploads a news image + + + Takes base64 image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The base64 image data to be stored + The format to save the image as. Defaults to Jpeg + + + + Uploads image from HTTP FormFile + + + Takes image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The image data to be stored + + + + Takes a filepath for an image, navigates to it, collects the raw data + of the file and converts it to base64 format. + + The path to the image + The base64 content of the image + + + From 5c2621b8d50406ea01973e258c490b9d6e26cbb2 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Thu, 29 Sep 2022 14:53:40 -0400 Subject: [PATCH 14/49] Save progress --- Gordon360/Authorization/StateYourBusiness.cs | 16 +- .../Controllers/MembershipsController.cs | 46 +- Gordon360/Documentation/Gordon360.xml | 4355 +++++++++-------- Gordon360/Models/CCT/Context/CCTContext.cs | 10 +- .../Models/CCT/Context/DbContextExtensions.cs | 9 - Gordon360/Models/CCT/InvolvementOffering.cs | 10 +- .../ViewModels/MembershipUploadViewModel.cs | 2 +- Gordon360/Services/MembershipService.cs | 59 +- Gordon360/Services/ServiceInterfaces.cs | 13 +- 9 files changed, 2287 insertions(+), 2233 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index b94961133..e11d4d8a6 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -171,8 +171,7 @@ private async Task CanReadOneAsync(string resource) if (is_mrOwner) // If user owns the request return true; - var activityCode = mrToConsider.ActivityCode; - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(mrToConsider.ActivityCode, mrToConsider.SessionCode)).Any(x => x.Username == user_name); if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; @@ -258,7 +257,7 @@ private async Task CanReadPartialAsync(string resource) case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: { - // An activity leader should be able to see the membership requests that belong to the activity he is leading. + // An activity leader should be able to see the membership requests that belong to the activity s/he is leading. var activityCode = (string)context.ActionArguments["id"]; var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); @@ -424,8 +423,9 @@ private async Task CanAddAsync(string resource) return true; var activityCode = membershipToConsider.ACT_CDE; + var sessionCode = membershipToConsider.SESS_CDE; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username == user_name); if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. return true; return false; @@ -497,9 +497,10 @@ private async Task CanUpdateAsync(string resource) return true; var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; var activityCode = membershipToConsider.ACT_CDE; + var sessionCode = membershipToConsider.SESS_CDE; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username == user_name); if (isGroupAdmin) return true; // Activity Advisors can update memberships of people in their activity. @@ -536,10 +537,7 @@ private async Task CanUpdateAsync(string resource) return true; var activityCode = membershipToConsider.ActivityCode; - - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(activityCode)).Any(x => x.Username == user_name); - if (isGroupAdmin) - return true; + var sessionCode = membershipToConsider.SessionCode; return false; } diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 3e75ef0c4..d7a3b7240 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -32,7 +32,7 @@ public MembershipsController(CCTContext context, IActivityService activityServic /// Optional code of session to get for /// IHttpActionResult [HttpGet] - [Route("activity/{activityCode}")] + [Route("activities/{activityCode}/sessions/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) { @@ -50,11 +50,11 @@ public ActionResult> GetMembershipsForActivity( /// The activity ID. /// A list of all leader-type memberships for the specified activity. [HttpGet] - [Route("activity/{activityCode}/group-admin")] + [Route("activities/{activityCode}/sessions/{sessionCode}/group-admins")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] - public ActionResult> GetGroupAdminForActivity(string activityCode) + public ActionResult> GetGroupAdminForActivity(string activityCode, string sessionCode) { - var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode); if (result == null) { @@ -107,7 +107,7 @@ public ActionResult> GetAdvisorsForActivityAsyn /// The activity ID. /// The number of followers of the activity [HttpGet] - [Route("activity/{activityCode}/followers")] + [Route("activities/{activityCode}/followers")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] public ActionResult GetActivityFollowersCount(string activityCode) { @@ -122,7 +122,7 @@ public ActionResult GetActivityFollowersCount(string activityCode) /// The activity ID. /// The number of members of the activity [HttpGet] - [Route("activity/{activityCode}/members")] + [Route("activities/{activityCode}/members")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] public ActionResult GetActivityMembersCount(string activityCode) { @@ -138,11 +138,11 @@ public ActionResult GetActivityMembersCount(string activityCode) /// The session code /// The number of followers of the activity [HttpGet] - [Route("activity/{activityCode}/followers/{sessionCode}")] + [Route("activities/{activityCode}/sessions/{sessionCode}/subscriber-count")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCountForSession(string activityCode, string sessionCode) + public ActionResult GetActivitySubscribersCountForSession(string activityCode, string sessionCode) { - var result = _membershipService.GetActivityFollowersCountForSession(activityCode, sessionCode); + var result = _membershipService.GetActivitySubscribersCountForSession(activityCode, sessionCode); return Ok(result); } @@ -154,7 +154,7 @@ public ActionResult GetActivityFollowersCountForSession(string activityCode /// The session code /// The number of members of the activity [HttpGet] - [Route("activity/{activityCode}/members/{sessionCode}")] + [Route("activity/{activityCode}/sessions/{sessionCode}/member-count")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) { @@ -197,11 +197,11 @@ public async Task> PostAsync([FromBody] MembershipU /// /// The Student Username /// The membership information that the student is a part of - [Route("student/{username}")] + [Route("{username}")] [HttpGet] - public ActionResult> GetMembershipsForStudentByUsername(string username) + public ActionResult> GetMembershipsByUser(string username) { - var result = _membershipService.GetMembershipsForStudent(username); + var result = _membershipService.GetMembershipsByUser(username); if (result == null) { @@ -215,25 +215,25 @@ public ActionResult> GetMembershipsForStudentByUsername(str return Ok(result); else { - List list = new List(); - foreach (var item in result) + List visibleMemberships = new List(); + foreach (var thisMembership in result) { - var act = _activityService.Get(item.ActivityCode); - if (!(act.Privacy == true || item.Privacy == true)) + var act = _activityService.Get(thisMembership.ActivityCode); + if (!(act.Privacy == true || thisMembership.Privacy == true)) { - list.Add(item); + visibleMemberships.Add(thisMembership); } else { // If the current authenticated user is an admin of this group, then include the membership - var admins = _membershipService.GetGroupAdminMembershipsForActivity(item.ActivityCode); + var admins = _membershipService.GetGroupAdminMembershipsForActivity(thisMembership.ActivityCode, thisMembership.SessionCode); if (admins.Any(a => a.Username == authenticatedUserUsername)) { - list.Add(item); + visibleMemberships.Add(thisMembership); } } } - return Ok(list); + return Ok(visibleMemberships); } } @@ -278,9 +278,9 @@ public async Task> SetGroupAdminAsync(int membershi /// The membership to toggle privacy on /// Calls the server to make a call and update the database with the changed information [HttpPut] - [Route("{membershipID}/privacy/{isPrivate}")] + [Route("{membershipID}/privacy")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] - public async Task> SetPrivacyAsync(int membershipID, bool isPrivate) + public async Task> SetPrivacyAsync(int membershipID, [FromBody] bool isPrivate) { var updatedMembership = await _membershipService.SetPrivacyAsync(membershipID, isPrivate); diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index ce4203f89..801f67588 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -1,2167 +1,2188 @@ - - - - Gordon360 - - - - - Get the username of the authenticated user - - The ClaimsPrincipal representing the user's authentication claims - Username of the authenticated user - - - Set emergency contacts for student - The contact data to be stored - The data stored - - - Sets the students cell phone number - The phone number object to be added to the database - The data stored - - - Sets the students race and ethinicity - The object containing the race numbers of the users - The data stored - - - Gets and returns the user's holds - The user's stored holds - - - Sets the user as having completed Academic Checkin - The HTTP status indicating whether the request was completed or not - - - Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in - The HTTP status indicating whether the request was completed and returns the check in status of the student - - - - Return a list of accounts matching some or all of searchString. - - The input to search for - All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameter. - - The firstname portion of the search - The lastname portion of the search - All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. - - - - Return a list of accounts matching some or all of the search parameters - We are searching through all the info of a user, then narrowing it down to get only what we want - - Which account types to search. Accepted values: "student", "alumni", "facstaff" - The first name to search for - The last name to search for - - - - - - - - - - All accounts meeting some or all of the parameter - - - Gets the activities taking place during a given session - The session identifier - A list of all activities that are active during the given session determined by the id parameter - Queries the database to find which activities are active during the session desired - - - Gets the different types of activities taking place during a given session - The session identifier - A list of all the different types of activities that are active during the given session determined by the id parameter - Queries the database to find the distinct activities type of activities that are active during the session desired - - - - Get the status (open or closed) of an activity for a given session - - The session code that we want to check the status for - - - - - - Get all the activities that have not yet been closed out for the current session - - - - - - Get all the activities that have not yet been closed out for the current session for - which a given user is the group admin - - The id of the user who is group admin - - - - - Get all the activities that are already closed out for the current session - - - - - - Get all the activities that are already closed out for the current session for - which a given user is group admin - - The id of the user who is group admin - - - - - - The code of the activity to update - The updated involvement details - - - - - Set an image for the activity - - The activity code - The image file - - - - - Reset the activity Image - - The activity code - - - - Update an existing activity to be private or not - The id of the activity - the boolean value - Calls the server to make a call and update the database with the changed information - - - - Pulls all states available from Jenzabar States Table - - - - - - Pulls all Countries available from Jenzabar Countries Table - - - - - - Get all admins - - - A list of all admins - - - Server makes call to the database and returns all admins - - - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - - Create a new admin to be added to database - The admin item containing all required and relevant information - - Posts a new admin to the server to be added into the database - - - Delete an existing admin - The identifier for the admin to be deleted - Calls the server to make a call and remove the given admin from the database - - - - Return a list majors. - - All majors - - - - Return a list minors. - - All minors - - - - Return a list minors. - - All minors - - - - Return a list states. - - All states - - - - Return a list countries. - - All countries - - - - Return a list departments. - - All departments - - - - Return a list buildings. - - All buildings - - - Get all the slider content for the dashboard slider - A list of all the slides for the slider - Queries the database for all entries in slider table - - - Get all the banner slides for the dashboard banner - A list of all the slides for the banner - - - Post a new slide for the dashboard banner - The posted banner - - - Remove a slide from the dashboard banner - ID of the slide to remove - - - - Gets information about student's dining plan and balance - - A DiningInfo object - - - - This makes use of our cached request to 25Live, which stores AllEvents - - - - - - Delete an application (and consequently all rows that reference it) - - The id of the application to remove - - - - - Get a list of the apartment-style halls - - - - - - Get apartment application ID number of currently logged in user if that user is on an existing application - - - - - - Get apartment application ID number for a user if that user is on an existing application - - username of the profile info - - - - - save application - - Returns the application ID number if all the queries succeeded - - - - update existing application (Differentiated by HttpPut instead of HttpPost) - - Returns the application ID number if all the queries succeeded - - - - change the editor (i.e. primary applicant) of the application - - The result of changing the editor - - - - change the date an application was submitted - (changes it from null the first time they submit) - - The result of changing the date submitted - - - Get apartment application info for a given application ID number - application ID number of the apartment application - Object of type ApartmentAppViewModel - - - Get apartment application info for all applications if the current user is a housing admin - Object of type ApartmentApplicationViewModel - - - - Get a user's active jobs - - The datetime that the shift started - The datetime that the shift ended - The user's active jobs - - - - Get a user's saved shifts - - The user's saved shifts - - - - Get a user's active jobs - - - The result of saving a shift - - - - Edit a shift - The details that will be changed - - - - - Get a user's active jobs - - The result of deleting the shift - - - - Submit shifts - - The result of submitting the shifts - - - - Gets the name of a supervisor based on their ID number - - The name of the supervisor - - - - sends the current clock in status to the back end - true if user is clocked in and false if clocked out - - detail to be saved in the back end, true if user just clocked in - returns confirmation that the answer was recorded - - - - gets the the clock in status from the back end - true if user is clocked in and false if clocked out - - ClockInViewModel - - - - deletes the last clocked in status of a user - - returns confirmation that clock in status was deleted - - - Create a new error log item to be added to database - The error message containing all required and relevant information - - Posts a new message to the service to be added into the database - - - Create a new error log item to be added to database - The error log containing the ERROR_TIME, and the LOG_MESSAGE - - Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy - - - - Get all the memberships associated with a given activity - - The activity ID - Optional code of session to get for - IHttpActionResult - - - - Gets the group admin memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the leader-type memberships associated with a given activity. - - The activity ID. - A list of all leader-type memberships for the specified activity. - - - - Gets the advisor-type memberships associated with a given activity. - - The activity ID. - A list of all advisor-type memberships for the specified activity. - - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - - - - Gets the number of followers of an activity - - The activity ID. - The session code - The number of followers of the activity - - - - Gets the number of members (excluding followers) of an activity - - The activity ID. - The session code - The number of members of the activity - - - Create a new membership item to be added to database - The membership item containing all required and relevant information - - Posts a new membership to the server to be added into the database - - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - - - Update an existing membership item - The membership id of whichever one is to be changed - The content within the membership that is to be changed and what it will change to - Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of - - - Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed - Calls the server to make a call and update the database with the changed information - - - Update an existing membership item to be private or not - The membership to toggle privacy on - Calls the server to make a call and update the database with the changed information - - - Delete an existing membership - The identifier for the membership to be deleted - Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check - - - - Gets all custom events for a user - - A IEnumerable of custom events - - - - Gets specific custom event for a user - - The requested custom event - - - - Gets all myschedule objects for a user - - A IEnumerable of myschedule objects - - - Create a new myschedule to be added to database - The myschedule item containing all required and relevant information - Created schedule - Posts a new myschedule to the server to be added into the database - - - Delete an existing myschedule item - The identifier for the myschedule to be deleted - Calls the server to make a call and remove the given myschedule from the database - - - Update the existing myschedule in database - The updated myschedule item containing all required and relevant information - Original schedule - Put a myschedule to the server to be updated - - - Gets a news item by id from the database - The id of the news item to retrieve - The news item - - - Gets the base64 image data for an image corresponding - to a student news item. Only used by GO; when we move student news approval - to 360, this will be removed. - The id of the news item to retrieve image from - base64 string representing image - - - Call the service that gets all approved student news entries not yet expired, filtering - out the expired by comparing 2 weeks past date entered to current date - - - Call the service that gets all new and approved student news entries - which have not already expired, - checking novelty by comparing an entry's date entered to 10am on the previous day - - - Call the service that gets the list of categories - - - Call the service that gets all unapproved student news entries (by a particular user) - not yet expired, filtering out the expired news - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Create a new news item to be added to the database - @TODO: Remove redundant username/id from this and service - @TODO: fix documentation comments - - - Deletes a news item from the database - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Controller) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item - The news item must be authored by the user and must not be expired and must be unapproved - - - Get profile info of currently logged in user - - - - Get public profile info for a user - username of the profile info - - - - Get the advisor(s) of a particular student - - All advisors of the given student. For each advisor, - provides first name, last name, and username. - - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Gets the clifton strengths of a particular user - The username for which to retrieve info - Clifton strengths of the given user. - - - Toggle privacy of the current user's Clifton Strengths - New privacy value - - - Gets the emergency contact information of a particular user - The username for which to retrieve info - Emergency contact information of the given user. - - - Gets the mailbox information of currently logged in user - - - - Gets the date of birth of the current logged-in user - - - - Get the profile image of currently logged in user - - - - Get the profile image of the given user - The profile image(s) that the authenticated user is allowed to see, if any - - - - Set an image for profile - - - - - - Set an IDimage for a user - - - - - - Reset the profile Image - - - - - - Update the profile social media links - - The type of social media - The path of the links - - - - - Update mobile phone number - - phoneNumber - - - - - Update privacy of mobile phone number - - Y or N - - - - - Update privacy of profile image - - Y or N - - - - - Posts fields into CCT.dbo.Information_Change_Request - Sends Alumni Profile Update Email to "devrequest@gordon.edu" - - Object with Field's Name and Field's Value, unused Field's Label - - - - - Gets the profile image at the given path or, if that file does not exist, the 360 default profile image - - - Note that the 360 default profile image is different from a user's default image. - A given user's default image is simply their approved ID photo. - The 360 default profile image, on the other hand, is a stock image of Scottie Lion. - Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. - - Path to the profile image to load - - - - - Gets all Membership Request Objects - - List of all requests for membership - - - - Gets a specific Membership Request Object - - The ID of the membership request - A memberships request with the specified id - - - - Gets the memberships requests for the specified activity - - The activity code - All membership requests associated with the activity - - - - Gets the memberships requests for the person making the request - - All membership requests associated with the student - - - - Creates a new membership request - - The request to be added - The added request if successful. HTTP error message if not. - - - - Updates a membership request - - The membership request id - The updated membership request object - The updated request if successful. HTTP error message if not. - - - - Sets a membership request to Approved - - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. - - - - Deletes a membership request - - The id of the membership request to delete - The deleted object - - - - Gets all upcoming ride objects - - A IEnumerable of rides objects - - - - Gets all upcoming ride objects for a user - - A IEnumerable of rides objects - - - - Create new ride object for a user - - Successfully posted ride object - - - Cancel an existing ride item - The identifier for the ride to be cancel - Calls the server to make a call and remove the given ride from the database - - - Delete an existing ride item - The identifier for the ride to be deleted - Calls the server to make a call and remove the given ride from the database - - - - Create new booking object for a user - - Successfully posted booking object - - - Delete an existing booking item - The identifier for the booking to be deleted - Calls the server to make a call and remove the given booking from the database - - - - Get schedule information of logged in user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO: Use Service Layer - - - - - - Get schedule information of specific user - Info one gets: privacy, time last updated, description, and Gordon ID - @TODO Use Service Layer - - username - - - - - Update privacy of schedule - - Y or N - - - - - Update schedule description - - New description - - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Gets all schedule objects for a user - - A IEnumerable of schedule objects - - - - Get whether the currently logged-in user can read student schedules - - Whether they can read student schedules - - - Get a list of all sessions - All sessions within the database - Queries the database for all sessions, current and past - - - Get one specific session specified by the id in the URL string - The identifier for one specific session - The information about one specific session - Queries the database regarding a specific session with the given identifier - - - - Gets the current active session - - - - - - Gets the days left in the current session - - - - - - Gets student employment information about the user - - A Student Employment Json - - - - Get the short git SHA-1 and build date for the backend - - "Git Hash: {hashCode}; Build Time: {date and time}" - - - - - Gets current victory promise scores - - A VP Json - - - - Enum representing three possible wellness statuses. - GREEN - Healthy, no known contact/symptoms - YELLOW - Symptomatic or cautionary hold - RED - Quarantine/Isolation - - - - - Gets wellness status of current user - - A WellnessViewModel representing the most recent status of the user - - - - Gets question for wellness check from the back end - - A WellnessQuestionViewModel - - - - Stores the user's wellness status - - The current status of the user to post, of type WellnessStatusColor - The status that was stored in the database - - - - Whether the user wants their strengths to be private (not shown to other users) - - - - - Gordon ID Number - - - - - a job's unique id number - - - - - Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of the match, followed by the matched field. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The search input to match against - The match key if search matched a field, or null - - - - Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. - - - - The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. - This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. - The precedence of a match is determined by the following, in order: - - How the search matches the field - - Equals - Starts With - Contains - - - Which field the search matches - - FirstName - NickName - LastName - MaidenName - UserName - - - - - - - The first name of the search input to match against - The last name of the search input to match against - The match key if first and last name both matched a field, or null - - - - Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. - - - - - Stores the emergency contact information of a particular user - The object that stores the contact info - The students id number - The stored data - - - - Create the notes value for the database to be passed in with the rest of the data. - The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international - - The mobile phone of the contact - The home phone of the contact - The formatted notes parameter to be passed to the database - - - Stores the cellphone preferences for the current user - The phone number object for the user - The id of the student to be updated - The stored data - - - Stores the demographic data (race and ethnicity) of the current user - The race and ethnicity data for the user - The id of the user to be updated - The stored data - - - Gets the holds of the user with the given ID - The id of the user whose holds are to be found - The stored data - - - Sets the user as having been checked in - The id of the user who is to be marked as checked in - - - Gets the whether the user has completed Academic Checkin - The id of the user for which the data is to be found for - - - Formats a phone number for insertion into the database - The phone number to be formatted - The formatted number - - - - Service Class that facilitates data transactions between the AccountsController and the Account database model. - - - - - Fetches a single account record whose id matches the id provided as an argument - - The person's gordon id - AccountViewModel if found, null if not found - - - - Fetches all the account records from storage. - - AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the account record with the specified email. - - The email address associated with the account. - the first account object which matches the email - - - - Fetches the account record with the specified username. - - The AD username associated with the account. - the student account information - - - - Get basic info for all accounts - - BasicInfoViewModel of all accounts - - - - Get basic info for all accounts except alumni - - BasicInfoViewModel of all accounts except alumni - - - - Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. - ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) - Activity Info and ACtivity may be talked about interchangeably. - - - - - Fetches a single activity record whose id matches the id provided as an argument - - The activity code - ActivityViewModel if found, null if not found - - - - Fetches the Activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the Activity types of activities that are active during the session whose code is specified as parameter. - - The session code - ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches all activity records from storage. - - ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Checks to see if a specified activity is still open for this session - Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table - When an activity is closed out, the END_DTE is set to the date on which the closing happened - Otherwise, the END_DTE for all memberships of the activity will be null for that session - - The activity code for the activity in question - Code of the session to check - - - - - Gets a collection of all the current open activities, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is null - - The collection of activity codes for open activities - - - - Gets a collection of all the current activities already closed out, by finding which activities have - memberships with an END_DTE that is not null - - The collection of activity codes for open activities - - - - Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have - memberships with an END_DTE that is not null - - The user's id - The session we want to get the closed activities for - The collection of activity codes for open activities - - - - Updates the Activity Info - - The activity info resource with the updated information - The id of the activity info to be updated - The updated activity info resource - - - - Closes out a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Open a specific activity for a specific session - - The activity code for the activity that will be closed - The session code for the session where the activity is being closed - - - - Updates the image for the spcefied involvement - - The involvement to update the image of - The new image - The involvement with the updated image path - - - - Reset the path for the activity image - - The activity code - - - - change activty privacy - - The activity code - activity private or not - - - - Service class to facilitate interacting with the Admin table. - - - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - - - Fetches the admin resource whose username matches the specified argument - - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. - - - - Fetches all the administrators from the database - - Returns a list of administrators. If no administrators were found, an empty list is returned. - - - - Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateAdmin() method. - - The admin to be added - The newly added Admin object - - - - Delete the admin whose id is specified by the parameter. - - The admin id - The admin that was just deleted - - - - Helper method to Validate an admin - - The admin to validate - True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - - - - Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. - - - - - Fetches the dashboard slider content from the database. - - If found, returns a set of SliderViewModel's, based on each slide entry in the db. - If not returns an empty IEnumerable. - - - - Retrieve all banner slides from the database - - An IEnumerable of the slides in the database - - - - Inserts a banner slide in the database and uploads the image to the local slider folder - - The slide to add - The url of the server that the image is being posted to. - This is needed to save the image path into the database. The URL is different depending on where the API is running. - The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. - - The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. - The inserted slide - - - - Deletes a banner slide from the database and deletes the local image file - - The deleted slide - - - - Service that allows for meal control - - - - - - - - - - - - - Get information about the selected plan for the student user - - Student's Gordon ID - Current Session Code - - - - - Service class to facilitate getting emails for members of an activity. - - - - - Get a list of the emails for all members in the activity during the current session. - - The code of the activity to get emails for. - Optionally, the session to get emails for. Defaults to the current session - The participation type to get emails of. If unspecified, gets emails of all participation types. - A list of emails (along with first and last name) associated with that activity - - - - Send a email to a list of email addresses - - All addresses to send this email to - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Send a email to members of an activity - - The activity code to send this email to - The session of activity to select members from - The address this email is sent from - Subject of the email to be sent - The content of the email to be sent - Password of the email sender - - - - - Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. - - - - - Adds a new error log to storage. - - The error log to be added - The newly added error_log object - - - - Adds a new error log to storage, after creating the timestamp. - - The error message for the error log to be added - The newly added error_log object - - - - Service that allows for event control - - - - URL to retrieve events from the 25Live API. - event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). - All other event types are not appropiate for the 360 events feed. - end_after parameter limits the request to events from the current academic year. - state parameter fetches only confirmed events - - - - Access the memory stream created by the cached task and parse it into events - Splits events with multiple repeated occurrences into individual records for each occurrence - - All events for the current academic year. - - - - Select only events that are marked for Public promotion - - All Public Events - - - - Select only events that are Approved to give CLAW credit - - All CLAW Events - - - - Returns all attended events for a student in a specific term - - The student's AD Username - The current term - - - - - Helper function to determine the current academic year - - - - - - Calls a stored procedure that returns a row in the staff whitelist which has the given user id, - if it is in the whitelist - - The id of the person using the page - Whether or not the user is on the staff whitelist - - - - Deletes the application with given id, - removing all rows that reference it. - - The id of the application to delete - Whether or not this was successful - - - - Gets all names of apartment halls - - AN array of hall names - - - - Calls a stored procedure that tries to get the id of an the application that a given user is - applicant on for a given session - - The student username to look for - Session for which the application would be - - The id of the application or - null if the user is not on an application for that session - - - - - Get the editor ID of a given application ID - - The application ID for which the editor ID would be - - The id of the editor or - null if the user is a member but not an editor of a given application - - - - - Saves student housing info - - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp - - second, it retrieves the application id of the application with the information we just inserted (because - the database creates the application ID so we have to ask it which number it generated for it) - - third, it inserts each applicant into the applicants table along with the application ID so we know - which application on which they are an applicant - - - The current session code - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Edit an existings apartment application - - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username - - second, it gets an array of the applicants that are already stored in the database for the given application ID - - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database - - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array - - - The student username of the user who is attempting to save the apartment application (retrieved via authentication token) - The current session code - The application ID number of the application to be edited - The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) - Array of JSON objects providing apartment applicants - Array of JSON objects providing apartment hall choices - Returns the application ID number if all the queries succeeded - - - - Changes the student user who has permission to edit the given application - - - Whether or not all the queries succeeded - - - application ID number of the apartment application - boolean indicating whether the current user is an admin, permits access to restricted information such as birth date - Apartment Application formatted for display in the UI - - - Array of ApartmentApplicationViewModels - - - - "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked - - The application ID number of the application to be submitted - Returns whether the query succeeded - - - - Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. - - - - - Service class to facilitate data transactions between the MembershipRequestController and the database - - - - - Generate a new request to join an activity at a participation level higher than 'Guest' - - The membership request object - The membership request object once it is added - - - - Approves the request with the specified ID. - - The ID of the request to be approved - The approved membership - - - - Delete the membershipRequest object whose id is given in the parameters - - The membership request id - A copy of the deleted membership request - - - - Denies the membership request object whose id is given in the parameters - - The membership request id - - - - - Get the membership request object whose Id is specified in the parameters. - - The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. - - - - Fetches all the membership request objects from the database. - - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this activity - - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Fetches all the membership requests associated with this student - - The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - - - - Update an existing membership request object - - The membership request id - The newly modified membership request - - - - - Service Class that facilitates data transactions between the MembershipsController and the Membership database model. - - - - - Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, - we do it here by using the validateMembership() method. - - The membership to be added - The newly added Membership object - - - - Delete the membership whose id is specified by the parameter. - - The membership id - The membership that was just deleted - - - - Fetch the membership whose id is specified by the parameter - - The membership id - MembershipViewModel if found, null if not found - - - - Fetches the memberships associated with the activity whose code is specified by the parameter. - - The activity code. - Optional code of session to get memberships for - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the leaders of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches the advisors of the activity whose activity code is specified by the parameter. - - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - - - - Fetches all the membership information linked to the student whose id appears as a parameter. - - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - - - Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int. - - - - Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. - - The activity code. - The session code - int - - - - Updates the membership whose id is given as the first parameter to the contents of the second parameter. - - The updated membership. - The newly modified membership. - - - - Switches the group-admin property of the person whose membership id is given - - The corresponding membership object - The newly modified membership. - - - - Switches the privacy property of the person whose membership id is given - - The membership object passed. - The newly modified membership. - - - - Helper method to Validate a membership - - The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Determines whether or not the given user is a Group Admin of some activity - - Username of the user to check - true if student is a Group Admin, else false - - - - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. - - - - - Fetch the myschedule item whose id is specified by the parameter - - The myschedule id - AD Username - Myschedule if found, null if not found - - - - Fetch all myschedule items belonging to the given user - - The AD Username - Array of Myschedule if found, null if not found - - - - Adds a new mySchedule record to storage. - - The membership to be added - The newly added custom event - - - - Delete the myschedule whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Update the myschedule item. - - The schedule information - The original schedule - - - - Gets a news item entity by id - NOTE: Also a helper method, hence why it returns a StudentNews model - rather than a StudentNewsViewModel - must be casted as the latter in its own - controller - - The SNID (id of news item) - The news item - - - - Gets unapproved unexpired news submitted by user. - - username - Result of query - - - - Adds a news item record to storage. - - The news item to be added - username - The newly added Membership object - - - - (Service) Deletes a news item from the database - - The id of the news item to delete - The deleted news item - The news item must be authored by the user and must not be expired - - - - (Service) Edits a news item in the database - - The id of the news item to edit - The news object that contains updated values - The updated news item's view model - The news item must be authored by the user and must not be expired and must be unapproved - - - - Helper method to verify that a given news item has not yet been approved - - The news item to verify - true if unapproved, otherwise throws some kind of meaningful exception - - - - Helper method to verify that a given news item has not expired - (see documentation for expiration definition) - - The news item to verify - true if unexpired, otherwise throws some kind of meaningful exception - - - - Helper method to validate a news item - - The news item to validate - True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - - - - Verifies that a student account exists - - The AD Username of the student - true if account exists, ResourceNotFoundException if null - - - - get student profile info - - username - StudentProfileViewModel if found, null if not found - - - - get faculty staff profile info - - username - FacultyStaffProfileViewModel if found, null if not found - - - - get alumni profile info - - username - AlumniProfileViewModel if found, null if not found - - - - get mailbox combination - - The current user's username - MailboxViewModel with the combination - - - - get a user's birthday - - The username of the person to get the birthdate of - Date the user's date of birth - - - - get advisors for particular student - - AD username - - - - Gets the clifton strengths of a particular user - The id of the user for which to retrieve info - Clifton strengths of the given user. - - - - Toggles the privacy of the Clifton Strengths data associated with the given id - - ID of the user whose Clifton Strengths privacy is toggled - The new privacy value - Thrown when the given ID doesn't match any Clifton Strengths rows - - - Gets the emergency contact information of a particular user - The username of the user for which to retrieve info - Emergency contact information of the given user. - - - - Get photo path for profile - - AD username - PhotoPathViewModel if found, null if not found - - - - Fetches a single profile whose username matches the username provided as an argument - - The username - ProfileViewModel if found, null if not found - - - - Sets the path for the profile image. - - AD Username - - - - - - Sets the path for the profile links. - - The username - - - - - - privacy setting of mobile phone. - - AD Username - Y or N - - - - mobile phone number setting - - The username for the user whose phone is to be updated - The new number to update the user's phone number to - - - - privacy setting user profile photo. - - AD Username - Y or N - - - - Fetch all upcoming ride items - - IEnumerable of ride items if found, null if not found - - - - Fetch the ride items a user is part of - - The ride id - ride items if found, null if not found - - - - Adds a new ride record to storage. - - The Save_Rides object to be added - The gordon_id of the user creating the ride - The newly added custom event - - - - Delete the ride whose id is specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Cancel the ride whose id is specified by the parameter. - - The ride id - The gordon id - The ride that was just deleted - - - - Adds a new booking record to storage. - - The Save_Bookings object to be added - The newly added custom event - - - - Delete the booking whose ids are specified by the parameter. - - The myschedule id - The gordon id - The myschedule that was just deleted - - - - Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. - - - - - privacy setting of schedule. - - AD Username - Y or N - - - - description of schedule. - - AD Username - New description - - - - Update timestamp of modification in schedule. - - AD Username - Modified Time - - - - Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. - - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the student - StudentScheduleViewModel if found, null if not found - - - - Fetch the schedule item whose id and session code is specified by the parameter - - The AD Username of the instructor - StudentScheduleViewModel if found, null if not found - - - - Service class to facilitate data transactions between the Controller and the database model. - - - - - Get the session record whose sesssion code matches the parameter. - - The session code. - A SessionViewModel if found, null if not found. - - - - Fetches all the session records from the database. - - A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - get Student Employment records of given user - - AD Username of user to get employment - VictoryPromiseViewModel if found, null if not found - - - - get victory promise scores - - id - VictoryPromiseViewModel if found, null if not found - - - - Get the status of the user by id - - AD Username of the user to get the status of - The status of the user, a WellnessViewModel - - - - Stores wellness Status in database. - - AD Username of the user to post the status for - Status that is being posted, one of the WellnessStatusColors - Status that was successfully recorded - - - - gets the question for the wellness check from the back end - - A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. - - - - Creates an expiration date for a check in at the current time - - The time of the check in - When the check in should expire (the next 5AM). - - - - Service class for methods that are shared between all services. - - - - - Helper method that gets the current session we are in. - - The session code of the current session - - - - Deletes an image from the filesystem, if there is one. - - The path to which the image belonged. - - - - Takes an image path and returns the data of the image at that path. - If given path is null it returns an empty string. - - The path to the image - The base64 data of the image - - - - Uploads a news image - - - Takes base64 image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The base64 image data to be stored - The format to save the image as. Defaults to Jpeg - - - - Uploads image from HTTP FormFile - - - Takes image data and writes it to an image file. Note that if the target path - already has a file, the method will overwrite it (which gives no errors) - - The path to which the image belongs - The image data to be stored - - - - Takes a filepath for an image, navigates to it, collects the raw data - of the file and converts it to base64 format. - - The path to the image - The base64 content of the image - - - + + + + Gordon360 + + + + + Get the username of the authenticated user + + The ClaimsPrincipal representing the user's authentication claims + Username of the authenticated user + + + Set emergency contacts for student + The contact data to be stored + The data stored + + + Sets the students cell phone number + The phone number object to be added to the database + The data stored + + + Sets the students race and ethinicity + The object containing the race numbers of the users + The data stored + + + Gets and returns the user's holds + The user's stored holds + + + Sets the user as having completed Academic Checkin + The HTTP status indicating whether the request was completed or not + + + Gets whether the user has checked in or not. True if they have checked in, false if they have not checked in + The HTTP status indicating whether the request was completed and returns the check in status of the student + + + + Return a list of accounts matching some or all of searchString. + + The input to search for + All accounts meeting some or all of the parameter, sorted according to how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameter. + + The firstname portion of the search + The lastname portion of the search + All accounts matching some or all of both the firstname and lastname parameters, sorted by how well the account matched the search. + + + + Return a list of accounts matching some or all of the search parameters + We are searching through all the info of a user, then narrowing it down to get only what we want + + Which account types to search. Accepted values: "student", "alumni", "facstaff" + The first name to search for + The last name to search for + + + + + + + + + + All accounts meeting some or all of the parameter + + + Gets the activities taking place during a given session + The session identifier + A list of all activities that are active during the given session determined by the id parameter + Queries the database to find which activities are active during the session desired + + + Gets the different types of activities taking place during a given session + The session identifier + A list of all the different types of activities that are active during the given session determined by the id parameter + Queries the database to find the distinct activities type of activities that are active during the session desired + + + + Get the status (open or closed) of an activity for a given session + + The session code that we want to check the status for + + + + + + Get all the activities that have not yet been closed out for the current session + + + + + + Get all the activities that have not yet been closed out for the current session for + which a given user is the group admin + + The id of the user who is group admin + + + + + Get all the activities that are already closed out for the current session + + + + + + Get all the activities that are already closed out for the current session for + which a given user is group admin + + The id of the user who is group admin + + + + + + The code of the activity to update + The updated involvement details + + + + + Set an image for the activity + + The activity code + The image file + + + + + Reset the activity Image + + The activity code + + + + Update an existing activity to be private or not + The id of the activity + the boolean value + Calls the server to make a call and update the database with the changed information + + + + Pulls all states available from Jenzabar States Table + + + + + + Pulls all Countries available from Jenzabar Countries Table + + + + + + Get all admins + + + A list of all admins + + + Server makes call to the database and returns all admins + + + + + Get a specific admin + + + The specific admin + + + Server makes call to the database and returns the specific admin + + + + Create a new admin to be added to database + The admin item containing all required and relevant information + + Posts a new admin to the server to be added into the database + + + Delete an existing admin + The identifier for the admin to be deleted + Calls the server to make a call and remove the given admin from the database + + + + Return a list majors. + + All majors + + + + Return a list minors. + + All minors + + + + Return a list minors. + + All minors + + + + Return a list states. + + All states + + + + Return a list countries. + + All countries + + + + Return a list departments. + + All departments + + + + Return a list buildings. + + All buildings + + + Get all the slider content for the dashboard slider + A list of all the slides for the slider + Queries the database for all entries in slider table + + + Get all the banner slides for the dashboard banner + A list of all the slides for the banner + + + Post a new slide for the dashboard banner + The posted banner + + + Remove a slide from the dashboard banner + ID of the slide to remove + + + + Gets information about student's dining plan and balance + + A DiningInfo object + + + + This makes use of our cached request to 25Live, which stores AllEvents + + + + + + Delete an application (and consequently all rows that reference it) + + The id of the application to remove + + + + + Get a list of the apartment-style halls + + + + + + Get apartment application ID number of currently logged in user if that user is on an existing application + + + + + + Get apartment application ID number for a user if that user is on an existing application + + username of the profile info + + + + + save application + + Returns the application ID number if all the queries succeeded + + + + update existing application (Differentiated by HttpPut instead of HttpPost) + + Returns the application ID number if all the queries succeeded + + + + change the editor (i.e. primary applicant) of the application + + The result of changing the editor + + + + change the date an application was submitted + (changes it from null the first time they submit) + + The result of changing the date submitted + + + Get apartment application info for a given application ID number + application ID number of the apartment application + Object of type ApartmentAppViewModel + + + Get apartment application info for all applications if the current user is a housing admin + Object of type ApartmentApplicationViewModel + + + + Get a user's active jobs + + The datetime that the shift started + The datetime that the shift ended + The user's active jobs + + + + Get a user's saved shifts + + The user's saved shifts + + + + Get a user's active jobs + + + The result of saving a shift + + + + Edit a shift + The details that will be changed + + + + + Get a user's active jobs + + The result of deleting the shift + + + + Submit shifts + + The result of submitting the shifts + + + + Gets the name of a supervisor based on their ID number + + The name of the supervisor + + + + sends the current clock in status to the back end + true if user is clocked in and false if clocked out + + detail to be saved in the back end, true if user just clocked in + returns confirmation that the answer was recorded + + + + gets the the clock in status from the back end + true if user is clocked in and false if clocked out + + ClockInViewModel + + + + deletes the last clocked in status of a user + + returns confirmation that clock in status was deleted + + + Create a new error log item to be added to database + The error message containing all required and relevant information + + Posts a new message to the service to be added into the database + + + Create a new error log item to be added to database + The error log containing the ERROR_TIME, and the LOG_MESSAGE + + Posts a new error_log to the server to be added into the database. Useful if you want to input the datetime in the front end for greater accuracy + + + + Get all the memberships associated with a given activity + + The activity ID + Optional code of session to get for + IHttpActionResult + + + + Gets the group admin memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the leader-type memberships associated with a given activity. + + The activity ID. + A list of all leader-type memberships for the specified activity. + + + + Gets the advisor-type memberships associated with a given activity. + + The activity ID. + A list of all advisor-type memberships for the specified activity. + + + + Gets the number of followers of an activity + + The activity ID. + The number of followers of the activity + + + + Gets the number of members (besides followers) of an activity + + The activity ID. + The number of members of the activity + + + + Gets the number of followers of an activity + + The activity ID. + The session code + The number of followers of the activity + + + + Gets the number of members (excluding followers) of an activity + + The activity ID. + The session code + The number of members of the activity + + + Create a new membership item to be added to database + The membership item containing all required and relevant information + + Posts a new membership to the server to be added into the database + + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + + + Update an existing membership item + The membership id of whichever one is to be changed + The content within the membership that is to be changed and what it will change to + Calls the server to make a call and update the database with the changed information + The membership information that the student is a part of + + + Update an existing membership item to be a group admin or not + /// The content within the membership that is to be changed + Calls the server to make a call and update the database with the changed information + + + Update an existing membership item to be private or not + The membership to toggle privacy on + Calls the server to make a call and update the database with the changed information + + + Delete an existing membership + The identifier for the membership to be deleted + Calls the server to make a call and remove the given membership from the database + + + + Determines whether or not the given student is a Group Admin of some activity + + The account username to check + + + + Gets all custom events for a user + + A IEnumerable of custom events + + + + Gets specific custom event for a user + + The requested custom event + + + + Gets all myschedule objects for a user + + A IEnumerable of myschedule objects + + + Create a new myschedule to be added to database + The myschedule item containing all required and relevant information + Created schedule + Posts a new myschedule to the server to be added into the database + + + Delete an existing myschedule item + The identifier for the myschedule to be deleted + Calls the server to make a call and remove the given myschedule from the database + + + Update the existing myschedule in database + The updated myschedule item containing all required and relevant information + Original schedule + Put a myschedule to the server to be updated + + + Gets a news item by id from the database + The id of the news item to retrieve + The news item + + + Gets the base64 image data for an image corresponding + to a student news item. Only used by GO; when we move student news approval + to 360, this will be removed. + The id of the news item to retrieve image from + base64 string representing image + + + Call the service that gets all approved student news entries not yet expired, filtering + out the expired by comparing 2 weeks past date entered to current date + + + Call the service that gets all new and approved student news entries + which have not already expired, + checking novelty by comparing an entry's date entered to 10am on the previous day + + + Call the service that gets the list of categories + + + Call the service that gets all unapproved student news entries (by a particular user) + not yet expired, filtering out the expired news + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Create a new news item to be added to the database + @TODO: Remove redundant username/id from this and service + @TODO: fix documentation comments + + + Deletes a news item from the database + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Controller) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item + The news item must be authored by the user and must not be expired and must be unapproved + + + Get profile info of currently logged in user + + + + Get public profile info for a user + username of the profile info + + + + Get the advisor(s) of a particular student + + All advisors of the given student. For each advisor, + provides first name, last name, and username. + + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Gets the clifton strengths of a particular user + The username for which to retrieve info + Clifton strengths of the given user. + + + Toggle privacy of the current user's Clifton Strengths + New privacy value + + + Gets the emergency contact information of a particular user + The username for which to retrieve info + Emergency contact information of the given user. + + + Gets the mailbox information of currently logged in user + + + + Gets the date of birth of the current logged-in user + + + + Get the profile image of currently logged in user + + + + Get the profile image of the given user + The profile image(s) that the authenticated user is allowed to see, if any + + + + Set an image for profile + + + + + + Set an IDimage for a user + + + + + + Reset the profile Image + + + + + + Update the profile social media links + + The type of social media + The path of the links + + + + + Update mobile phone number + + phoneNumber + + + + + Update privacy of mobile phone number + + Y or N + + + + + Update privacy of profile image + + Y or N + + + + + Posts fields into CCT.dbo.Information_Change_Request + Sends Alumni Profile Update Email to "devrequest@gordon.edu" + + Object with Field's Name and Field's Value, unused Field's Label + + + + + Gets the profile image at the given path or, if that file does not exist, the 360 default profile image + + + Note that the 360 default profile image is different from a user's default image. + A given user's default image is simply their approved ID photo. + The 360 default profile image, on the other hand, is a stock image of Scottie Lion. + Hence, the 360 default profile image is only used when no other image exists (or should be displayed) for a user. + + Path to the profile image to load + + + + + Gets all Membership Request Objects + + List of all requests for membership + + + + Gets a specific Membership Request Object + + The ID of the membership request + A memberships request with the specified id + + + + Gets the memberships requests for the specified activity + + The activity code + All membership requests associated with the activity + + + + Gets the memberships requests for the person making the request + + All membership requests associated with the student + + + + Creates a new membership request + + The request to be added + The added request if successful. HTTP error message if not. + + + + Updates a membership request + + The membership request id + The updated membership request object + The updated request if successful. HTTP error message if not. + + + + Sets a membership request to Approved + + The id of the membership request in question. + If successful: THe updated membership request wrapped in an OK Http status code. + + + + Sets the membership request to Denied + + The id of the membership request in question. + If successful: The updated membership request wrapped in an OK Http status code. + + + + Deletes a membership request + + The id of the membership request to delete + The deleted object + + + + Gets all upcoming ride objects + + A IEnumerable of rides objects + + + + Gets all upcoming ride objects for a user + + A IEnumerable of rides objects + + + + Create new ride object for a user + + Successfully posted ride object + + + Cancel an existing ride item + The identifier for the ride to be cancel + Calls the server to make a call and remove the given ride from the database + + + Delete an existing ride item + The identifier for the ride to be deleted + Calls the server to make a call and remove the given ride from the database + + + + Create new booking object for a user + + Successfully posted booking object + + + Delete an existing booking item + The identifier for the booking to be deleted + Calls the server to make a call and remove the given booking from the database + + + + Get schedule information of logged in user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO: Use Service Layer + + + + + + Get schedule information of specific user + Info one gets: privacy, time last updated, description, and Gordon ID + @TODO Use Service Layer + + username + + + + + Update privacy of schedule + + Y or N + + + + + Update schedule description + + New description + + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Gets all schedule objects for a user + + A IEnumerable of schedule objects + + + + Get whether the currently logged-in user can read student schedules + + Whether they can read student schedules + + + Get a list of all sessions + All sessions within the database + Queries the database for all sessions, current and past + + + Get one specific session specified by the id in the URL string + The identifier for one specific session + The information about one specific session + Queries the database regarding a specific session with the given identifier + + + + Gets the current active session + + + + + + Gets the days left in the current session + + + + + + Gets student employment information about the user + + A Student Employment Json + + + + Get the short git SHA-1 and build date for the backend + + "Git Hash: {hashCode}; Build Time: {date and time}" + + + + + Gets current victory promise scores + + A VP Json + + + + Enum representing three possible wellness statuses. + GREEN - Healthy, no known contact/symptoms + YELLOW - Symptomatic or cautionary hold + RED - Quarantine/Isolation + + + + + Gets wellness status of current user + + A WellnessViewModel representing the most recent status of the user + + + + Gets question for wellness check from the back end + + A WellnessQuestionViewModel + + + + Stores the user's wellness status + + The current status of the user to post, of type WellnessStatusColor + The status that was stored in the database + + + + Whether the user wants their strengths to be private (not shown to other users) + + + + + Gordon ID Number + + + + + a job's unique id number + + + + + Matches basic info fields against search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of the match, followed by the matched field. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The search input to match against + The match key if search matched a field, or null + + + + Matches basic info fields against the first and last names of a search, returning a match key representing the value and precedence of the first match, or null. + + + + The match key is leading 'z's equal to the precedence of both matches, followed by the matched fields (first then last), separated by a '1' to sort short first names above longer first names. + This key, when used to sort aplhabetically, will sort matched accounts by the precedence of the matched field and alphabetically within precedence level. + The precedence of a match is determined by the following, in order: + + How the search matches the field + + Equals + Starts With + Contains + + + Which field the search matches + + FirstName + NickName + LastName + MaidenName + UserName + + + + + + + The first name of the search input to match against + The last name of the search input to match against + The match key if first and last name both matched a field, or null + + + + Service Class that facilitates data transactions between the AcademicCheckInController and the CheckIn database model. + + + + + Stores the emergency contact information of a particular user + The object that stores the contact info + The students id number + The stored data + + + + Create the notes value for the database to be passed in with the rest of the data. + The reason for this is that the notes column in the database is only made up of what phone numbers a contact has that are international + + The mobile phone of the contact + The home phone of the contact + The formatted notes parameter to be passed to the database + + + Stores the cellphone preferences for the current user + The phone number object for the user + The id of the student to be updated + The stored data + + + Stores the demographic data (race and ethnicity) of the current user + The race and ethnicity data for the user + The id of the user to be updated + The stored data + + + Gets the holds of the user with the given ID + The id of the user whose holds are to be found + The stored data + + + Sets the user as having been checked in + The id of the user who is to be marked as checked in + + + Gets the whether the user has completed Academic Checkin + The id of the user for which the data is to be found for + + + Formats a phone number for insertion into the database + The phone number to be formatted + The formatted number + + + + Service Class that facilitates data transactions between the AccountsController and the Account database model. + + + + + Fetches a single account record whose id matches the id provided as an argument + + The person's gordon id + AccountViewModel if found, null if not found + + + + Fetches all the account records from storage. + + AccountViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the account record with the specified email. + + The email address associated with the account. + the first account object which matches the email + + + + Fetches the account record with the specified username. + + The AD username associated with the account. + the student account information + + + + Get basic info for all accounts + + BasicInfoViewModel of all accounts + + + + Get basic info for all accounts except alumni + + BasicInfoViewModel of all accounts except alumni + + + + Service Class that facilitates data transactions between the ActivitiesController and the ACT_INFO database model. + ACT_INFO is basically a copy of the ACT_CLUB_DEF domain model in TmsEPrd but with extra fields that we want to store (activity image, blurb etc...) + Activity Info and ACtivity may be talked about interchangeably. + + + + + Fetches a single activity record whose id matches the id provided as an argument + + The activity code + ActivityViewModel if found, null if not found + + + + Fetches the Activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the Activity types of activities that are active during the session whose code is specified as parameter. + + The session code + ActivityViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches all activity records from storage. + + ActivityViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Checks to see if a specified activity is still open for this session + Note: the way we know that an activity is open or closed is by the column END_DTE in MEMBERSHIP table + When an activity is closed out, the END_DTE is set to the date on which the closing happened + Otherwise, the END_DTE for all memberships of the activity will be null for that session + + The activity code for the activity in question + Code of the session to check + + + + + Gets a collection of all the current open activities, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current open activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is null + + The collection of activity codes for open activities + + + + Gets a collection of all the current activities already closed out, by finding which activities have + memberships with an END_DTE that is not null + + The collection of activity codes for open activities + + + + Gets a collection of all the current closed activities for which a given user is group admin, by finding which activities have + memberships with an END_DTE that is not null + + The user's id + The session we want to get the closed activities for + The collection of activity codes for open activities + + + + Updates the Activity Info + + The activity info resource with the updated information + The id of the activity info to be updated + The updated activity info resource + + + + Closes out a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Open a specific activity for a specific session + + The activity code for the activity that will be closed + The session code for the session where the activity is being closed + + + + Updates the image for the spcefied involvement + + The involvement to update the image of + The new image + The involvement with the updated image path + + + + Reset the path for the activity image + + The activity code + + + + change activty privacy + + The activity code + activity private or not + + + + Service class to facilitate interacting with the Admin table. + + + + + Fetches the admin resource whose id is specified as an argument. + + The admin ID.l + The Specified administrator. If none was found, a null value is returned. + + + + Fetches the admin resource whose username matches the specified argument + + The administrator's gordon id + The Specified administrator. If none was found, a null value is returned. + + + + Fetches all the administrators from the database + + Returns a list of administrators. If no administrators were found, an empty list is returned. + + + + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateAdmin() method. + + The admin to be added + The newly added Admin object + + + + Delete the admin whose id is specified by the parameter. + + The admin id + The admin that was just deleted + + + + Helper method to Validate an admin + + The admin to validate + True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter + + + + Service class that facilitates data (specifically, site content) passing between the ContentManagementController and the database model. + + + + + Fetches the dashboard slider content from the database. + + If found, returns a set of SliderViewModel's, based on each slide entry in the db. + If not returns an empty IEnumerable. + + + + Retrieve all banner slides from the database + + An IEnumerable of the slides in the database + + + + Inserts a banner slide in the database and uploads the image to the local slider folder + + The slide to add + The url of the server that the image is being posted to. + This is needed to save the image path into the database. The URL is different depending on where the API is running. + The URL is trivial to access from the controller, but not available from within the service, so it has to be passed in. + + The path to the root of the web server's content, from which we can access the physical filepath where slides are uploaded. + The inserted slide + + + + Deletes a banner slide from the database and deletes the local image file + + The deleted slide + + + + Service that allows for meal control + + + + + + + + + + + + + Get information about the selected plan for the student user + + Student's Gordon ID + Current Session Code + + + + + Service class to facilitate getting emails for members of an activity. + + + + + Get a list of the emails for all members in the activity during the current session. + + The code of the activity to get emails for. + Optionally, the session to get emails for. Defaults to the current session + The participation type to get emails of. If unspecified, gets emails of all participation types. + A list of emails (along with first and last name) associated with that activity + + + + Send a email to a list of email addresses + + All addresses to send this email to + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Send a email to members of an activity + + The activity code to send this email to + The session of activity to select members from + The address this email is sent from + Subject of the email to be sent + The content of the email to be sent + Password of the email sender + + + + + Service Class that facilitates data transactions between the ErrorLogController and the ERROR_LOG database model. + + + + + Adds a new error log to storage. + + The error log to be added + The newly added error_log object + + + + Adds a new error log to storage, after creating the timestamp. + + The error message for the error log to be added + The newly added error_log object + + + + Service that allows for event control + + + + URL to retrieve events from the 25Live API. + event_type_id parameter fetches only events of type 14 (Calendar Announcement) and 57 (Event). + All other event types are not appropiate for the 360 events feed. + end_after parameter limits the request to events from the current academic year. + state parameter fetches only confirmed events + + + + Access the memory stream created by the cached task and parse it into events + Splits events with multiple repeated occurrences into individual records for each occurrence + + All events for the current academic year. + + + + Select only events that are marked for Public promotion + + All Public Events + + + + Select only events that are Approved to give CLAW credit + + All CLAW Events + + + + Returns all attended events for a student in a specific term + + The student's AD Username + The current term + + + + + Helper function to determine the current academic year + + + + + + Calls a stored procedure that returns a row in the staff whitelist which has the given user id, + if it is in the whitelist + + The id of the person using the page + Whether or not the user is on the staff whitelist + + + + Deletes the application with given id, + removing all rows that reference it. + + The id of the application to delete + Whether or not this was successful + + + + Gets all names of apartment halls + + AN array of hall names + + + + Calls a stored procedure that tries to get the id of an the application that a given user is + applicant on for a given session + + The student username to look for + Session for which the application would be + + The id of the application or + null if the user is not on an application for that session + + + + + Get the editor ID of a given application ID + + The application ID for which the editor ID would be + + The id of the editor or + null if the user is a member but not an editor of a given application + + + + + Saves student housing info + - first, it creates a new row in the applications table and inserts the username of the primary applicant and a timestamp + - second, it retrieves the application id of the application with the information we just inserted (because + the database creates the application ID so we have to ask it which number it generated for it) + - third, it inserts each applicant into the applicants table along with the application ID so we know + which application on which they are an applicant + + + The current session code + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Edit an existings apartment application + - first, it gets the EditorUsername from the database for the given application ID and makes sure that the student username of the current user matches that stored username + - second, it gets an array of the applicants that are already stored in the database for the given application ID + - third, it inserts each applicant that is in the 'newApplicantIDs' array but was not yet in the database + - fourth, it removes each applicant that was stored in the database but was not in the 'newApplicantIDs' array + + + The student username of the user who is attempting to save the apartment application (retrieved via authentication token) + The current session code + The application ID number of the application to be edited + The student username of the student who is declared to be the editor of this application (retrieved from the JSON from the front end) + Array of JSON objects providing apartment applicants + Array of JSON objects providing apartment hall choices + Returns the application ID number if all the queries succeeded + + + + Changes the student user who has permission to edit the given application + + + Whether or not all the queries succeeded + + + application ID number of the apartment application + boolean indicating whether the current user is an admin, permits access to restricted information such as birth date + Apartment Application formatted for display in the UI + + + Array of ApartmentApplicationViewModels + + + + "Submit" an application by changing its DateSubmitted value to the date the submit button is succesfully clicked + + The application ID number of the application to be submitted + Returns whether the query succeeded + + + + Service Class that facilitates data transactions between the JobsController and the student_timesheets + paid_shifts database model. + + + + + Service class to facilitate data transactions between the MembershipRequestController and the database + + + + + Generate a new request to join an activity at a participation level higher than 'Guest' + + The membership request object + The membership request object once it is added + + + + Approves the request with the specified ID. + + The ID of the request to be approved + The approved membership + + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + + + + Denies the membership request object whose id is given in the parameters + + The membership request id + + + + + Get the membership request object whose Id is specified in the parameters. + + The membership request id + If found, returns MembershipRequestViewModel. If not found, returns null. + + + + Fetches all the membership request objects from the database. + + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this activity + + The activity id + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Fetches all the membership requests associated with this student + + The AD Username of the user + MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + + + + Update an existing membership request object + + The membership request id + The newly modified membership request + + + + + Service Class that facilitates data transactions between the MembershipsController and the Membership database model. + + + + + Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, + we do it here by using the validateMembership() method. + + The membership to be added + The newly added Membership object + + + + Delete the membership whose id is specified by the parameter. + + The membership id + The membership that was just deleted + + + + Fetch the membership whose id is specified by the parameter + + The membership id + MembershipViewModel if found, null if not found + + + + Fetches the memberships associated with the activity whose code is specified by the parameter. + + The activity code. + Optional code of session to get memberships for + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. + + The activity code. + The session code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the leaders of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches the advisors of the activity whose activity code is specified by the parameter. + + The activity code. + MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + + + + Fetches all the membership information linked to the student whose id appears as a parameter. + + The student's AD Username. + A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + Fetches the number of followers associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of memberships associated with the activity whose code is specified by the parameter. + + The activity code. + int. + + + + Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int. + + + + Fetches the number of memberships associated with the activity and session whose codes are specified by the parameter. + + The activity code. + The session code + int + + + + Updates the membership whose id is given as the first parameter to the contents of the second parameter. + + The updated membership. + The newly modified membership. + + + + Switches the group-admin property of the person whose membership id is given + + The corresponding membership object + The newly modified membership. + + + + Switches the privacy property of the person whose membership id is given + + The membership object passed. + The newly modified membership. + + + + Helper method to Validate a membership + + The membership to validate + True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Determines whether or not the given user is a Group Admin of some activity + + Username of the user to check + true if student is a Group Admin, else false + + + + Converts a MembershipUploadViewModel object to a MEMBERSHIP + + The MembershipUploadViewModel to convert + A new MEMBERSHIP object filled with the info from the view model + + + + Finds the matching MembershipView object from an existing MEMBERSHIP object + + The MEMBERSHIP to match on MembershipID + The found MembershipView object corresponding to the MEMBERSHIP by ID + + + + Gets the current session ID code for involvements + + The current session ID code for involvements + + + + Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. + + + + + Fetch the myschedule item whose id is specified by the parameter + + The myschedule id + AD Username + Myschedule if found, null if not found + + + + Fetch all myschedule items belonging to the given user + + The AD Username + Array of Myschedule if found, null if not found + + + + Adds a new mySchedule record to storage. + + The membership to be added + The newly added custom event + + + + Delete the myschedule whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Update the myschedule item. + + The schedule information + The original schedule + + + + Gets a news item entity by id + NOTE: Also a helper method, hence why it returns a StudentNews model + rather than a StudentNewsViewModel - must be casted as the latter in its own + controller + + The SNID (id of news item) + The news item + + + + Gets unapproved unexpired news submitted by user. + + username + Result of query + + + + Adds a news item record to storage. + + The news item to be added + username + The newly added Membership object + + + + (Service) Deletes a news item from the database + + The id of the news item to delete + The deleted news item + The news item must be authored by the user and must not be expired + + + + (Service) Edits a news item in the database + + The id of the news item to edit + The news object that contains updated values + The updated news item's view model + The news item must be authored by the user and must not be expired and must be unapproved + + + + Helper method to verify that a given news item has not yet been approved + + The news item to verify + true if unapproved, otherwise throws some kind of meaningful exception + + + + Helper method to verify that a given news item has not expired + (see documentation for expiration definition) + + The news item to verify + true if unexpired, otherwise throws some kind of meaningful exception + + + + Helper method to validate a news item + + The news item to validate + True if valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + + + + Verifies that a student account exists + + The AD Username of the student + true if account exists, ResourceNotFoundException if null + + + + get student profile info + + username + StudentProfileViewModel if found, null if not found + + + + get faculty staff profile info + + username + FacultyStaffProfileViewModel if found, null if not found + + + + get alumni profile info + + username + AlumniProfileViewModel if found, null if not found + + + + get mailbox combination + + The current user's username + MailboxViewModel with the combination + + + + get a user's birthday + + The username of the person to get the birthdate of + Date the user's date of birth + + + + get advisors for particular student + + AD username + + + + Gets the clifton strengths of a particular user + The id of the user for which to retrieve info + Clifton strengths of the given user. + + + + Toggles the privacy of the Clifton Strengths data associated with the given id + + ID of the user whose Clifton Strengths privacy is toggled + The new privacy value + Thrown when the given ID doesn't match any Clifton Strengths rows + + + Gets the emergency contact information of a particular user + The username of the user for which to retrieve info + Emergency contact information of the given user. + + + + Get photo path for profile + + AD username + PhotoPathViewModel if found, null if not found + + + + Fetches a single profile whose username matches the username provided as an argument + + The username + ProfileViewModel if found, null if not found + + + + Sets the path for the profile image. + + AD Username + + + + + + Sets the path for the profile links. + + The username + + + + + + privacy setting of mobile phone. + + AD Username + Y or N + + + + mobile phone number setting + + The username for the user whose phone is to be updated + The new number to update the user's phone number to + + + + privacy setting user profile photo. + + AD Username + Y or N + + + + Fetch all upcoming ride items + + IEnumerable of ride items if found, null if not found + + + + Fetch the ride items a user is part of + + The ride id + ride items if found, null if not found + + + + Adds a new ride record to storage. + + The Save_Rides object to be added + The gordon_id of the user creating the ride + The newly added custom event + + + + Delete the ride whose id is specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Cancel the ride whose id is specified by the parameter. + + The ride id + The gordon id + The ride that was just deleted + + + + Adds a new booking record to storage. + + The Save_Bookings object to be added + The newly added custom event + + + + Delete the booking whose ids are specified by the parameter. + + The myschedule id + The gordon id + The myschedule that was just deleted + + + + Service Class that facilitates data transactions between the ScheduleControlController and the ScheduleControl part of the database model. + + + + + privacy setting of schedule. + + AD Username + Y or N + + + + description of schedule. + + AD Username + New description + + + + Update timestamp of modification in schedule. + + AD Username + Modified Time + + + + Service Class that facilitates data transactions between the SchedulesController and the Schedule part of the database model. + + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the student + StudentScheduleViewModel if found, null if not found + + + + Fetch the schedule item whose id and session code is specified by the parameter + + The AD Username of the instructor + StudentScheduleViewModel if found, null if not found + + + + Service class to facilitate data transactions between the Controller and the database model. + + + + + Get the session record whose sesssion code matches the parameter. + + The session code. + A SessionViewModel if found, null if not found. + + + + Fetches all the session records from the database. + + A SessionViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + + + + get Student Employment records of given user + + AD Username of user to get employment + VictoryPromiseViewModel if found, null if not found + + + + get victory promise scores + + id + VictoryPromiseViewModel if found, null if not found + + + + Get the status of the user by id + + AD Username of the user to get the status of + The status of the user, a WellnessViewModel + + + + Stores wellness Status in database. + + AD Username of the user to post the status for + Status that is being posted, one of the WellnessStatusColors + Status that was successfully recorded + + + + gets the question for the wellness check from the back end + + A WellnessQuestionViewModel including the text of the question and the disclaimers for positive and negative answers. + + + + Creates an expiration date for a check in at the current time + + The time of the check in + When the check in should expire (the next 5AM). + + + + Service class for methods that are shared between all services. + + + + + Helper method that gets the current session we are in. + + The session code of the current session + + + + Deletes an image from the filesystem, if there is one. + + The path to which the image belonged. + + + + Takes an image path and returns the data of the image at that path. + If given path is null it returns an empty string. + + The path to the image + The base64 data of the image + + + + Uploads a news image + + + Takes base64 image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The base64 image data to be stored + The format to save the image as. Defaults to Jpeg + + + + Uploads image from HTTP FormFile + + + Takes image data and writes it to an image file. Note that if the target path + already has a file, the method will overwrite it (which gives no errors) + + The path to which the image belongs + The image data to be stored + + + + Takes a filepath for an image, navigates to it, collects the raw data + of the file and converts it to base64 format. + + The path to the image + The base64 content of the image + + + diff --git a/Gordon360/Models/CCT/Context/CCTContext.cs b/Gordon360/Models/CCT/Context/CCTContext.cs index dc34ef15f..2380c22d4 100644 --- a/Gordon360/Models/CCT/Context/CCTContext.cs +++ b/Gordon360/Models/CCT/Context/CCTContext.cs @@ -293,15 +293,15 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { entity.ToView("InvolvementOffering"); - entity.Property(e => e.ACT_CDE).IsFixedLength(); + entity.Property(e => e.ActivityCode).IsFixedLength(); - entity.Property(e => e.ACT_DESC).IsFixedLength(); + entity.Property(e => e.ActivityDescription).IsFixedLength(); - entity.Property(e => e.ACT_TYPE).IsFixedLength(); + entity.Property(e => e.ActivityType).IsFixedLength(); - entity.Property(e => e.ACT_TYPE_DESC).IsFixedLength(); + entity.Property(e => e.ActivityTypeDescription).IsFixedLength(); - entity.Property(e => e.SESS_CDE).IsFixedLength(); + entity.Property(e => e.SessionCode).IsFixedLength(); }); modelBuilder.Entity(entity => diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index edaf41b6c..925c7e6ee 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,11 +1,9 @@ // This file has been auto generated by EF Core Power Tools. -using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data.Common; using System.Linq; using System.Threading; @@ -32,13 +30,6 @@ public static async Task> SqlQueryAsync(this DbContext db, string sql return default; } } - - public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) - { - SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; - await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); - return (int)result.Value; - } } public class OutputParameter diff --git a/Gordon360/Models/CCT/InvolvementOffering.cs b/Gordon360/Models/CCT/InvolvementOffering.cs index feba4c217..2441c4c15 100644 --- a/Gordon360/Models/CCT/InvolvementOffering.cs +++ b/Gordon360/Models/CCT/InvolvementOffering.cs @@ -14,19 +14,19 @@ public partial class InvolvementOffering [Required] [StringLength(8)] [Unicode(false)] - public string ACT_CDE { get; set; } + public string ActivityCode { get; set; } [StringLength(45)] [Unicode(false)] - public string ACT_DESC { get; set; } + public string ActivityDescription { get; set; } [StringLength(3)] [Unicode(false)] - public string ACT_TYPE { get; set; } + public string ActivityType { get; set; } [StringLength(60)] [Unicode(false)] - public string ACT_TYPE_DESC { get; set; } + public string ActivityTypeDescription { get; set; } [Required] [StringLength(8)] [Unicode(false)] - public string SESS_CDE { get; set; } + public string SessionCode { get; set; } } } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index 03b0e075d..64b0fea46 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -10,6 +10,6 @@ public partial class MembershipUploadViewModel public string PartCode { get; set; } public string CommentText { get; set; } public bool GroupAdmin { get; set; } - public bool? Privacy { get; set; } + public bool Privacy { get; set; } } } \ No newline at end of file diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 2b789f885..b2d5ec2f2 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -97,13 +97,28 @@ public MembershipView GetSpecificMembership(int membershipID) /// /// The activity code. /// Optional code of session to get memberships for + /// Optional filter for group admins + /// Optional filter for involvement participation type (MEMBR, ADV, LEAD, GUEST) /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode = null) - { + public IEnumerable GetMembershipsForActivity( + string activityCode, + string? sessionCode = null, + bool? groupAdmin = null, + string[]? participationTypes = null + + ) { //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); + if (sessionCode == null) + sessionCode = this.GetCurrentSessionCode(); + return _context.MembershipView - .Where(m => m.SessionCode.Trim() == sessionCode && m.ActivityCode == activityCode) + .Where(m => + m.SessionCode.Trim() == sessionCode + && m.ActivityCode == activityCode + && (groupAdmin == null || m.GroupAdmin == groupAdmin) + && (participationTypes == null || participationTypes.Contains(m.Participation)) + ) .OrderByDescending(m => m.StartDate); } @@ -111,10 +126,15 @@ public IEnumerable GetMembershipsForActivity(string activityCode /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. /// /// The activity code. + /// The session code. /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. - public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode) + public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode, string? sessionCode = null) { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.GroupAdmin == true); + if (sessionCode == null) + { + sessionCode = this.GetCurrentSessionCode(); + } + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode && m.GroupAdmin == true); } /// @@ -145,9 +165,9 @@ public IEnumerable GetAdvisorMembershipsForActivity(string activ /// /// The student's AD Username. /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - public IEnumerable GetMembershipsForStudent(string username) + public IEnumerable GetMembershipsByUser(string username) { - var account = _context.ACCOUNT.FirstOrDefault(x => x.AD_Username.Trim() == username); + var account = _context.ACCOUNT.FirstOrDefault(a => a.AD_Username.Trim() == username); if (account == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; @@ -182,7 +202,7 @@ public int GetActivityMembersCount(string activityCode) /// The activity code. /// The session code /// int. - public int GetActivityFollowersCountForSession(string activityCode, string sessionCode) + public int GetActivitySubscribersCountForSession(string activityCode, string sessionCode) { return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); } @@ -296,7 +316,7 @@ private async Task ValidateMembershipAsync(MembershipUploadViewModel membe throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; } - if (!_context.InvolvementOffering.Any(i => i.SESS_CDE == membership.SessCode && i.ACT_CDE.Trim() == membership.ACTCode)) + if (!_context.InvolvementOffering.Any(i => i.SessionCode == membership.SessCode && i.ActivityCode.Trim() == membership.ACTCode)) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; } @@ -371,6 +391,11 @@ public class ParticipationType public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } } + /// + /// Converts a MembershipUploadViewModel object to a MEMBERSHIP + /// + /// The MembershipUploadViewModel to convert + /// A new MEMBERSHIP object filled with the info from the view model private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) { var sessionCode = _context.CM_SESSION_MSTR @@ -389,16 +414,30 @@ private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel member }; } + /// + /// Finds the matching MembershipView object from an existing MEMBERSHIP object + /// + /// The MEMBERSHIP to match on MembershipID + /// The found MembershipView object corresponding to the MEMBERSHIP by ID private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) { var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); if (foundMembership == null) { - throw new ResourceCreationException(); + throw new ResourceNotFoundException(); } return foundMembership; } + + /// + /// Gets the current session ID code for involvements + /// + /// The current session ID code for involvements + private string? GetCurrentSessionCode() + { + return _context.CM_SESSION_MSTR.FirstOrDefault(s => s.SESS_BEGN_DTE <= DateTime.Now && s.SESS_END_DTE >= DateTime.Now)?.SESS_CDE.Trim(); + } } } \ No newline at end of file diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 3d36d403d..a4e5463e9 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -166,10 +166,15 @@ public interface IMembershipService { IEnumerable GetLeaderMembershipsForActivity(string activityCode); IEnumerable GetAdvisorMembershipsForActivity(string activityCode); - IEnumerable GetGroupAdminMembershipsForActivity(string activityCode); - IEnumerable GetMembershipsForActivity(string activityCode, string? sessionCode); - IEnumerable GetMembershipsForStudent(string username); - int GetActivityFollowersCountForSession(string activityCode, string sessionCode); + IEnumerable GetGroupAdminMembershipsForActivity(string activityCode, string? sessionCode = null); + public IEnumerable GetMembershipsForActivity( + string activityCode, + string? sessionCode = null, + bool? groupAdmin = null, + string[]? participationTypes = null + ); + IEnumerable GetMembershipsByUser(string username); + int GetActivitySubscribersCountForSession(string activityCode, string sessionCode); int GetActivityMembersCountForSession(string activityCode, string sessionCode); MembershipView GetSpecificMembership(int membershipID); int GetActivityFollowersCount(string idactivityCode); From addca7fb7e117247c72dd80692d0000c40d8e8bc Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Thu, 6 Oct 2022 15:42:48 -0400 Subject: [PATCH 15/49] Update MembershipRequest endpoints to remove ID_NUM --- Gordon360/Authorization/StateYourBusiness.cs | 59 ++-- .../Controllers/MembershipsController.cs | 2 +- Gordon360/Controllers/RequestsController.cs | 47 +-- Gordon360/Documentation/Gordon360.xml | 40 +-- Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs | 11 - Gordon360/Models/CCT/Alumni.cs | 2 +- Gordon360/Models/CCT/Context/CCTContext.cs | 28 +- .../CCT/Context/CCTContextProcedures.cs | 130 --------- .../Models/CCT/Context/DbContextExtensions.cs | 7 + .../CCT/Context/ICCTContextProcedures.cs | 5 - .../Models/CCT/Context/efpt.CCT.config.json | 28 +- Gordon360/Models/CCT/Countries.cs | 2 +- Gordon360/Models/CCT/FacStaff.cs | 2 +- Gordon360/Models/CCT/RequestView.cs | 59 ++++ .../CCT/SUPERVISORS_PER_ACT_CDEResult.cs | 11 - .../CCT/SUPERVISORS_PER_ID_NUMResult.cs | 11 - .../Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs | 11 - Gordon360/Models/CCT/Student.cs | 2 +- Gordon360/Models/CCT/_360_SLIDER.cs | 52 ---- .../ViewModels/MembershipUploadViewModel.cs | 13 + .../ViewModels/RequestUploadViewModel.cs | 43 +++ Gordon360/Program.cs | 1 + .../Services/MembershipRequestService.cs | 274 ++++-------------- Gordon360/Services/MembershipService.cs | 17 +- Gordon360/Services/ServiceInterfaces.cs | 21 +- Gordon360/Static Classes/Names.cs | 5 + 26 files changed, 312 insertions(+), 571 deletions(-) delete mode 100644 Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs create mode 100644 Gordon360/Models/CCT/RequestView.cs delete mode 100644 Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs delete mode 100644 Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs delete mode 100644 Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs delete mode 100644 Gordon360/Models/CCT/_360_SLIDER.cs create mode 100644 Gordon360/Models/ViewModels/RequestUploadViewModel.cs diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index e11d4d8a6..9e0c70f64 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -42,8 +42,9 @@ public class StateYourBusiness : ActionFilterAttribute private IWebHostEnvironment _webHostEnvironment; private CCTContext _CCTContext; private MyGordonContext _MyGordonContext; - private IMembershipService _membershipService; private IAccountService _accountService; + private IMembershipService _membershipService; + private IMembershipRequestService _membershipRequestService; // User position at the college and their id. private IEnumerable user_groups { get; set; } @@ -68,6 +69,7 @@ public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, A _accountService = new AccountService(_CCTContext); _membershipService = new MembershipService(_CCTContext, _accountService); + _membershipRequestService = new MembershipRequestService(_CCTContext, _membershipService, _accountService); user_name = AuthUtils.GetUsername(authenticatedUser); user_groups = AuthUtils.GetGroups(authenticatedUser); @@ -96,7 +98,7 @@ private async Task CanPerformOperationAsync(string resource, string operat Operation.READ_ALL => CanReadAll(resource), Operation.READ_PARTIAL => await CanReadPartialAsync(resource), Operation.ADD => await CanAddAsync(resource), - Operation.DENY_ALLOW => await CanDenyAllowAsync(resource), + Operation.DENY_ALLOW => CanDenyAllow(resource), Operation.UPDATE => await CanUpdateAsync(resource), Operation.DELETE => await CanDeleteAsync(resource), Operation.READ_PUBLIC => CanReadPublic(resource), @@ -108,7 +110,7 @@ private async Task CanPerformOperationAsync(string resource, string operat */ // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't // Fit in nicely with the REST specification which is why there is a seperate case for them. - private async Task CanDenyAllowAsync(string resource) + private bool CanDenyAllow(string resource) { // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) @@ -119,16 +121,15 @@ private async Task CanDenyAllowAsync(string resource) case Resource.MEMBERSHIP_REQUEST: { - var mrID = (int)context.ActionArguments["id"]; + var mrID = (int)context.ActionArguments["activityCode"]; // Get the view model from the repository - var mrService = new MembershipRequestService(_CCTContext); - var mrToConsider = await mrService.GetAsync(mrID); + var mrToConsider = _membershipRequestService.Get(mrID); // Populate the membershipRequest manually. Omit fields I don't need. var activityCode = mrToConsider.ActivityCode; - var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_activityLeader) // If user is the leader of the activity that the request is sent to. return true; - var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. return true; @@ -163,15 +164,14 @@ private async Task CanReadOneAsync(string resource) case Resource.MEMBERSHIP_REQUEST: { // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; // User_id is an instance variable. + var mrToConsider = _membershipRequestService.Get(mrID); + var is_mrOwner = mrToConsider.Username.Equals(user_name.ToLower()); // User_id is an instance variable. if (is_mrOwner) // If user owns the request return true; - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(mrToConsider.ActivityCode, mrToConsider.SessionCode)).Any(x => x.Username == user_name); + var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(mrToConsider.ActivityCode, mrToConsider.SessionCode)).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; @@ -235,7 +235,7 @@ private async Task CanReadPartialAsync(string resource) // Only people that are part of the activity should be able to see members var activityCode = (string)context.ActionArguments["activityCode"]; var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); - var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != "GUEST"); + var is_personAMember = activityMembers.Any(x => x.Username.ToLower().Equals(user_name.ToLower()) && x.Participation != "GUEST"); if (is_personAMember) return true; return false; @@ -250,7 +250,7 @@ private async Task CanReadPartialAsync(string resource) { // Only the person itself or an admin can see someone's chapel attendance var username_requested = context.ActionArguments["username"]; - var is_creditOwner = username_requested.ToString().Equals(user_name); + var is_creditOwner = username_requested.ToString().ToLower().Equals(user_name.ToLower()); return is_creditOwner; } @@ -260,7 +260,7 @@ private async Task CanReadPartialAsync(string resource) // An activity leader should be able to see the membership requests that belong to the activity s/he is leading. var activityCode = (string)context.ActionArguments["id"]; var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); + var isGroupAdmin = groupAdmins.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to return true; return false; @@ -281,17 +281,17 @@ private async Task CanReadPartialAsync(string resource) var activityCode = (string?)context.ActionArguments["activityCode"]; var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); - var is_activity_leader = leaders.Any(x => x.Username == user_name); + var is_activity_leader = leaders.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_activity_leader) return true; var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - var is_activityAdvisor = advisors.Any(x => x.Username == user_name); + var is_activityAdvisor = advisors.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_activityAdvisor) return true; var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); + var is_groupAdmin = groupAdmin.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_groupAdmin) return true; @@ -425,7 +425,7 @@ private async Task CanAddAsync(string resource) var activityCode = membershipToConsider.ACT_CDE; var sessionCode = membershipToConsider.SESS_CDE; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. return true; return false; @@ -500,7 +500,7 @@ private async Task CanUpdateAsync(string resource) var sessionCode = membershipToConsider.SESS_CDE; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) return true; // Activity Advisors can update memberships of people in their activity. @@ -532,7 +532,7 @@ private async Task CanUpdateAsync(string resource) var membershipID = (int)context.ActionArguments["id"]; var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; + var is_membershipOwner = membershipToConsider.Username.ToLower().Equals(user_name.ToLower()); if (is_membershipOwner) return true; @@ -577,7 +577,7 @@ private async Task CanUpdateAsync(string resource) var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; var activityCode = membershipToConsider.ACT_CDE; - var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (is_advisor) return true; // Activity Advisors can update memberships of people in their activity. @@ -601,7 +601,7 @@ private async Task CanUpdateAsync(string resource) return true; var activityCode = (string)context.ActionArguments["id"]; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) return true; return false; @@ -616,7 +616,7 @@ private async Task CanUpdateAsync(string resource) var activityCode = (string)context.ActionArguments["id"]; var sessionCode = (string)context.ActionArguments["sess_cde"]; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) { var activityService = context.HttpContext.RequestServices.GetRequiredService(); @@ -672,13 +672,13 @@ private async Task CanDeleteAsync(string resource) return true; var membershipID = (int)context.ActionArguments["id"]; var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username == user_name; + var is_membershipOwner = membershipToConsider.Username.ToLower().Equals(user_name.ToLower()); if (is_membershipOwner) return true; var activityCode = membershipToConsider.ActivityCode; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) return true; @@ -690,16 +690,15 @@ private async Task CanDeleteAsync(string resource) if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; // membershipRequest = mr - var mrService = new MembershipRequestService(_CCTContext); var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = await mrService.GetAsync(mrID); - var is_mrOwner = mrToConsider.IDNumber.ToString() == user_id; + var mrToConsider = _membershipRequestService.Get(mrID); + var is_mrOwner = mrToConsider.Username.ToLower().Equals(user_name.ToLower()); if (is_mrOwner) return true; var activityCode = mrToConsider.ActivityCode; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); if (isGroupAdmin) return true; diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index d7a3b7240..fd7f29b93 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -154,7 +154,7 @@ public ActionResult GetActivitySubscribersCountForSession(string activityCo /// The session code /// The number of members of the activity [HttpGet] - [Route("activity/{activityCode}/sessions/{sessionCode}/member-count")] + [Route("activities/{activityCode}/sessions/{sessionCode}/member-count")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] public ActionResult GetActivityMembersCountForSession(string activityCode, string sessionCode) { diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 4e506d03a..181b9dfc8 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -15,9 +15,9 @@ public class RequestsController : GordonControllerBase { public IMembershipRequestService _membershipRequestService; - public RequestsController(CCTContext context) + public RequestsController(CCTContext context, IMembershipRequestService membershipRequestService) { - _membershipRequestService = new MembershipRequestService(context); + _membershipRequestService = membershipRequestService; } /// @@ -27,10 +27,9 @@ public RequestsController(CCTContext context) [HttpGet] [Route("")] [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task>> GetAsync() + public ActionResult> Get() { - var all = await _membershipRequestService.GetAllAsync(); - return Ok(all); + return Ok(_membershipRequestService.GetAll()); } /// @@ -41,9 +40,9 @@ public async Task>> GetAsync() [HttpGet] [Route("{id}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> GetAsync(int id) + public ActionResult Get(int id) { - var result = await _membershipRequestService.GetAsync(id); + var result = _membershipRequestService.Get(id); if (result == null) { @@ -60,11 +59,11 @@ public async Task> GetAsync(int id) /// The activity code /// All membership requests associated with the activity [HttpGet] - [Route("activity/{id}")] + [Route("activity/{activityCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY)] - public async Task>> GetMembershipsRequestsForActivityAsync(string id) + public ActionResult> GetMembershipRequestsByActivity(string activityCode) { - var result = await _membershipRequestService.GetMembershipRequestsForActivityAsync(id); + var result = _membershipRequestService.GetMembershipRequestsByActivity(activityCode); if (result == null) { @@ -79,12 +78,12 @@ public async Task>> GetMemberships /// /// All membership requests associated with the student [HttpGet] - [Route("student")] + [Route("current-user")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_REQUEST_BY_STUDENT)] - public async Task>> GetMembershipsRequestsForStudentAsync() + public ActionResult> GetMembershipsRequestsForCurrentUser() { var authenticatedUserUsername = AuthUtils.GetUsername(User); - var result = await _membershipRequestService.GetMembershipRequestsForStudentAsync(authenticatedUserUsername); + var result = _membershipRequestService.GetMembershipRequestsByUsername(authenticatedUserUsername); if (result == null) { @@ -102,9 +101,9 @@ public async Task>> GetMemberships [HttpPost] [Route("", Name = "membershipRequest")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult Post([FromBody] REQUEST membershipRequest) + public async Task> PostAsync([FromBody] RequestUploadViewModel membershipRequest) { - var result = _membershipRequestService.Add(membershipRequest); + var result = await _membershipRequestService.AddAsync(membershipRequest); if (result == null) { @@ -123,9 +122,9 @@ public ActionResult Post([FromBody] REQUEST membershipRequest) [HttpPut] [Route("{id}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult Put(int id, REQUEST membershipRequest) + public async Task> PutAsync(int id, RequestUploadViewModel membershipRequest) { - var result = _membershipRequestService.Update(id, membershipRequest); + var result = await _membershipRequestService.UpdateAsync(id, membershipRequest); if (result == null) { @@ -134,6 +133,7 @@ public ActionResult Put(int id, REQUEST membershipRequest) return Ok(membershipRequest); } + /// /// Sets a membership request to Approved /// @@ -142,9 +142,9 @@ public ActionResult Put(int id, REQUEST membershipRequest) [HttpPost] [Route("{id}/approve")] [StateYourBusiness(operation = Operation.DENY_ALLOW, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult ApproveRequest(int id) + public async Task> ApproveAsync(int id) { - var result = _membershipRequestService.ApproveRequest(id); + var result = await _membershipRequestService.ApproveAsync(id); if (result == null) { @@ -162,9 +162,9 @@ public ActionResult ApproveRequest(int id) [HttpPost] [Route("{id}/deny")] [StateYourBusiness(operation = Operation.DENY_ALLOW, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult DenyRequest(int id) + public async Task> DenyAsync(int id) { - var result = _membershipRequestService.DenyRequest(id); + var result = await _membershipRequestService.DenyAsync(id); if (result == null) { @@ -173,6 +173,7 @@ public ActionResult DenyRequest(int id) return Ok(result); } + /// /// Deletes a membership request /// @@ -181,9 +182,9 @@ public ActionResult DenyRequest(int id) [HttpDelete] [Route("{id}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult Delete(int id) + public async Task> Delete(int id) { - var result = _membershipRequestService.Delete(id); + var result = await _membershipRequestService.DeleteAsync(id); if (result == null) { diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 801f67588..2da8a4e6e 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -707,40 +707,40 @@ Path to the profile image to load - + Gets all Membership Request Objects List of all requests for membership - + Gets a specific Membership Request Object The ID of the membership request A memberships request with the specified id - + Gets the memberships requests for the specified activity The activity code All membership requests associated with the activity - + Gets the memberships requests for the person making the request All membership requests associated with the student - + Creates a new membership request The request to be added The added request if successful. HTTP error message if not. - + Updates a membership request @@ -748,14 +748,14 @@ The updated membership request object The updated request if successful. HTTP error message if not. - + Sets a membership request to Approved The id of the membership request in question. If successful: THe updated membership request wrapped in an OK Http status code. - + Sets the membership request to Denied @@ -1535,62 +1535,62 @@ Service class to facilitate data transactions between the MembershipRequestController and the database - + Generate a new request to join an activity at a participation level higher than 'Guest' - The membership request object + The membership request object The membership request object once it is added - + Approves the request with the specified ID. The ID of the request to be approved The approved membership - + Delete the membershipRequest object whose id is given in the parameters The membership request id A copy of the deleted membership request - + Denies the membership request object whose id is given in the parameters The membership request id - + Get the membership request object whose Id is specified in the parameters. The membership request id If found, returns MembershipRequestViewModel. If not found, returns null. - + Fetches all the membership request objects from the database. MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - + Fetches all the membership requests associated with this activity The activity id MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - + Fetches all the membership requests associated with this student The AD Username of the user MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - + Update an existing membership request object @@ -1625,12 +1625,14 @@ The membership id MembershipViewModel if found, null if not found - + Fetches the memberships associated with the activity whose code is specified by the parameter. The activity code. Optional code of session to get memberships for + Optional filter for group admins + Optional filter for involvement participation type (MEMBR, ADV, LEAD, GUEST) MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. diff --git a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs b/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs deleted file mode 100644 index c5bf59926..000000000 --- a/Gordon360/Models/CCT/ALL_SUPERVISORSResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class ALL_SUPERVISORSResult - { - } -} diff --git a/Gordon360/Models/CCT/Alumni.cs b/Gordon360/Models/CCT/Alumni.cs index 09f249717..1023ca920 100644 --- a/Gordon360/Models/CCT/Alumni.cs +++ b/Gordon360/Models/CCT/Alumni.cs @@ -116,7 +116,7 @@ public partial class Alumni public string AD_Username { get; set; } public int? show_pic { get; set; } public int? preferred_photo { get; set; } - [StringLength(60)] + [StringLength(63)] [Unicode(false)] public string Country { get; set; } [StringLength(50)] diff --git a/Gordon360/Models/CCT/Context/CCTContext.cs b/Gordon360/Models/CCT/Context/CCTContext.cs index 2380c22d4..7d0999d63 100644 --- a/Gordon360/Models/CCT/Context/CCTContext.cs +++ b/Gordon360/Models/CCT/Context/CCTContext.cs @@ -64,6 +64,7 @@ public CCTContext(DbContextOptions options) public virtual DbSet PART_DEF { get; set; } public virtual DbSet Police { get; set; } public virtual DbSet REQUEST { get; set; } + public virtual DbSet RequestView { get; set; } public virtual DbSet RoomAssign { get; set; } public virtual DbSet Rooms { get; set; } public virtual DbSet Save_Bookings { get; set; } @@ -77,7 +78,6 @@ public CCTContext(DbContextOptions options) public virtual DbSet User_Connection_Ids { get; set; } public virtual DbSet User_Rooms { get; set; } public virtual DbSet Users { get; set; } - public virtual DbSet<_360_SLIDER> _360_SLIDER { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -110,8 +110,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { entity.ToView("Alumni"); - entity.Property(e => e.Country).IsFixedLength(); - entity.Property(e => e.grad_student).IsFixedLength(); }); @@ -152,6 +150,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity(entity => { entity.ToView("Countries"); + + entity.Property(e => e.CTY).IsFixedLength(); }); modelBuilder.Entity(entity => @@ -414,6 +414,21 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.SESS_CDE).IsFixedLength(); }); + modelBuilder.Entity(entity => + { + entity.ToView("RequestView"); + + entity.Property(e => e.ActivityCode).IsFixedLength(); + + entity.Property(e => e.ActivityDescription).IsFixedLength(); + + entity.Property(e => e.Participation).IsFixedLength(); + + entity.Property(e => e.ParticipationDescription).IsFixedLength(); + + entity.Property(e => e.SessionCode).IsFixedLength(); + }); + modelBuilder.Entity(entity => { entity.ToView("RoomAssign"); @@ -456,8 +471,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.ToView("Student"); entity.Property(e => e.BuildingDescription).IsFixedLength(); - - entity.Property(e => e.Country).IsFixedLength(); }); modelBuilder.Entity(entity => @@ -468,11 +481,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.SNID).ValueGeneratedNever(); }); - modelBuilder.Entity<_360_SLIDER>(entity => - { - entity.ToView("360_SLIDER"); - }); - modelBuilder.HasSequence("Information_Change_Request_Seq"); OnModelCreatingGeneratedProcedures(modelBuilder); diff --git a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs index 7694bd6c8..a920ddad9 100644 --- a/Gordon360/Models/CCT/Context/CCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/CCTContextProcedures.cs @@ -41,7 +41,6 @@ protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); @@ -95,9 +94,6 @@ protected void OnModelCreatingGeneratedProcedures(ModelBuilder modelBuilder) modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); - modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); modelBuilder.Entity().HasNoKey().ToView(null); @@ -282,53 +278,6 @@ public virtual async Task> ALL_REQUESTSAsync(OutputPara return _; } - public virtual async Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[ALL_SUPERVISORS]", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "username", - Size = 64, - Value = username ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.VarChar, - }, - parameterreturnValue, - }; - var _ = await _context.Database.ExecuteSqlRawAsync("EXEC @returnValue = [dbo].[CAN_READ_STUDENT_SCHEDULES] @username", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - public virtual async Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) { var parameterreturnValue = new SqlParameter @@ -2976,85 +2925,6 @@ public virtual async Task> STUDENT_JOBS_PER_ return _; } - public virtual async Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "SUP_ID", - Value = SUP_ID ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISOR_PER_SUP_ID] @SUP_ID", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ACT_CDE", - Size = 8, - Value = ACT_CDE ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Char, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ACT_CDE] @ACT_CDE", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - - public virtual async Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default) - { - var parameterreturnValue = new SqlParameter - { - ParameterName = "returnValue", - Direction = System.Data.ParameterDirection.Output, - SqlDbType = System.Data.SqlDbType.Int, - }; - - var sqlParameters = new [] - { - new SqlParameter - { - ParameterName = "ID_NUM", - Value = ID_NUM ?? Convert.DBNull, - SqlDbType = System.Data.SqlDbType.Int, - }, - parameterreturnValue, - }; - var _ = await _context.SqlQueryAsync("EXEC @returnValue = [dbo].[SUPERVISORS_PER_ID_NUM] @ID_NUM", sqlParameters, cancellationToken); - - returnValue?.SetValue(parameterreturnValue.Value); - - return _; - } - public virtual async Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default) { var parameterreturnValue = new SqlParameter diff --git a/Gordon360/Models/CCT/Context/DbContextExtensions.cs b/Gordon360/Models/CCT/Context/DbContextExtensions.cs index 925c7e6ee..ac138237e 100644 --- a/Gordon360/Models/CCT/Context/DbContextExtensions.cs +++ b/Gordon360/Models/CCT/Context/DbContextExtensions.cs @@ -1,4 +1,5 @@ // This file has been auto generated by EF Core Power Tools. +using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; @@ -30,6 +31,12 @@ public static async Task> SqlQueryAsync(this DbContext db, string sql return default; } } + public static async Task GetNextValueForSequence(this DbContext _context, Sequence sequence) + { + SqlParameter result = new SqlParameter("@result", System.Data.SqlDbType.Int) { Direction = System.Data.ParameterDirection.Output }; + await _context.Database.ExecuteSqlRawAsync($"SELECT @result = (NEXT VALUE FOR [{CCTSequenceEnum.GetDescription(sequence)}])", result); + return (int)result.Value; + } } public class OutputParameter diff --git a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs index 71317783e..84db0e2a5 100644 --- a/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs +++ b/Gordon360/Models/CCT/Context/ICCTContextProcedures.cs @@ -19,8 +19,6 @@ public partial interface ICCTContextProcedures Task> ALL_BASIC_INFO_NOT_ALUMNIAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> ALL_MEMBERSHIPSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> ALL_REQUESTSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> ALL_SUPERVISORSAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task CAN_READ_STUDENT_SCHEDULESAsync(string username, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task CANCEL_RIDEAsync(int? STUDENT_ID, string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task CHECK_IDAsync(string _id, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> COURSES_FOR_PROFESSORAsync(int? professor_id, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); @@ -103,9 +101,6 @@ public partial interface ICCTContextProcedures Task> RIDERS_BY_RIDE_IDAsync(string RIDE_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> STUDENT_COURSES_BY_ID_NUM_AND_SESS_CDEAsync(int? id_num, string sess_cde, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> STUDENT_JOBS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISOR_PER_SUP_IDAsync(int? SUP_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ACT_CDEAsync(string ACT_CDE, OutputParameter returnValue = null, CancellationToken cancellationToken = default); - Task> SUPERVISORS_PER_ID_NUMAsync(int? ID_NUM, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task TRUNCATE_AA_ALL_APPLICATION_TABLESAsync(OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> UPCOMING_RIDESAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); Task> UPCOMING_RIDES_BY_STUDENT_IDAsync(int? STUDENT_ID, OutputParameter returnValue = null, CancellationToken cancellationToken = default); diff --git a/Gordon360/Models/CCT/Context/efpt.CCT.config.json b/Gordon360/Models/CCT/Context/efpt.CCT.config.json index 1ed4fb92c..e8ddb5edc 100644 --- a/Gordon360/Models/CCT/Context/efpt.CCT.config.json +++ b/Gordon360/Models/CCT/Context/efpt.CCT.config.json @@ -138,10 +138,6 @@ "Name": "[dbo].[Users]", "ObjectType": 0 }, - { - "Name": "[dbo].[360_SLIDER]", - "ObjectType": 3 - }, { "Name": "[dbo].[ACCOUNT]", "ObjectType": 3 @@ -238,6 +234,10 @@ "Name": "[dbo].[Police]", "ObjectType": 3 }, + { + "Name": "[dbo].[RequestView]", + "ObjectType": 3 + }, { "Name": "[dbo].[RoomAssign]", "ObjectType": 3 @@ -278,14 +278,6 @@ "Name": "[dbo].[ALL_REQUESTS]", "ObjectType": 1 }, - { - "Name": "[dbo].[ALL_SUPERVISORS]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[CAN_READ_STUDENT_SCHEDULES]", - "ObjectType": 1 - }, { "Name": "[dbo].[CANCEL_RIDE]", "ObjectType": 1 @@ -614,18 +606,6 @@ "Name": "[dbo].[STUDENT_JOBS_PER_ID_NUM]", "ObjectType": 1 }, - { - "Name": "[dbo].[SUPERVISOR_PER_SUP_ID]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ACT_CDE]", - "ObjectType": 1 - }, - { - "Name": "[dbo].[SUPERVISORS_PER_ID_NUM]", - "ObjectType": 1 - }, { "Name": "[dbo].[TRUNCATE_AA_ALL_APPLICATION_TABLES]", "ObjectType": 1 diff --git a/Gordon360/Models/CCT/Countries.cs b/Gordon360/Models/CCT/Countries.cs index 4408ed953..30ce88af6 100644 --- a/Gordon360/Models/CCT/Countries.cs +++ b/Gordon360/Models/CCT/Countries.cs @@ -12,7 +12,7 @@ namespace Gordon360.Models.CCT public partial class Countries { [Required] - [StringLength(31)] + [StringLength(2)] [Unicode(false)] public string CTY { get; set; } [Required] diff --git a/Gordon360/Models/CCT/FacStaff.cs b/Gordon360/Models/CCT/FacStaff.cs index db604258c..562b3897e 100644 --- a/Gordon360/Models/CCT/FacStaff.cs +++ b/Gordon360/Models/CCT/FacStaff.cs @@ -100,7 +100,7 @@ public partial class FacStaff [StringLength(50)] [Unicode(false)] public string Email { get; set; } - public int? ActiveAccount { get; set; } + public bool? ActiveAccount { get; set; } [StringLength(7)] [Unicode(false)] public string Type { get; set; } diff --git a/Gordon360/Models/CCT/RequestView.cs b/Gordon360/Models/CCT/RequestView.cs new file mode 100644 index 000000000..d2f645f17 --- /dev/null +++ b/Gordon360/Models/CCT/RequestView.cs @@ -0,0 +1,59 @@ +// This file has been auto generated by EF Core Power Tools. +#nullable disable +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Gordon360.Models.CCT +{ + [Keyless] + public partial class RequestView + { + public int RequestID { get; set; } + [Column(TypeName = "datetime")] + public DateTime DateSent { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string ActivityCode { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ActivityDescription { get; set; } + [Unicode(false)] + public string ActivityImagePath { get; set; } + [Required] + [StringLength(8)] + [Unicode(false)] + public string SessionCode { get; set; } + [StringLength(1000)] + [Unicode(false)] + public string SessionDescription { get; set; } + [StringLength(50)] + [Unicode(false)] + public string Username { get; set; } + [StringLength(50)] + [Unicode(false)] + public string FirstName { get; set; } + [StringLength(50)] + [Unicode(false)] + public string LastName { get; set; } + [Required] + [StringLength(5)] + [Unicode(false)] + public string Participation { get; set; } + [Required] + [StringLength(45)] + [Unicode(false)] + public string ParticipationDescription { get; set; } + [StringLength(45)] + [Unicode(false)] + public string Description { get; set; } + [Required] + [StringLength(20)] + [Unicode(false)] + public string Status { get; set; } + } +} \ No newline at end of file diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs deleted file mode 100644 index 32005ca47..000000000 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ACT_CDEResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ACT_CDEResult - { - } -} diff --git a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs b/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs deleted file mode 100644 index 794cec48a..000000000 --- a/Gordon360/Models/CCT/SUPERVISORS_PER_ID_NUMResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISORS_PER_ID_NUMResult - { - } -} diff --git a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs b/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs deleted file mode 100644 index 7cd66b8e8..000000000 --- a/Gordon360/Models/CCT/SUPERVISOR_PER_SUP_IDResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -// This file has been auto generated by EF Core Power Tools. -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Gordon360.Models.CCT -{ - public partial class SUPERVISOR_PER_SUP_IDResult - { - } -} diff --git a/Gordon360/Models/CCT/Student.cs b/Gordon360/Models/CCT/Student.cs index e4bd69501..f77fe3842 100644 --- a/Gordon360/Models/CCT/Student.cs +++ b/Gordon360/Models/CCT/Student.cs @@ -162,7 +162,7 @@ public partial class Student public string AD_Username { get; set; } public int? show_pic { get; set; } public int? preferred_photo { get; set; } - [StringLength(60)] + [StringLength(63)] [Unicode(false)] public string Country { get; set; } [StringLength(45)] diff --git a/Gordon360/Models/CCT/_360_SLIDER.cs b/Gordon360/Models/CCT/_360_SLIDER.cs deleted file mode 100644 index 25ac946c6..000000000 --- a/Gordon360/Models/CCT/_360_SLIDER.cs +++ /dev/null @@ -1,52 +0,0 @@ -// This file has been auto generated by EF Core Power Tools. -#nullable disable -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Microsoft.EntityFrameworkCore; - -namespace Gordon360.Models.CCT -{ - [Keyless] - public partial class _360_SLIDER - { - [Required] - [StringLength(150)] - [Unicode(false)] - public string strFileName { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strFlashFileName { get; set; } - [Required] - [StringLength(255)] - [Unicode(false)] - public string strAltTag { get; set; } - [Required] - [StringLength(500)] - [Unicode(false)] - public string strLinkURL { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderSubTitle { get; set; } - [Required] - [StringLength(1)] - [Unicode(false)] - public string strSliderAction { get; set; } - public int iWidth { get; set; } - public int iHeight { get; set; } - [Required] - [StringLength(11)] - [Unicode(false)] - public string strExtensions { get; set; } - [Column(TypeName = "datetime")] - public DateTime dtModified { get; set; } - public int sortOrder { get; set; } - } -} \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index 64b0fea46..1d4da790d 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -11,5 +11,18 @@ public partial class MembershipUploadViewModel public string CommentText { get; set; } public bool GroupAdmin { get; set; } public bool Privacy { get; set; } + public static MembershipUploadViewModel FromREQUEST(REQUEST request) + { + return new MembershipUploadViewModel + { + ACTCode = request.ACT_CDE, + SessCode = request.SESS_CDE, + PartCode = request.PART_CDE, + CommentText = request.COMMENT_TXT, + GroupAdmin = false, + Privacy = false + }; + } } + } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/RequestUploadViewModel.cs b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs new file mode 100644 index 000000000..61e13c376 --- /dev/null +++ b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs @@ -0,0 +1,43 @@ +using Gordon360.Services; +using System; + +namespace Gordon360.Models.CCT +{ + public partial class RequestUploadViewModel + { + public string ACTCode { get; set; } + public string SessCode { get; set; } + public string Username { get; set; } + public string PartCode { get; set; } + public DateTime DateSent { get; set; } + public string CommentText { get; set; } + public string Status { get; set; } + + public REQUEST ToREQUEST() + { + return new REQUEST + { + ACT_CDE = this.ACTCode, + SESS_CDE = this.SessCode, + PART_CDE = this.PartCode, + DATE_SENT = this.DateSent, + COMMENT_TXT = this.CommentText, + STATUS = this.Status + }; + } + + public MembershipUploadViewModel ToMembershipUpload() + { + return new MembershipUploadViewModel + { + ACTCode = this.ACTCode, + SessCode = this.SessCode, + Username = this.Username, + PartCode = this.PartCode, + CommentText = this.CommentText, + GroupAdmin = false, + Privacy = false + }; + } + } +} \ No newline at end of file diff --git a/Gordon360/Program.cs b/Gordon360/Program.cs index 7bd2175d1..009a1b4e3 100644 --- a/Gordon360/Program.cs +++ b/Gordon360/Program.cs @@ -46,6 +46,7 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddMemoryCache(); diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 1c0192195..9b5219670 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -16,28 +16,36 @@ namespace Gordon360.Services public class MembershipRequestService : IMembershipRequestService { private CCTContext _context; + private IMembershipService _membershipService; + private IAccountService _accountService; - public MembershipRequestService(CCTContext context) + public MembershipRequestService(CCTContext context, IMembershipService membershipService, IAccountService accountService) { _context = context; + _membershipService = membershipService; + _accountService = accountService; } /// /// Generate a new request to join an activity at a participation level higher than 'Guest' /// - /// The membership request object + /// The membership request object /// The membership request object once it is added - public REQUEST Add(REQUEST membershipRequest) + public async Task AddAsync(RequestUploadViewModel membershipRequestUpload) { + + MembershipUploadViewModel m = membershipRequestUpload.ToMembershipUpload(); // Validates the memberships request by throwing appropriate exceptions. The exceptions are caugth in the CustomExceptionFilter - ValidateMembershipRequest(membershipRequest); - IsPersonAlreadyInActivity(membershipRequest); + await _membershipService.ValidateMembershipAsync(m); + _membershipService.IsPersonAlreadyInActivity(m); + + var request = membershipRequestUpload.ToREQUEST(); + request.ID_NUM = int.Parse(_accountService.GetAccountByUsername(membershipRequestUpload.Username).GordonID); - membershipRequest.STATUS = Request_Status.PENDING; - var addedMembershipRequest = _context.REQUEST.Add(membershipRequest); + var addedMembershipRequest = _context.REQUEST.Add(request); _context.SaveChanges(); - return membershipRequest; + return Get(addedMembershipRequest.Entity.REQUEST_ID); } @@ -46,65 +54,19 @@ public REQUEST Add(REQUEST membershipRequest) /// /// The ID of the request to be approved /// The approved membership - public MEMBERSHIP ApproveRequest(int requestID) + public async Task ApproveAsync(int requestID) { - var query = _context.REQUEST.Find(requestID); - if (query == null) + var request = await _context.REQUEST.FindAsync(requestID); + if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - query.STATUS = Request_Status.APPROVED; - - MEMBERSHIP newMembership = new MEMBERSHIP - { - ACT_CDE = query.ACT_CDE, - ID_NUM = query.ID_NUM, - SESS_CDE = query.SESS_CDE, - PART_CDE = query.PART_CDE, - BEGIN_DTE = DateTime.Now, - COMMENT_TXT = "", - GRP_ADMIN = false - }; - - MEMBERSHIP created; - - var personAlreadyInActivity = _context.MEMBERSHIP.Where(x => x.SESS_CDE == query.SESS_CDE && - x.ACT_CDE == query.ACT_CDE && x.ID_NUM == query.ID_NUM); - - // If the person is already in the activity, we simply change his or her role - if (personAlreadyInActivity.Any()) - { - created = personAlreadyInActivity.First(); - - if (created == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "There was an error creating the membership." }; - } - - // Simply change role and comment - created.COMMENT_TXT = newMembership.COMMENT_TXT; - created.PART_CDE = newMembership.PART_CDE; - } - // Else, we add him or her to the activity - else - { - // The add will fail if they are already a member. - var added = _context.MEMBERSHIP.Add(newMembership); - - if (added == null) - { - // The main reason why a membership won't be added is if a similar one (similar id_num, part_lvl, sess_cde and act_cde ) exists. - throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; - } - else - { - created = newMembership; - } - } + request.STATUS = Request_Status.APPROVED; - _context.SaveChanges(); + MembershipUploadViewModel newMembership = MembershipUploadViewModel.FromREQUEST(request); + newMembership.Username = _accountService.GetAccountByID(request.ID_NUM.ToString()).ADUserName; - return created; + return await _membershipService.AddAsync(newMembership); } @@ -113,16 +75,20 @@ public MEMBERSHIP ApproveRequest(int requestID) /// /// The membership request id /// A copy of the deleted membership request - public REQUEST Delete(int requestID) + public async Task DeleteAsync(int requestID) { - var result = _context.REQUEST.Find(requestID); - if (result == null) + var request = await _context.REQUEST.FindAsync(requestID); + if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - _context.REQUEST.Remove(result); - _context.SaveChanges(); - return result; + + RequestView rv = _context.RequestView.FirstOrDefault(r => r.RequestID == request.REQUEST_ID); + + _context.REQUEST.Remove(request); + await _context.SaveChangesAsync(); + + return rv; } /// @@ -130,17 +96,19 @@ public REQUEST Delete(int requestID) /// /// The membership request id /// - public REQUEST DenyRequest(int requestID) + public async Task DenyAsync(int requestID) { - var query = _context.REQUEST.Find(requestID); - if (query == null) + var request = await _context.REQUEST.FindAsync(requestID); + + if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - query.STATUS = Request_Status.DENIED; - _context.SaveChanges(); - return query; + request.STATUS = Request_Status.DENIED; + await _context.SaveChangesAsync(); + + return _context.RequestView.FirstOrDefault(r => r.RequestID == request.REQUEST_ID); } /// @@ -148,60 +116,25 @@ public REQUEST DenyRequest(int requestID) /// /// The membership request id /// If found, returns MembershipRequestViewModel. If not found, returns null. - public async Task GetAsync(int requestID) + public RequestView Get(int requestID) { - var requests = await _context.Procedures.REQUEST_PER_REQUEST_IDAsync(requestID); + var request = _context.RequestView.FirstOrDefault(r => r.RequestID == requestID); - if (requests == null || requests.Count != 1) + if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - var result = requests[0]; - - return new MembershipRequestViewModel - { - ActivityCode = result.ActivityCode.Trim(), - ActivityDescription = result.ActivityDescription.Trim(), - IDNumber = result.IDNumber, - FirstName = result.FirstName.Trim(), - LastName = result.LastName.Trim(), - Participation = result.Participation.Trim(), - ParticipationDescription = result.ParticipationDescription.Trim(), - DateSent = result.DateSent, - RequestID = result.RequestID, - CommentText = result.CommentText.Trim(), - SessionCode = result.SessionCode.Trim(), - SessionDescription = result.SessionDescription.Trim(), - RequestApproved = result.RequestApproved.Trim(), - }; + return request; } /// /// Fetches all the membership request objects from the database. /// /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - public async Task> GetAllAsync() + public IEnumerable GetAll() { - - var allRequests = await _context.Procedures.ALL_REQUESTSAsync(); - - return allRequests.Select(r => new MembershipRequestViewModel - { - ActivityCode = r.ActivityCode.Trim(), - ActivityDescription = r.ActivityDescription.Trim(), - IDNumber = r.IDNumber, - FirstName = r.FirstName.Trim(), - LastName = r.LastName.Trim(), - Participation = r.Participation.Trim(), - ParticipationDescription = r.ParticipationDescription.Trim(), - DateSent = r.DateSent, - RequestID = r.RequestID, - CommentText = r.CommentText.Trim(), - SessionCode = r.SessionCode.Trim(), - SessionDescription = r.SessionDescription.Trim(), - RequestApproved = r.RequestApproved.Trim(), - }); + return _context.RequestView; } /// @@ -209,26 +142,9 @@ public async Task> GetAllAsync() /// /// The activity id /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - public async Task> GetMembershipRequestsForActivityAsync(string activityCode) + public IEnumerable GetMembershipRequestsByActivity(string activityCode) { - var allRequests = await _context.Procedures.REQUESTS_PER_ACT_CDEAsync(activityCode); - - return allRequests.Select(r => new MembershipRequestViewModel - { - ActivityCode = r.ActivityCode.Trim(), - ActivityDescription = r.ActivityDescription.Trim(), - IDNumber = r.IDNumber, - FirstName = r.FirstName.Trim(), - LastName = r.LastName.Trim(), - Participation = r.Participation.Trim(), - ParticipationDescription = r.ParticipationDescription.Trim(), - DateSent = r.DateSent, - RequestID = r.RequestID, - CommentText = r.CommentText.Trim(), - SessionCode = r.SessionCode.Trim(), - SessionDescription = r.SessionDescription.Trim(), - RequestApproved = r.RequestApproved.Trim(), - }); + return _context.RequestView.Where(r => r.ActivityCode == activityCode); } /// @@ -236,27 +152,9 @@ public async Task> GetMembershipRequests /// /// The AD Username of the user /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - public async Task> GetMembershipRequestsForStudentAsync(string username) + public IEnumerable GetMembershipRequestsByUsername(string username) { - var account = new AccountService(_context).GetAccountByUsername(username); - var allRequests = await _context.Procedures.REQUESTS_PER_STUDENT_IDAsync(int.Parse(account.GordonID)); - - return allRequests.Select(r => new MembershipRequestViewModel - { - ActivityCode = r.ActivityCode.Trim(), - ActivityDescription = r.ActivityDescription.Trim(), - IDNumber = r.IDNumber, - FirstName = r.FirstName.Trim(), - LastName = r.LastName.Trim(), - Participation = r.Participation.Trim(), - ParticipationDescription = r.ParticipationDescription.Trim(), - DateSent = r.DateSent, - RequestID = r.RequestID, - CommentText = r.CommentText.Trim(), - SessionCode = r.SessionCode.Trim(), - SessionDescription = r.SessionDescription.Trim(), - RequestApproved = r.RequestApproved.Trim(), - }); + return _context.RequestView.Where(r => r.Username == username); } /// @@ -265,74 +163,26 @@ public async Task> GetMembershipRequests /// The membership request id /// The newly modified membership request /// - public REQUEST Update(int requestID, REQUEST membershipRequest) + public async Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest) { - var original = _context.REQUEST.Find(requestID); + var original = await _context.REQUEST.FindAsync(requestID); if (original == null) { - return null; + throw new ResourceNotFoundException { ExceptionMessage = "The Request was not found." }; } - // The validate function throws ResourceNotFoundExceptino where needed. The exceptions are caught in my CustomExceptionFilter - ValidateMembershipRequest(membershipRequest); + // The validate function throws ResourceNotFoundException where needed. The exceptions are caught in my CustomExceptionFilter + await _membershipService.ValidateMembershipAsync(membershipRequest.ToMembershipUpload()); // Only a few fields should be able to be changed through an update. - original.SESS_CDE = membershipRequest.SESS_CDE; - original.COMMENT_TXT = membershipRequest.COMMENT_TXT; - original.DATE_SENT = membershipRequest.DATE_SENT; - original.PART_CDE = membershipRequest.PART_CDE; - - _context.SaveChanges(); - - return original; - } - - // Helper method to help validate a membership request that comes in. - // Return true if it is valid. Throws an exception if not. Exception is cauth in an Exception filter. - private bool ValidateMembershipRequest(REQUEST membershipRequest) - { - var personExists = _context.ACCOUNT.Where(x => x.gordon_id.Trim() == membershipRequest.ID_NUM.ToString()).Any(); - if (!personExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; - } - var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membershipRequest.ACT_CDE).Any(); - if (!activityExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; - } - var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membershipRequest.PART_CDE).Any(); - if (!participationExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Participation level was not found." }; - } - var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membershipRequest.SESS_CDE).Any(); - if (!sessionExists) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; - } - // Check for a pending request - var pendingRequest = _context.REQUEST.Any(x => x.ID_NUM == membershipRequest.ID_NUM && - x.SESS_CDE.Equals(membershipRequest.SESS_CDE) && x.ACT_CDE.Equals(membershipRequest.ACT_CDE) && - x.STATUS.Equals("Pending")); - if (pendingRequest) - { - throw new ResourceCreationException() { ExceptionMessage = "A request for this activity has already been made for you and is awaiting group leader approval." }; - } - - return true; - } + original.SESS_CDE = membershipRequest.SessCode; + original.COMMENT_TXT = membershipRequest.CommentText; + original.DATE_SENT = membershipRequest.DateSent; + original.PART_CDE = membershipRequest.PartCode; - private bool IsPersonAlreadyInActivity(REQUEST membershipRequest) - { - var personAlreadyInActivity = _context.MEMBERSHIP.Where(x => x.SESS_CDE == membershipRequest.SESS_CDE && - x.ACT_CDE == membershipRequest.ACT_CDE && x.ID_NUM == membershipRequest.ID_NUM).Any(); - if (personAlreadyInActivity) - { - throw new ResourceCreationException() { ExceptionMessage = "You are already part of the activity." }; - } + await _context.SaveChangesAsync(); - return true; + return _context.RequestView.FirstOrDefault(r => r.RequestID == original.REQUEST_ID); ; } } } \ No newline at end of file diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index b2d5ec2f2..dfd7de599 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -38,14 +38,14 @@ public async Task AddAsync(MembershipUploadViewModel membership) await ValidateMembershipAsync(membership); IsPersonAlreadyInActivity(membership); - + MEMBERSHIP m = MembershipUploadToMEMBERSHIP(membership); // The Add() method returns the added membership. - var payload = await _context.MEMBERSHIP.AddAsync(MembershipUploadToMEMBERSHIP(membership)); + var payload = await _context.MEMBERSHIP.AddAsync(m); // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) if (payload?.Entity == null) { - throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership. Verify that a similar membership doesn't already exist." }; + throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership." }; } else { await _context.SaveChangesAsync(); @@ -293,7 +293,7 @@ public async Task SetPrivacyAsync(int membershipID, bool isPriva /// /// The membership to validate /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - private async Task ValidateMembershipAsync(MembershipUploadViewModel membership) + public async Task ValidateMembershipAsync(MembershipUploadViewModel membership) { var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username).Any(); if (!personExists) @@ -324,7 +324,7 @@ private async Task ValidateMembershipAsync(MembershipUploadViewModel membe return true; } - private bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) + public bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) { var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); @@ -396,7 +396,7 @@ public class ParticipationType /// /// The MembershipUploadViewModel to convert /// A new MEMBERSHIP object filled with the info from the view model - private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) + public MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) { var sessionCode = _context.CM_SESSION_MSTR .Where(x => x.SESS_CDE.Equals(membership.SessCode)) @@ -410,7 +410,8 @@ private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel member PART_CDE = membership.PartCode, COMMENT_TXT = membership.CommentText, GRP_ADMIN = membership.GroupAdmin, - PRIVACY = membership.Privacy + PRIVACY = membership.Privacy, + USER_NAME = Environment.UserName }; } @@ -419,7 +420,7 @@ private MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel member /// /// The MEMBERSHIP to match on MembershipID /// The found MembershipView object corresponding to the MEMBERSHIP by ID - private MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) + public MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) { var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index a4e5463e9..d65e07bd6 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -186,6 +186,9 @@ public IEnumerable GetMembershipsForActivity( MembershipView Delete(int membershipID); bool IsGroupAdmin(string username); public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); + public MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership); + Task ValidateMembershipAsync(MembershipUploadViewModel membership); + public bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest); } public interface IJobsService @@ -212,16 +215,16 @@ public interface IParticipationService public interface IMembershipRequestService { - Task GetAsync(int requestID); - Task> GetAllAsync(); - Task> GetMembershipRequestsForActivityAsync(string activityCode); - Task> GetMembershipRequestsForStudentAsync(string usernamne); - REQUEST Add(REQUEST membershipRequest); - REQUEST Update(int requestID, REQUEST membershipRequest); + RequestView Get(int requestID); + IEnumerable GetAll(); + IEnumerable GetMembershipRequestsByActivity(string activityCode); + IEnumerable GetMembershipRequestsByUsername(string usernamne); + Task AddAsync(RequestUploadViewModel membershipRequest); + Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); // The ODD one out. When we approve a request, we would like to get back the new membership. - MEMBERSHIP ApproveRequest(int requestID); - REQUEST DenyRequest(int requestID); - REQUEST Delete(int requestID); + Task ApproveAsync(int requestID); + Task DenyAsync(int requestID); + Task DeleteAsync(int requestID); } public interface IScheduleService { diff --git a/Gordon360/Static Classes/Names.cs b/Gordon360/Static Classes/Names.cs index 10191f78f..0baa22cb2 100644 --- a/Gordon360/Static Classes/Names.cs +++ b/Gordon360/Static Classes/Names.cs @@ -82,5 +82,10 @@ public static class Request_Status public const string PENDING = "Pending"; public const string APPROVED = "Approved"; public const string DENIED = "Denied"; + private static string[] options = new string[] { PENDING, APPROVED, DENIED }; + public static string[] GetOptions() + { + return options; + } } } From 35ab6546cc6378a5f4c060d2f5daf13c3f328810 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 11:05:36 -0400 Subject: [PATCH 16/49] Cleanup and changes requested by @EJPlatzer --- Gordon360/Authorization/StateYourBusiness.cs | 327 ++++++++---------- Gordon360/Controllers/EmailsController.cs | 17 +- .../Controllers/MembershipsController.cs | 141 ++------ Gordon360/Controllers/ProfilesController.cs | 53 ++- Gordon360/Controllers/RequestsController.cs | 71 ++-- Gordon360/Documentation/Gordon360.xml | 13 +- Gordon360/Gordon360.csproj | 3 + .../ViewModels/MembershipUploadViewModel.cs | 34 +- .../Models/ViewModels/MembershipViewModel.cs | 31 -- .../ViewModels/RequestUploadViewModel.cs | 28 +- Gordon360/Services/EmailService.cs | 4 +- .../Services/MembershipRequestService.cs | 88 ++++- Gordon360/Services/MembershipService.cs | 150 ++++---- Gordon360/Services/ServiceInterfaces.cs | 14 +- Gordon360/Static Classes/Names.cs | 11 +- 15 files changed, 440 insertions(+), 545 deletions(-) delete mode 100644 Gordon360/Models/ViewModels/MembershipViewModel.cs diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index 9e0c70f64..62ba230ae 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -51,25 +51,18 @@ public class StateYourBusiness : ActionFilterAttribute private string user_id { get; set; } private string user_name { get; set; } - public async Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next, IConfiguration _config) + public async override Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next) { context = actionContext; _webHostEnvironment = context.HttpContext.RequestServices.GetService(); // Step 1: Who is to be authorized var authenticatedUser = actionContext.HttpContext.User; - var optionsBuilderCCT = new DbContextOptionsBuilder(); - optionsBuilderCCT.UseSqlServer(_config.GetConnectionString("CCT")); - _CCTContext = new CCTContext(optionsBuilderCCT.Options); - var optionsBuilderMyGordon = new DbContextOptionsBuilder(); - optionsBuilderMyGordon.UseSqlServer(_config.GetConnectionString("MyGordon")); - _MyGordonContext = new MyGordonContext(optionsBuilderMyGordon.Options); - - _accountService = new AccountService(_CCTContext); - _membershipService = new MembershipService(_CCTContext, _accountService); - _membershipRequestService = new MembershipRequestService(_CCTContext, _membershipService, _accountService); + _accountService = context.HttpContext.RequestServices.GetRequiredService(); + _membershipService = context.HttpContext.RequestServices.GetRequiredService(); + _membershipRequestService = context.HttpContext.RequestServices.GetRequiredService(); user_name = AuthUtils.GetUsername(authenticatedUser); user_groups = AuthUtils.GetGroups(authenticatedUser); @@ -98,7 +91,6 @@ private async Task CanPerformOperationAsync(string resource, string operat Operation.READ_ALL => CanReadAll(resource), Operation.READ_PARTIAL => await CanReadPartialAsync(resource), Operation.ADD => await CanAddAsync(resource), - Operation.DENY_ALLOW => CanDenyAllow(resource), Operation.UPDATE => await CanUpdateAsync(resource), Operation.DELETE => await CanDeleteAsync(resource), Operation.READ_PUBLIC => CanReadPublic(resource), @@ -108,38 +100,6 @@ private async Task CanPerformOperationAsync(string resource, string operat /* * Operations */ - // This operation is specifically for authorizing deny and allow operations on membership requests. These two operations don't - // Fit in nicely with the REST specification which is why there is a seperate case for them. - private bool CanDenyAllow(string resource) - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - switch (resource) - { - - case Resource.MEMBERSHIP_REQUEST: - { - var mrID = (int)context.ActionArguments["activityCode"]; - // Get the view model from the repository - var mrToConsider = _membershipRequestService.Get(mrID); - // Populate the membershipRequest manually. Omit fields I don't need. - var activityCode = mrToConsider.ActivityCode; - var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (is_activityLeader) // If user is the leader of the activity that the request is sent to. - return true; - var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (is_activityAdvisor) // If user is the advisor of the activity that the request is sent to. - return true; - - return false; - } - default: return false; - - } - } - private async Task CanReadOneAsync(string resource) { // User is admin @@ -156,24 +116,25 @@ private async Task CanReadOneAsync(string resource) else { var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name.ToLower()); - return isSelf; + return username == user_name; } case Resource.MEMBERSHIP: return true; case Resource.MEMBERSHIP_REQUEST: { // membershipRequest = mr - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = _membershipRequestService.Get(mrID); - var is_mrOwner = mrToConsider.Username.Equals(user_name.ToLower()); // User_id is an instance variable. + if (context.ActionArguments["id"] is int mrID) + { + var mrToConsider = _membershipRequestService.Get(mrID); + var is_mrOwner = mrToConsider.Username == user_name; // User_id is an instance variable. - if (is_mrOwner) // If user owns the request - return true; + if (is_mrOwner) // If user owns the request + return true; - var isGroupAdmin = (_membershipService.GetGroupAdminMembershipsForActivity(mrToConsider.ActivityCode, mrToConsider.SessionCode)).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(mrToConsider.ActivityCode, mrToConsider.SessionCode).Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + } return false; } @@ -233,24 +194,21 @@ private async Task CanReadPartialAsync(string resource) case Resource.MEMBERSHIP_BY_ACTIVITY: { // Only people that are part of the activity should be able to see members - var activityCode = (string)context.ActionArguments["activityCode"]; - var activityMembers = _membershipService.GetMembershipsForActivity(activityCode, null); - var is_personAMember = activityMembers.Any(x => x.Username.ToLower().Equals(user_name.ToLower()) && x.Participation != "GUEST"); - if (is_personAMember) - return true; + if (context.ActionArguments["activityCode"] is string activityCode) + { + var activityMembers = _membershipService.GetMembershipsForActivity(activityCode); + var is_personAMember = activityMembers.Any(x => x.Username == user_name && x.Participation != MembershipService.ParticipationType.Guest.Value); + if (is_personAMember) + return true; + } return false; } - case Resource.MEMBERSHIP_BY_STUDENT: - { - // Only the person itself or an admin can see someone's memberships - return (string)context.ActionArguments["id"] == user_id; - } case Resource.EVENTS_BY_STUDENT_ID: { // Only the person itself or an admin can see someone's chapel attendance var username_requested = context.ActionArguments["username"]; - var is_creditOwner = username_requested.ToString().ToLower().Equals(user_name.ToLower()); + var is_creditOwner = username_requested == user_name; return is_creditOwner; } @@ -258,18 +216,15 @@ private async Task CanReadPartialAsync(string resource) case Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY: { // An activity leader should be able to see the membership requests that belong to the activity s/he is leading. - var activityCode = (string)context.ActionArguments["id"]; - var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var isGroupAdmin = groupAdmins.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to - return true; + if (context.ActionArguments["activityCode"] is string activityCode) + { + var groupAdmins = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); + var isGroupAdmin = groupAdmins.Any(x => x.Username == user_name); + if (isGroupAdmin) // If user is a group admin of the activity that the request is sent to + return true; + } return false; } - // Since the API only allows asking for your requests (no ID argument), it's always OK. - case Resource.MEMBERSHIP_REQUEST_BY_STUDENT: - { - return true; - } case Resource.EMAILS_BY_ACTIVITY: { // Anyone can view group-admin and advisor emails @@ -281,34 +236,22 @@ private async Task CanReadPartialAsync(string resource) var activityCode = (string?)context.ActionArguments["activityCode"]; var leaders = _membershipService.GetLeaderMembershipsForActivity(activityCode); - var is_activity_leader = leaders.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); + var is_activity_leader = leaders.Any(x => x.Username == user_name); if (is_activity_leader) return true; var advisors = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - var is_activityAdvisor = advisors.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); + var is_activityAdvisor = advisors.Any(x => x.Username == user_name); if (is_activityAdvisor) return true; var groupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode); - var is_groupAdmin = groupAdmin.Any(x => x.Username.ToLower().Equals(user_name.ToLower())); + var is_groupAdmin = groupAdmin.Any(x => x.Username == user_name); if (is_groupAdmin) return true; return false; } - case Resource.ADVISOR_BY_ACTIVITY: - { - return true; - } - case Resource.LEADER_BY_ACTIVITY: - { - return true; - } - case Resource.GROUP_ADMIN_BY_ACTIVITY: - { - return true; - } case Resource.NEWS: { return true; @@ -416,18 +359,25 @@ private async Task CanAddAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - // A membership can always be added if it is of type "GUEST" - var isFollower = membershipToConsider.PART_CDE == Activity_Roles.GUEST && user_id == membershipToConsider.ID_NUM.ToString(); - if (isFollower) - return true; - var activityCode = membershipToConsider.ACT_CDE; - var sessionCode = membershipToConsider.SESS_CDE; + if (context.ActionArguments["membershipUpload"] is MembershipUploadViewModel membershipToConsider) + { - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) // If user is the advisor of the activity that the request is sent to. - return true; + // A membership can always be added if it is of type "GUEST" + var isFollower = membershipToConsider.PartCode == Activity_Roles.GUEST + && membershipToConsider.Username == user_name; + if (isFollower) + return true; + + var activityCode = membershipToConsider.ACTCode; + var sessionCode = membershipToConsider.SessCode; + var isGroupAdmin = _membershipService + .GetGroupAdminMembershipsForActivity(activityCode, sessionCode) + .Any(x => x.Username == user_name); + // If user is the advisor of the activity to which the request is sent. + if (isGroupAdmin) + return true; + } return false; } @@ -436,11 +386,13 @@ private async Task CanAddAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipRequestToConsider = (REQUEST)context.ActionArguments["membershipRequest"]; - // A membership request belonging to the currently logged in student - var is_Owner = membershipRequestToConsider.ID_NUM.ToString() == user_id; - if (is_Owner) - return true; + if (context.ActionArguments["membershipRequest"] is RequestUploadViewModel membershipRequestToConsider) + { + // A membership request belonging to the currently logged in student + var is_Owner = membershipRequestToConsider.Username == user_name; + if (is_Owner) + return true; + } // No one should be able to add requests on behalf of another person. return false; } @@ -495,23 +447,35 @@ private async Task CanUpdateAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - var sessionCode = membershipToConsider.SESS_CDE; - + if (context.ActionArguments["membershipID"] is int membershipID) + { + var membershipToConsider = _membershipService.GetMembershipViewById(membershipID); + var activityCode = membershipToConsider.ActivityCode; + var sessionCode = membershipToConsider.SessionCode; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) - return true; // Activity Advisors can update memberships of people in their activity. - var is_membershipOwner = membershipToConsider.ID_NUM.ToString() == user_id; - if (is_membershipOwner) - { - // Restrict what a regular owner can edit. - var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MEMBERSHIP_ID); - // If they are not trying to change their participation level, then it is ok - if (originalMembership.Participation == membershipToConsider.PART_CDE) + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).Any(x => x.Username == user_name); + if (membershipToConsider.Participation == MembershipService.ParticipationType.Advisor.Value) + { + var currentUserMembership = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode).FirstOrDefault(x => x.Username == user_name); + return currentUserMembership.Participation == MembershipService.ParticipationType.Advisor.Value; + } + else if (isGroupAdmin && membershipToConsider.Participation != MembershipService.ParticipationType.Advisor.Value) + { + // Activity Advisors can update memberships of people in their activity. return true; + } + + + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + { + // Restrict what a regular owner can edit. + var originalMembership = _membershipService.GetSpecificMembership(membershipToConsider.MembershipID); + // If they are not trying to change their participation level, then it is ok + if (originalMembership.Participation == membershipToConsider.Participation) + return true; + } } @@ -522,22 +486,34 @@ private async Task CanUpdateAsync(string resource) { // Once a request is sent, no one should be able to edit its contents. // If a mistake is made in creating the original request, the user can always delete it and make a new one. + if (context.ActionArguments["status"] is string && context.ActionArguments["membershipRequestID"] is int mrID) + { + // Get the view model from the repository + var activityCode = _membershipRequestService.Get(mrID).ActivityCode; + + var is_activityLeader = _membershipService.GetLeaderMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + + // If user is the leader of the activity that the request is sent to. + if (is_activityLeader) + return true; + + var is_activityAdvisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + + // If user is the advisor of the activity that the request is sent to. + if (is_activityAdvisor) + return true; + } return false; } case Resource.MEMBERSHIP_PRIVACY: { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - var membershipID = (int)context.ActionArguments["id"]; - - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username.ToLower().Equals(user_name.ToLower()); - if (is_membershipOwner) - return true; - - var activityCode = membershipToConsider.ActivityCode; - var sessionCode = membershipToConsider.SessionCode; + if (context.ActionArguments["membershipID"] is int membershipID) + { + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; + } return false; } @@ -556,33 +532,20 @@ private async Task CanUpdateAsync(string resource) { var sess_cde = Helpers.GetCurrentSession(_CCTContext); int? applicationID = housingService.GetApplicationID(user_name, sess_cde); - int requestedApplicationID = (int)context.ActionArguments["applicationID"]; - if (applicationID.HasValue && applicationID == requestedApplicationID) + if (context.ActionArguments["applicationID"] is int requestedApplicationID) { - string editorUsername = housingService.GetEditorUsername(applicationID.Value); - if (editorUsername.ToLower() == user_name.ToLower()) - return true; + if (applicationID.HasValue && applicationID == requestedApplicationID) + { + string editorUsername = housingService.GetEditorUsername(applicationID.Value); + if (editorUsername.ToLower() == user_name.ToLower()) + return true; + return false; + } return false; } - return false; } return false; } - case Resource.ADVISOR: - { - // User is admin - if (user_groups.Contains(AuthGroup.SiteAdmin)) - return true; - - var membershipToConsider = (MEMBERSHIP)context.ActionArguments["membership"]; - var activityCode = membershipToConsider.ACT_CDE; - - var is_advisor = _membershipService.GetAdvisorMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (is_advisor) - return true; // Activity Advisors can update memberships of people in their activity. - - return false; - } case Resource.PROFILE: { // User is admin @@ -590,7 +553,7 @@ private async Task CanUpdateAsync(string resource) return true; var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); + var isSelf = username == user_name; return isSelf; } @@ -599,11 +562,13 @@ private async Task CanUpdateAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var activityCode = (string)context.ActionArguments["id"]; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) - return true; + if (context.ActionArguments["id"] is string activityCode) + { + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + } return false; } @@ -613,10 +578,11 @@ private async Task CanUpdateAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; + var activityCode = (string)context.ActionArguments["id"]; var sessionCode = (string)context.ActionArguments["sess_cde"]; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); if (isGroupAdmin) { var activityService = context.HttpContext.RequestServices.GetRequiredService(); @@ -634,7 +600,7 @@ private async Task CanUpdateAsync(string resource) case Resource.EMERGENCY_CONTACT: { var username = (string)context.ActionArguments["username"]; - var isSelf = username.Equals(user_name); + var isSelf = username == user_name; return isSelf; } @@ -670,17 +636,19 @@ private async Task CanDeleteAsync(string resource) // User is admin if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; - var membershipID = (int)context.ActionArguments["id"]; - var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); - var is_membershipOwner = membershipToConsider.Username.ToLower().Equals(user_name.ToLower()); - if (is_membershipOwner) - return true; + if (context.ActionArguments["membershipID"] is int membershipID) + { + var membershipToConsider = _membershipService.GetSpecificMembership(membershipID); + var is_membershipOwner = membershipToConsider.Username == user_name; + if (is_membershipOwner) + return true; - var activityCode = membershipToConsider.ActivityCode; + var activityCode = membershipToConsider.ActivityCode; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) - return true; + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + } return false; } @@ -690,18 +658,19 @@ private async Task CanDeleteAsync(string resource) if (user_groups.Contains(AuthGroup.SiteAdmin)) return true; // membershipRequest = mr - var mrID = (int)context.ActionArguments["id"]; - var mrToConsider = _membershipRequestService.Get(mrID); - var is_mrOwner = mrToConsider.Username.ToLower().Equals(user_name.ToLower()); - if (is_mrOwner) - return true; - - var activityCode = mrToConsider.ActivityCode; + if (context.ActionArguments["membershipRequestID"] is int mrID) + { + var mrToConsider = _membershipRequestService.Get(mrID); + var is_mrOwner = mrToConsider.Username == user_name; + if (is_mrOwner) + return true; - var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username.ToLower().Equals(user_name.ToLower())); - if (isGroupAdmin) - return true; + var activityCode = mrToConsider.ActivityCode; + var isGroupAdmin = _membershipService.GetGroupAdminMembershipsForActivity(activityCode).Any(x => x.Username == user_name); + if (isGroupAdmin) + return true; + } return false; } @@ -732,8 +701,6 @@ private async Task CanDeleteAsync(string resource) } return false; } - case Resource.ADVISOR: - return false; case Resource.ADMIN: return false; case Resource.HOUSING_ADMIN: diff --git a/Gordon360/Controllers/EmailsController.cs b/Gordon360/Controllers/EmailsController.cs index db8e37ea6..9e49f65fd 100644 --- a/Gordon360/Controllers/EmailsController.cs +++ b/Gordon360/Controllers/EmailsController.cs @@ -15,9 +15,9 @@ public class EmailsController : GordonControllerBase { private readonly EmailService _emailService; - public EmailsController(CCTContext context, IMembershipService membershipService) + public EmailsController(CCTContext context) { - _emailService = new EmailService(context, membershipService); + _emailService = new EmailService(context); } [HttpGet] @@ -54,19 +54,6 @@ public ActionResult SendEmails([FromBody] EmailContentViewModel email) return Ok(); } - /* - [HttpPut] - [Route("activity/{id}/leaders/session/{session}")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.EMAILS_BY_LEADERS)] - public IHttpActionResult SendEmailsToleaders(string id, string session, [FromBody] EmailContentViewModel email) - { - var emails = _emailService.GetEmailsForActivityLeaders(id, session); - var toAddress = emails.Select(x => x.Email).ToArray(); - _emailService.SendEmails(toAddress, email.FromAddress, email.Subject, email.Content, email.Password); - return Ok(); - } - */ - [HttpPut] [Route("activity/{id}/session/{session}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.EMAILS_BY_ACTIVITY)] diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index fd7f29b93..e190fd808 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -18,7 +18,7 @@ public class MembershipsController : GordonControllerBase private readonly IAccountService _accountService; private readonly IActivityService _activityService; - public MembershipsController(CCTContext context, IActivityService activityService, IAccountService accountService, IMembershipService membershipService) + public MembershipsController(IActivityService activityService, IAccountService accountService, IMembershipService membershipService) { _activityService = activityService; _accountService = accountService; @@ -34,13 +34,10 @@ public MembershipsController(CCTContext context, IActivityService activityServic [HttpGet] [Route("activities/{activityCode}/sessions/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] - public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) + public ActionResult> GetMembershipsForActivity(string activityCode, string? sessionCode) { var result = _membershipService.GetMembershipsForActivity(activityCode, sessionCode); - if (result == null) - { - return NotFound(); - } + return Ok(result); } @@ -50,16 +47,11 @@ public ActionResult> GetMembershipsForActivity( /// The activity ID. /// A list of all leader-type memberships for the specified activity. [HttpGet] - [Route("activities/{activityCode}/sessions/{sessionCode}/group-admins")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.GROUP_ADMIN_BY_ACTIVITY)] - public ActionResult> GetGroupAdminForActivity(string activityCode, string sessionCode) + [Route("activities/{activityCode}/sessions/{sessionCode}/admins")] + public ActionResult> GetGroupAdminsForActivity(string activityCode, string sessionCode) { var result = _membershipService.GetGroupAdminMembershipsForActivity(activityCode, sessionCode); - if (result == null) - { - return NotFound(); - } return Ok(result); } @@ -70,15 +62,10 @@ public ActionResult> GetGroupAdminForActivity(s /// A list of all leader-type memberships for the specified activity. [HttpGet] [Route("activity/{activityCode}/leaders")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.LEADER_BY_ACTIVITY)] - public ActionResult> GetLeadersForActivity(string activityCode) + public ActionResult> GetLeadersForActivity(string activityCode) { var result = _membershipService.GetLeaderMembershipsForActivity(activityCode); - if (result == null) - { - return NotFound(); - } return Ok(result); } @@ -89,30 +76,10 @@ public ActionResult> GetLeadersForActivity(stri /// A list of all advisor-type memberships for the specified activity. [HttpGet] [Route("activity/{activityCode}/advisors")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.ADVISOR_BY_ACTIVITY)] - public ActionResult> GetAdvisorsForActivityAsync(string activityCode) + public ActionResult> GetAdvisorsForActivityAsync(string activityCode) { var result = _membershipService.GetAdvisorMembershipsForActivity(activityCode); - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - /// - /// Gets the number of followers of an activity - /// - /// The activity ID. - /// The number of followers of the activity - [HttpGet] - [Route("activities/{activityCode}/followers")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityFollowersCount(string activityCode) - { - var result = _membershipService.GetActivityFollowersCount(activityCode); - return Ok(result); } @@ -122,11 +89,11 @@ public ActionResult GetActivityFollowersCount(string activityCode) /// The activity ID. /// The number of members of the activity [HttpGet] - [Route("activities/{activityCode}/members")] + [Route("activities/{activityCode}/sessions/{sessionCode}/member-count")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCount(string activityCode) + public ActionResult GetActivityMembersCount(string activityCode, string? sessionCode) { - var result = _membershipService.GetActivityMembersCount(activityCode); + var result = _membershipService.GetActivityMembersCount(activityCode, sessionCode); return Ok(result); } @@ -171,72 +138,21 @@ public ActionResult GetActivityMembersCountForSession(string activityCode, [HttpPost] [Route("", Name = "Memberships")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] - public async Task> PostAsync([FromBody] MembershipUploadViewModel membership) + public async Task> PostAsync([FromBody] MembershipUploadViewModel membershipUpload) { - var idNum = _accountService.GetAccountByUsername(membership.Username).GordonID; - - if (idNum == null) - { - return NotFound(); - } + var idNum = _accountService.GetAccountByUsername(membershipUpload.Username).GordonID; - var result = await _membershipService.AddAsync(membership); + var result = await _membershipService.AddAsync(membershipUpload); if (result == null) { - return NotFound(); + return BadRequest(); } return Created("memberships", result); } - /// - /// Fetch memberships that a specific student has been a part of - /// @TODO: Move security checks to state your business? Or consider changing implementation here - /// - /// The Student Username - /// The membership information that the student is a part of - [Route("{username}")] - [HttpGet] - public ActionResult> GetMembershipsByUser(string username) - { - var result = _membershipService.GetMembershipsByUser(username); - - if (result == null) - { - return NotFound(); - } - // privacy control of membership view model - var authenticatedUserUsername = AuthUtils.GetUsername(User); - var viewerGroups = AuthUtils.GetGroups(User); - - if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all - return Ok(result); - else - { - List visibleMemberships = new List(); - foreach (var thisMembership in result) - { - var act = _activityService.Get(thisMembership.ActivityCode); - if (!(act.Privacy == true || thisMembership.Privacy == true)) - { - visibleMemberships.Add(thisMembership); - } - else - { - // If the current authenticated user is an admin of this group, then include the membership - var admins = _membershipService.GetGroupAdminMembershipsForActivity(thisMembership.ActivityCode, thisMembership.SessionCode); - if (admins.Any(a => a.Username == authenticatedUserUsername)) - { - visibleMemberships.Add(thisMembership); - } - } - } - return Ok(visibleMemberships); - } - } - /// Update an existing membership item /// The membership id of whichever one is to be changed /// The content within the membership that is to be changed and what it will change to @@ -250,10 +166,6 @@ public async Task> PutAsync(int membershipID, [From { var result = await _membershipService.UpdateAsync(membershipID, membership); - if (result == null) - { - return NotFound(); - } return Ok(result); } @@ -261,21 +173,18 @@ public async Task> PutAsync(int membershipID, [From /// /// The content within the membership that is to be changed /// Calls the server to make a call and update the database with the changed information [HttpPut] - [Route("{membershipID}/group-admin/{isGroupAdmin}")] + [Route("{membershipID}/group-admin")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] - public async Task> SetGroupAdminAsync(int membershipID, bool isGroupAdmin) + public async Task> SetGroupAdminAsync(int membershipID, [FromBody] bool isGroupAdmin) { var result = await _membershipService.SetGroupAdminAsync(membershipID, isGroupAdmin); - if (result == null) - { - return NotFound(); - } return Ok(result); } /// Update an existing membership item to be private or not - /// The membership to toggle privacy on + /// The membership to set the privacy of + /// The new value of Privacy for the membership /// Calls the server to make a call and update the database with the changed information [HttpPut] [Route("{membershipID}/privacy")] @@ -288,20 +197,14 @@ public async Task> SetPrivacyAsync(int membershipID } /// Delete an existing membership - /// The identifier for the membership to be deleted + /// The identifier for the membership to be deleted /// Calls the server to make a call and remove the given membership from the database - // DELETE api//5 [HttpDelete] - [Route("{id}")] + [Route("{membershipID}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] - public ActionResult Delete(int id) + public ActionResult Delete(int membershipID) { - var result = _membershipService.Delete(id); - - if (result == null) - { - return NotFound(); - } + var result = _membershipService.Delete(membershipID); return Ok(result); } diff --git a/Gordon360/Controllers/ProfilesController.cs b/Gordon360/Controllers/ProfilesController.cs index 42fb8f419..0e89611a5 100644 --- a/Gordon360/Controllers/ProfilesController.cs +++ b/Gordon360/Controllers/ProfilesController.cs @@ -22,12 +22,16 @@ public class ProfilesController : GordonControllerBase { private readonly IProfileService _profileService; private readonly IAccountService _accountService; + private readonly IMembershipService _membershipService; + private readonly IActivityService _activityService; private readonly IConfiguration _config; - public ProfilesController(IProfileService profileService, IAccountService accountService, IConfiguration config) + public ProfilesController(IProfileService profileService, IAccountService accountService, IMembershipService membershipService, IActivityService activityService, IConfiguration config) { _profileService = profileService; _accountService = accountService; + _membershipService = membershipService; + _activityService = activityService; _config = config; } @@ -491,5 +495,52 @@ private async Task GetProfileImageOrDefault(string imagePath) return await ImageUtils.DownloadImageFromURL(_config["DEFAULT_PROFILE_IMAGE_PATH"]); } } + + + /// + /// Fetch memberships that a specific student has been a part of + /// @TODO: Move security checks to state your business? Or consider changing implementation here + /// + /// The Student Username + /// The membership information that the student is a part of + [Route("{username}/memberships")] + [HttpGet] + public ActionResult> GetMembershipsByUser(string username) + { + var result = _membershipService.GetMembershipsByUser(username); + + if (result == null) + { + return NotFound(); + } + // privacy control of membership view model + var authenticatedUserUsername = AuthUtils.GetUsername(User); + var viewerGroups = AuthUtils.GetGroups(User); + + if (username == authenticatedUserUsername || viewerGroups.Contains(AuthGroup.SiteAdmin) || viewerGroups.Contains(AuthGroup.Police)) //super admin and gordon police reads all + return Ok(result); + else + { + List visibleMemberships = new List(); + foreach (var thisMembership in result) + { + var act = _activityService.Get(thisMembership.ActivityCode); + if (!(act.Privacy == true || thisMembership.Privacy == true)) + { + visibleMemberships.Add(thisMembership); + } + else + { + // If the current authenticated user is an admin of this group, then include the membership + var admins = _membershipService.GetGroupAdminMembershipsForActivity(thisMembership.ActivityCode, thisMembership.SessionCode); + if (admins.Any(a => a.Username == authenticatedUserUsername)) + { + visibleMemberships.Add(thisMembership); + } + } + } + return Ok(visibleMemberships); + } + } } } diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 181b9dfc8..a1b904a6d 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -15,7 +15,7 @@ public class RequestsController : GordonControllerBase { public IMembershipRequestService _membershipRequestService; - public RequestsController(CCTContext context, IMembershipRequestService membershipRequestService) + public RequestsController(IMembershipRequestService membershipRequestService) { _membershipRequestService = membershipRequestService; } @@ -61,7 +61,7 @@ public ActionResult Get(int id) [HttpGet] [Route("activity/{activityCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY)] - public ActionResult> GetMembershipRequestsByActivity(string activityCode) + public ActionResult> GetMembershipRequestsByActivity(string activityCode) { var result = _membershipRequestService.GetMembershipRequestsByActivity(activityCode); @@ -78,9 +78,8 @@ public ActionResult> GetMembershipRequestsByActivity /// /// All membership requests associated with the student [HttpGet] - [Route("current-user")] - [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_REQUEST_BY_STUDENT)] - public ActionResult> GetMembershipsRequestsForCurrentUser() + [Route("/users/current")] + public ActionResult> GetMembershipsRequestsForCurrentUser() { var authenticatedUserUsername = AuthUtils.GetUsername(User); var result = _membershipRequestService.GetMembershipRequestsByUsername(authenticatedUserUsername); @@ -116,15 +115,15 @@ public async Task> PostAsync([FromBody] RequestUploadV /// /// Updates a membership request /// - /// The membership request id + /// The membership request id /// The updated membership request object /// The updated request if successful. HTTP error message if not. [HttpPut] - [Route("{id}")] + [Route("{membershipRequestID}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> PutAsync(int id, RequestUploadViewModel membershipRequest) + public async Task> PutAsync(int membershipRequestID, RequestUploadViewModel membershipRequest) { - var result = await _membershipRequestService.UpdateAsync(id, membershipRequest); + var result = await _membershipRequestService.UpdateAsync(membershipRequestID, membershipRequest); if (result == null) { @@ -137,54 +136,50 @@ public async Task> PutAsync(int id, RequestUploadViewM /// /// Sets a membership request to Approved /// - /// The id of the membership request in question. - /// If successful: THe updated membership request wrapped in an OK Http status code. + /// The id of the membership request in question. + /// The status that the membership requst will be changed to. + /// If successful: The updated membership request wrapped in an OK HTTP status code. [HttpPost] - [Route("{id}/approve")] - [StateYourBusiness(operation = Operation.DENY_ALLOW, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> ApproveAsync(int id) + [Route("{membershipRequestID}/status")] + [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] + public async Task> UpdateStatusAsync(int membershipRequestID, [FromBody] string status) { - var result = await _membershipRequestService.ApproveAsync(id); + RequestView? updated = null; - if (result == null) + switch (status) { - return NotFound(); + case Request_Status.APPROVED: + updated = await _membershipRequestService.ApproveAsync(membershipRequestID); + break; + case Request_Status.DENIED: + updated = await _membershipRequestService.DenyAsync(membershipRequestID); + break; + case Request_Status.PENDING: + updated = await _membershipRequestService.SetPendingAsync(membershipRequestID); + break; + default: + return BadRequest($"Status must be one of '{Request_Status.APPROVED}', '{Request_Status.DENIED}', or '{Request_Status.PENDING}'"); } - return Ok(result); - } - - /// - /// Sets the membership request to Denied - /// - /// The id of the membership request in question. - /// If successful: The updated membership request wrapped in an OK Http status code. - [HttpPost] - [Route("{id}/deny")] - [StateYourBusiness(operation = Operation.DENY_ALLOW, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> DenyAsync(int id) - { - var result = await _membershipRequestService.DenyAsync(id); - - if (result == null) + if (updated == null) { return NotFound(); } - return Ok(result); + return Ok(updated); } /// /// Deletes a membership request /// - /// The id of the membership request to delete + /// The id of the membership request to delete /// The deleted object [HttpDelete] - [Route("{id}")] + [Route("{membershipRequestID}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> Delete(int id) + public async Task> Delete(int membershipRequestID) { - var result = await _membershipRequestService.DeleteAsync(id); + var result = await _membershipRequestService.DeleteAsync(membershipRequestID); if (result == null) { diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 2da8a4e6e..a87be5d98 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -410,7 +410,7 @@ Optional code of session to get for IHttpActionResult - + Gets the group admin memberships associated with a given activity. @@ -1608,7 +1608,7 @@ Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, we do it here by using the validateMembership() method. - The membership to be added + The membership to be added The newly added Membership object @@ -1729,14 +1729,7 @@ Username of the user to check true if student is a Group Admin, else false - - - Converts a MembershipUploadViewModel object to a MEMBERSHIP - - The MembershipUploadViewModel to convert - A new MEMBERSHIP object filled with the info from the view model - - + Finds the matching MembershipView object from an existing MEMBERSHIP object diff --git a/Gordon360/Gordon360.csproj b/Gordon360/Gordon360.csproj index d3bab6f56..11946f70c 100644 --- a/Gordon360/Gordon360.csproj +++ b/Gordon360/Gordon360.csproj @@ -36,6 +36,9 @@ + + + diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index 1d4da790d..715b1f400 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -11,7 +11,24 @@ public partial class MembershipUploadViewModel public string CommentText { get; set; } public bool GroupAdmin { get; set; } public bool Privacy { get; set; } - public static MembershipUploadViewModel FromREQUEST(REQUEST request) + public MEMBERSHIP ToMembership(int gordonId, DateTime beginDate) + { + + return new MEMBERSHIP() + { + ACT_CDE = this.ACTCode, + SESS_CDE = this.SessCode, + ID_NUM = gordonId, + BEGIN_DTE = beginDate, + PART_CDE = this.PartCode, + COMMENT_TXT = this.CommentText, + GRP_ADMIN = this.GroupAdmin, + PRIVACY = this.Privacy, + USER_NAME = Environment.UserName + }; + } + + public static implicit operator MembershipUploadViewModel(REQUEST request) { return new MembershipUploadViewModel { @@ -23,6 +40,21 @@ public static MembershipUploadViewModel FromREQUEST(REQUEST request) Privacy = false }; } + + public static implicit operator MembershipUploadViewModel(RequestUploadViewModel requestUpload) + { + + return new MembershipUploadViewModel + { + ACTCode = requestUpload.ACTCode, + SessCode = requestUpload.SessCode, + Username = requestUpload.Username, + PartCode = requestUpload.PartCode, + CommentText = requestUpload.CommentText, + GroupAdmin = false, + Privacy = false + }; + } } } \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/MembershipViewModel.cs b/Gordon360/Models/ViewModels/MembershipViewModel.cs deleted file mode 100644 index e3619cc27..000000000 --- a/Gordon360/Models/ViewModels/MembershipViewModel.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Gordon360.Models.CCT; -using System; -namespace Gordon360.Models.ViewModels -{ - public class MembershipViewModel - { - - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImage { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int? IDNumber { get; set; } - public string AD_Username { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string Mail_Location { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public bool? GroupAdmin { get; set; } - public DateTime StartDate { get; set; } - public Nullable EndDate { get; set; } - public string Description { get; set; } - public string ActivityType { get; set; } - public string ActivityTypeDescription { get; set; } - public bool? Privacy { get; set; } - public int AccountPrivate { get; set; } - } -} \ No newline at end of file diff --git a/Gordon360/Models/ViewModels/RequestUploadViewModel.cs b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs index 61e13c376..841639be8 100644 --- a/Gordon360/Models/ViewModels/RequestUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs @@ -13,30 +13,16 @@ public partial class RequestUploadViewModel public string CommentText { get; set; } public string Status { get; set; } - public REQUEST ToREQUEST() + public static implicit operator REQUEST(RequestUploadViewModel request) { return new REQUEST { - ACT_CDE = this.ACTCode, - SESS_CDE = this.SessCode, - PART_CDE = this.PartCode, - DATE_SENT = this.DateSent, - COMMENT_TXT = this.CommentText, - STATUS = this.Status - }; - } - - public MembershipUploadViewModel ToMembershipUpload() - { - return new MembershipUploadViewModel - { - ACTCode = this.ACTCode, - SessCode = this.SessCode, - Username = this.Username, - PartCode = this.PartCode, - CommentText = this.CommentText, - GroupAdmin = false, - Privacy = false + ACT_CDE = request.ACTCode, + SESS_CDE = request.SessCode, + PART_CDE = request.PartCode, + DATE_SENT = request.DateSent, + COMMENT_TXT = request.CommentText, + STATUS = request.Status }; } } diff --git a/Gordon360/Services/EmailService.cs b/Gordon360/Services/EmailService.cs index 1644f150d..e606f5f79 100644 --- a/Gordon360/Services/EmailService.cs +++ b/Gordon360/Services/EmailService.cs @@ -17,12 +17,10 @@ namespace Gordon360.Services public class EmailService : IEmailService { private readonly CCTContext _context; - private IMembershipService _membershipService; - public EmailService(CCTContext context, IMembershipService membershipService) + public EmailService(CCTContext context) { _context = context; - _membershipService = membershipService; } /// diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 9b5219670..7a063b55d 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -34,16 +34,16 @@ public MembershipRequestService(CCTContext context, IMembershipService membershi public async Task AddAsync(RequestUploadViewModel membershipRequestUpload) { - MembershipUploadViewModel m = membershipRequestUpload.ToMembershipUpload(); + MembershipUploadViewModel m = (MembershipUploadViewModel) membershipRequestUpload; // Validates the memberships request by throwing appropriate exceptions. The exceptions are caugth in the CustomExceptionFilter await _membershipService.ValidateMembershipAsync(m); _membershipService.IsPersonAlreadyInActivity(m); - var request = membershipRequestUpload.ToREQUEST(); + var request = (REQUEST) membershipRequestUpload; request.ID_NUM = int.Parse(_accountService.GetAccountByUsername(membershipRequestUpload.Username).GordonID); var addedMembershipRequest = _context.REQUEST.Add(request); - _context.SaveChanges(); + await _context.SaveChangesAsync(); return Get(addedMembershipRequest.Entity.REQUEST_ID); @@ -54,41 +54,62 @@ public async Task AddAsync(RequestUploadViewModel membershipRequest /// /// The ID of the request to be approved /// The approved membership - public async Task ApproveAsync(int requestID) + public async Task ApproveAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - request.STATUS = Request_Status.APPROVED; - MembershipUploadViewModel newMembership = MembershipUploadViewModel.FromREQUEST(request); + if (request.STATUS == Request_Status.APPROVED) + { + throw new BadInputException() { ExceptionMessage = "The request has already been approved."}; + } + + MembershipUploadViewModel newMembership = (MembershipUploadViewModel) request; newMembership.Username = _accountService.GetAccountByID(request.ID_NUM.ToString()).ADUserName; - return await _membershipService.AddAsync(newMembership); + var createdMembership = await _membershipService.AddAsync(newMembership); + + if (createdMembership == null) + throw new ResourceCreationException(); + + request.STATUS = Request_Status.APPROVED; + await _context.SaveChangesAsync(); + + return Get(request.REQUEST_ID); } /// - /// Delete the membershipRequest object whose id is given in the parameters + /// Denies the membership request object whose id is given in the parameters /// /// The membership request id - /// A copy of the deleted membership request - public async Task DeleteAsync(int requestID) + /// + public async Task DenyAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); + if (request == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - RequestView rv = _context.RequestView.FirstOrDefault(r => r.RequestID == request.REQUEST_ID); + if (request.STATUS == Request_Status.DENIED) + { + throw new BadInputException() { ExceptionMessage = "The request has already been denied." }; + } - _context.REQUEST.Remove(request); + if (request.STATUS == Request_Status.APPROVED) + { + throw new BadInputException() { ExceptionMessage = "The request has already been approved" }; + } + + request.STATUS = Request_Status.DENIED; await _context.SaveChangesAsync(); - return rv; + return Get(request.REQUEST_ID); } /// @@ -96,7 +117,7 @@ public async Task DeleteAsync(int requestID) /// /// The membership request id /// - public async Task DenyAsync(int requestID) + public async Task SetPendingAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); @@ -105,10 +126,41 @@ public async Task DenyAsync(int requestID) throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; } - request.STATUS = Request_Status.DENIED; + if (request.STATUS == Request_Status.PENDING) + { + throw new BadInputException() { ExceptionMessage = "The request is already pending." }; + } + + if (request.STATUS == Request_Status.APPROVED) + { + throw new BadInputException() { ExceptionMessage = "The request has already been approved" }; + } + + request.STATUS = Request_Status.PENDING; + await _context.SaveChangesAsync(); + + return Get(request.REQUEST_ID); + } + + /// + /// Delete the membershipRequest object whose id is given in the parameters + /// + /// The membership request id + /// A copy of the deleted membership request + public async Task DeleteAsync(int requestID) + { + var request = await _context.REQUEST.FindAsync(requestID); + if (request == null) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; + } + + RequestView rv = Get(request.REQUEST_ID); + + _context.REQUEST.Remove(request); await _context.SaveChangesAsync(); - return _context.RequestView.FirstOrDefault(r => r.RequestID == request.REQUEST_ID); + return rv; } /// @@ -118,7 +170,7 @@ public async Task DenyAsync(int requestID) /// If found, returns MembershipRequestViewModel. If not found, returns null. public RequestView Get(int requestID) { - var request = _context.RequestView.FirstOrDefault(r => r.RequestID == requestID); + var request = Get(requestID); if (request == null) { @@ -172,7 +224,7 @@ public async Task UpdateAsync(int requestID, RequestUploadViewModel } // The validate function throws ResourceNotFoundException where needed. The exceptions are caught in my CustomExceptionFilter - await _membershipService.ValidateMembershipAsync(membershipRequest.ToMembershipUpload()); + await _membershipService.ValidateMembershipAsync((MembershipUploadViewModel) membershipRequest); // Only a few fields should be able to be changed through an update. original.SESS_CDE = membershipRequest.SessCode; diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index dfd7de599..1ef2090c5 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -30,15 +30,21 @@ public MembershipService(CCTContext context, IAccountService accountService) /// Adds a new Membership record to storage. Since we can't establish foreign key constraints and relationships on the database side, /// we do it here by using the validateMembership() method. /// - /// The membership to be added + /// The membership to be added /// The newly added Membership object - public async Task AddAsync(MembershipUploadViewModel membership) + public async Task AddAsync(MembershipUploadViewModel membershipUpload) { // validate returns a boolean value. - await ValidateMembershipAsync(membership); - IsPersonAlreadyInActivity(membership); + ValidateMembership(membershipUpload); + IsPersonAlreadyInActivity(membershipUpload); - MEMBERSHIP m = MembershipUploadToMEMBERSHIP(membership); + var sessionBeginDate = _context.CM_SESSION_MSTR + .Where(x => x.SESS_CDE.Equals(membershipUpload.SessCode)) + .FirstOrDefault()?.SESS_BEGN_DTE ?? DateTime.Now; + + int gordonId = int.Parse(_accountService.GetAccountByUsername(membershipUpload.Username).GordonID); + + MEMBERSHIP m = membershipUpload.ToMembership(gordonId, sessionBeginDate); // The Add() method returns the added membership. var payload = await _context.MEMBERSHIP.AddAsync(m); @@ -49,7 +55,7 @@ public async Task AddAsync(MembershipUploadViewModel membership) } else { await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(payload.Entity); + return GetMembershipViewById(payload.Entity.MEMBERSHIP_ID); } @@ -68,7 +74,7 @@ public MembershipView Delete(int membershipID) throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; } - MembershipView toReturn = MEMBERSHIPToMembershipView(result); + MembershipView toReturn = GetMembershipViewById(result.MEMBERSHIP_ID); _context.MEMBERSHIP.Remove(result); _context.SaveChanges(); @@ -107,19 +113,24 @@ public IEnumerable GetMembershipsForActivity( string[]? participationTypes = null ) { - //IEnumerable memberships = await _context.Procedures.MEMBERSHIPS_PER_ACT_CDEAsync(activityCode); - if (sessionCode == null) - sessionCode = this.GetCurrentSessionCode(); + sessionCode ??= Helpers.GetCurrentSession(_context); - return _context.MembershipView - .Where(m => + IEnumerable memberships = _context.MembershipView + .Where(m => m.SessionCode.Trim() == sessionCode - && m.ActivityCode == activityCode - && (groupAdmin == null || m.GroupAdmin == groupAdmin) - && (participationTypes == null || participationTypes.Contains(m.Participation)) - ) - .OrderByDescending(m => m.StartDate); + && m.ActivityCode == activityCode); + if (groupAdmin is not null) + { + memberships = memberships.Where(m => m.GroupAdmin == groupAdmin); + } + + if (participationTypes?.Length > 0) + { + memberships = memberships.Where(m => participationTypes.Contains(m.Participation)); + } + + return memberships.OrderByDescending(m => m.StartDate); } /// @@ -130,10 +141,7 @@ public IEnumerable GetMembershipsForActivity( /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode, string? sessionCode = null) { - if (sessionCode == null) - { - sessionCode = this.GetCurrentSessionCode(); - } + sessionCode ??= Helpers.GetCurrentSession(_context); return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.SessionCode == sessionCode && m.GroupAdmin == true); } @@ -167,33 +175,21 @@ public IEnumerable GetAdvisorMembershipsForActivity(string activ /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. public IEnumerable GetMembershipsByUser(string username) { - var account = _context.ACCOUNT.FirstOrDefault(a => a.AD_Username.Trim() == username); - if (account == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Account was not found." }; - } + var account = _accountService.GetAccountByUsername(username); - return _context.MembershipView.Where(m => m.Username == account.AD_Username).OrderByDescending(x => x.StartDate); - } - - /// - /// Fetches the number of followers associated with the activity whose code is specified by the parameter. - /// - /// The activity code. - /// int. - public int GetActivityFollowersCount(string activityCode) - { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST").Count(); + return _context.MembershipView.Where(m => m.Username == account.ADUserName).OrderByDescending(x => x.StartDate); } /// /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. /// /// The activity code. + /// The session code. /// int. - public int GetActivityMembersCount(string activityCode) + public int GetActivityMembersCount(string activityCode, string? sessionCode = null) { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST").Count(); + sessionCode ??= Helpers.GetCurrentSession(_context); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != ParticipationType.Guest.Value && m.SessionCode == sessionCode).Count(); } /// @@ -202,9 +198,10 @@ public int GetActivityMembersCount(string activityCode) /// The activity code. /// The session code /// int. - public int GetActivitySubscribersCountForSession(string activityCode, string sessionCode) + public int GetActivitySubscribersCountForSession(string activityCode, string? sessionCode = null) { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == "GUEST" && m.SessionCode == sessionCode).Count(); + sessionCode ??= Helpers.GetCurrentSession(_context); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation == ParticipationType.Guest.Value && m.SessionCode == sessionCode).Count(); } /// @@ -213,19 +210,21 @@ public int GetActivitySubscribersCountForSession(string activityCode, string ses /// The activity code. /// The session code /// int - public int GetActivityMembersCountForSession(string activityCode, string sessionCode) + public int GetActivityMembersCountForSession(string activityCode, string? sessionCode = null) { - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != "GUEST" && m.SessionCode == sessionCode).Count(); + sessionCode ??= Helpers.GetCurrentSession(_context); + return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != ParticipationType.Guest.Value && m.SessionCode == sessionCode).Count(); } /// /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. /// + /// The id of the membership to update. /// The updated membership. /// The newly modified membership. public async Task UpdateAsync(int membershipID, MembershipUploadViewModel membership) { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); if (original == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; @@ -241,13 +240,14 @@ public async Task UpdateAsync(int membershipID, MembershipUpload await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(original); + return GetMembershipViewById(original.MEMBERSHIP_ID); } /// /// Switches the group-admin property of the person whose membership id is given /// - /// The corresponding membership object + /// The corresponding membership object + /// The new value of group admin /// The newly modified membership. public async Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin) { @@ -264,17 +264,18 @@ public async Task SetGroupAdminAsync(int membershipID, bool isGr await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(original); + return GetMembershipViewById(original.MEMBERSHIP_ID); } /// /// Switches the privacy property of the person whose membership id is given /// - /// The membership object passed. + /// The membership object passed. + /// The new value of privacy. /// The newly modified membership. public async Task SetPrivacyAsync(int membershipID, bool isPrivate) { - var original = _context.MEMBERSHIP.FirstOrDefault(m => m.MEMBERSHIP_ID == membershipID); + var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); if (original == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Membership was not found." }; @@ -284,7 +285,7 @@ public async Task SetPrivacyAsync(int membershipID, bool isPriva await _context.SaveChangesAsync(); - return MEMBERSHIPToMembershipView(original); + return GetMembershipViewById(original.MEMBERSHIP_ID); } @@ -293,24 +294,24 @@ public async Task SetPrivacyAsync(int membershipID, bool isPriva /// /// The membership to validate /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter - public async Task ValidateMembershipAsync(MembershipUploadViewModel membership) + public bool ValidateMembership(MembershipUploadViewModel membership) { - var personExists = _context.ACCOUNT.Where(x => x.AD_Username == membership.Username).Any(); - if (!personExists) + var personExists = _accountService.GetAccountByUsername(membership.Username); + if (personExists != null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; } - var participationExists = _context.PART_DEF.Where(x => x.PART_CDE.Trim() == membership.PartCode).Any(); + var participationExists = _context.PART_DEF.Any(x => x.PART_CDE.Trim() == membership.PartCode); if (!participationExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; } - var sessionExists = _context.CM_SESSION_MSTR.Where(x => x.SESS_CDE.Trim() == membership.SessCode).Any(); + var sessionExists = _context.CM_SESSION_MSTR.Any(x => x.SESS_CDE.Trim() == membership.SessCode); if (!sessionExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; } - var activityExists = _context.ACT_INFO.Where(x => x.ACT_CDE.Trim() == membership.ACTCode).Any(); + var activityExists = _context.ACT_INFO.Any(x => x.ACT_CDE.Trim() == membership.ACTCode); if (!activityExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; @@ -391,38 +392,14 @@ public class ParticipationType public static ParticipationType GroupAdmin { get { return new ParticipationType("GRP_ADMIN"); } } } - /// - /// Converts a MembershipUploadViewModel object to a MEMBERSHIP - /// - /// The MembershipUploadViewModel to convert - /// A new MEMBERSHIP object filled with the info from the view model - public MEMBERSHIP MembershipUploadToMEMBERSHIP(MembershipUploadViewModel membership) - { - var sessionCode = _context.CM_SESSION_MSTR - .Where(x => x.SESS_CDE.Equals(membership.SessCode)) - .FirstOrDefault(); - - return new MEMBERSHIP() { - ACT_CDE = membership.ACTCode, - SESS_CDE = membership.SessCode, - ID_NUM = int.Parse(_accountService.GetAccountByUsername(membership.Username).GordonID), - BEGIN_DTE = (DateTime?)sessionCode?.SESS_BEGN_DTE ?? DateTime.Now, - PART_CDE = membership.PartCode, - COMMENT_TXT = membership.CommentText, - GRP_ADMIN = membership.GroupAdmin, - PRIVACY = membership.Privacy, - USER_NAME = Environment.UserName - }; - } - /// /// Finds the matching MembershipView object from an existing MEMBERSHIP object /// /// The MEMBERSHIP to match on MembershipID /// The found MembershipView object corresponding to the MEMBERSHIP by ID - public MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) + public MembershipView GetMembershipViewById(int membershipId) { - var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membership.MEMBERSHIP_ID); + var foundMembership = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipId); if (foundMembership == null) { @@ -431,14 +408,5 @@ public MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership) return foundMembership; } - - /// - /// Gets the current session ID code for involvements - /// - /// The current session ID code for involvements - private string? GetCurrentSessionCode() - { - return _context.CM_SESSION_MSTR.FirstOrDefault(s => s.SESS_BEGN_DTE <= DateTime.Now && s.SESS_END_DTE >= DateTime.Now)?.SESS_CDE.Trim(); - } } } \ No newline at end of file diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index d65e07bd6..737177328 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -174,11 +174,10 @@ public IEnumerable GetMembershipsForActivity( string[]? participationTypes = null ); IEnumerable GetMembershipsByUser(string username); - int GetActivitySubscribersCountForSession(string activityCode, string sessionCode); - int GetActivityMembersCountForSession(string activityCode, string sessionCode); + int GetActivitySubscribersCountForSession(string activityCode, string? sessionCode); + int GetActivityMembersCountForSession(string activityCode, string? sessionCode); MembershipView GetSpecificMembership(int membershipID); - int GetActivityFollowersCount(string idactivityCode); - int GetActivityMembersCount(string activityCode); + int GetActivityMembersCount(string activityCode, string? sessionCode); Task AddAsync(MembershipUploadViewModel membership); Task UpdateAsync(int membershipID, MembershipUploadViewModel membership); Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin); @@ -186,8 +185,8 @@ public IEnumerable GetMembershipsForActivity( MembershipView Delete(int membershipID); bool IsGroupAdmin(string username); public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); - public MembershipView MEMBERSHIPToMembershipView(MEMBERSHIP membership); - Task ValidateMembershipAsync(MembershipUploadViewModel membership); + public MembershipView GetMembershipViewById(int membershipId); + bool ValidateMembership(MembershipUploadViewModel membership); public bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest); } @@ -222,8 +221,9 @@ public interface IMembershipRequestService Task AddAsync(RequestUploadViewModel membershipRequest); Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); // The ODD one out. When we approve a request, we would like to get back the new membership. - Task ApproveAsync(int requestID); + Task ApproveAsync(int requestID); Task DenyAsync(int requestID); + Task SetPendingAsync(int requestID); Task DeleteAsync(int requestID); } public interface IScheduleService diff --git a/Gordon360/Static Classes/Names.cs b/Gordon360/Static Classes/Names.cs index 0baa22cb2..5872600e5 100644 --- a/Gordon360/Static Classes/Names.cs +++ b/Gordon360/Static Classes/Names.cs @@ -31,7 +31,7 @@ public static class Resource public const string MEMBERSHIP_REQUEST_BY_ACTIVITY = "Membership Request Resources associated with an activity"; public const string MEMBERSHIP_REQUEST_BY_STUDENT = "Membership Request Resources associated with a student"; public const string MEMBERSHIP_BY_ACTIVITY = "Membership Resources associated with an activity"; - public const string MEMBERSHIP_BY_STUDENT = "Membership Resources associated with a student"; + public const string MEMBERSHIP_BY_ACCOUNT = "Membership Resources associated with a student"; public const string EMAILS_BY_ACTIVITY = "Emails for activity members"; public const string EMAILS_BY_LEADERS = "Emails for activity leaders"; public const string EMAILS_BY_GROUP_ADMIN = "Emails for group admin"; @@ -54,10 +54,6 @@ public static class Operation public const string ADD = "Creating a resource"; public const string UPDATE = "Updating a resource"; public const string DELETE = "Deleting a resource"; - - // Should only be used for a resource of type Membership Request - public const string DENY_ALLOW = "Denying or allowing a request"; - } @@ -82,10 +78,5 @@ public static class Request_Status public const string PENDING = "Pending"; public const string APPROVED = "Approved"; public const string DENIED = "Denied"; - private static string[] options = new string[] { PENDING, APPROVED, DENIED }; - public static string[] GetOptions() - { - return options; - } } } From 30843c79563d9a53020617ce106cdc629be59a3d Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 11:24:07 -0400 Subject: [PATCH 17/49] Updating UploadViewModels with more friendly parameters for @EJPlatzer ;) --- Gordon360/Authorization/StateYourBusiness.cs | 6 ++--- .../Controllers/MembershipsController.cs | 3 ++- .../ViewModels/MembershipUploadViewModel.cs | 24 +++++++++---------- .../ViewModels/RequestUploadViewModel.cs | 12 +++++----- .../Services/MembershipRequestService.cs | 8 +++---- Gordon360/Services/MembershipService.cs | 18 +++++++------- Gordon360/Services/ServiceInterfaces.cs | 1 - 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index 62ba230ae..8c1c086b2 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -364,13 +364,13 @@ private async Task CanAddAsync(string resource) { // A membership can always be added if it is of type "GUEST" - var isFollower = membershipToConsider.PartCode == Activity_Roles.GUEST + var isFollower = membershipToConsider.Participation == Activity_Roles.GUEST && membershipToConsider.Username == user_name; if (isFollower) return true; - var activityCode = membershipToConsider.ACTCode; - var sessionCode = membershipToConsider.SessCode; + var activityCode = membershipToConsider.Activity; + var sessionCode = membershipToConsider.Session; var isGroupAdmin = _membershipService .GetGroupAdminMembershipsForActivity(activityCode, sessionCode) .Any(x => x.Username == user_name); diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index e190fd808..c549257ca 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -170,7 +170,8 @@ public async Task> PutAsync(int membershipID, [From } /// Update an existing membership item to be a group admin or not - /// /// The content within the membership that is to be changed + /// The content within the membership that is to be changed + /// The new value of GroupAdmin /// Calls the server to make a call and update the database with the changed information [HttpPut] [Route("{membershipID}/group-admin")] diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index 715b1f400..7253070ff 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -4,10 +4,10 @@ namespace Gordon360.Models.CCT { public partial class MembershipUploadViewModel { - public string ACTCode { get; set; } - public string SessCode { get; set; } + public string Activity { get; set; } + public string Session { get; set; } public string Username { get; set; } - public string PartCode { get; set; } + public string Participation { get; set; } public string CommentText { get; set; } public bool GroupAdmin { get; set; } public bool Privacy { get; set; } @@ -16,11 +16,11 @@ public MEMBERSHIP ToMembership(int gordonId, DateTime beginDate) return new MEMBERSHIP() { - ACT_CDE = this.ACTCode, - SESS_CDE = this.SessCode, + ACT_CDE = this.Activity, + SESS_CDE = this.Session, ID_NUM = gordonId, BEGIN_DTE = beginDate, - PART_CDE = this.PartCode, + PART_CDE = this.Participation, COMMENT_TXT = this.CommentText, GRP_ADMIN = this.GroupAdmin, PRIVACY = this.Privacy, @@ -32,9 +32,9 @@ public static implicit operator MembershipUploadViewModel(REQUEST request) { return new MembershipUploadViewModel { - ACTCode = request.ACT_CDE, - SessCode = request.SESS_CDE, - PartCode = request.PART_CDE, + Activity = request.ACT_CDE, + Session = request.SESS_CDE, + Participation = request.PART_CDE, CommentText = request.COMMENT_TXT, GroupAdmin = false, Privacy = false @@ -46,10 +46,10 @@ public static implicit operator MembershipUploadViewModel(RequestUploadViewModel return new MembershipUploadViewModel { - ACTCode = requestUpload.ACTCode, - SessCode = requestUpload.SessCode, + Activity = requestUpload.Activity, + Session = requestUpload.Session, Username = requestUpload.Username, - PartCode = requestUpload.PartCode, + Participation = requestUpload.Participation, CommentText = requestUpload.CommentText, GroupAdmin = false, Privacy = false diff --git a/Gordon360/Models/ViewModels/RequestUploadViewModel.cs b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs index 841639be8..f125c46d8 100644 --- a/Gordon360/Models/ViewModels/RequestUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/RequestUploadViewModel.cs @@ -5,10 +5,10 @@ namespace Gordon360.Models.CCT { public partial class RequestUploadViewModel { - public string ACTCode { get; set; } - public string SessCode { get; set; } + public string Activity { get; set; } + public string Session { get; set; } public string Username { get; set; } - public string PartCode { get; set; } + public string Participation { get; set; } public DateTime DateSent { get; set; } public string CommentText { get; set; } public string Status { get; set; } @@ -17,9 +17,9 @@ public static implicit operator REQUEST(RequestUploadViewModel request) { return new REQUEST { - ACT_CDE = request.ACTCode, - SESS_CDE = request.SessCode, - PART_CDE = request.PartCode, + ACT_CDE = request.Activity, + SESS_CDE = request.Session, + PART_CDE = request.Participation, DATE_SENT = request.DateSent, COMMENT_TXT = request.CommentText, STATUS = request.Status diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 7a063b55d..ed1f31d4f 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -36,7 +36,7 @@ public async Task AddAsync(RequestUploadViewModel membershipRequest MembershipUploadViewModel m = (MembershipUploadViewModel) membershipRequestUpload; // Validates the memberships request by throwing appropriate exceptions. The exceptions are caugth in the CustomExceptionFilter - await _membershipService.ValidateMembershipAsync(m); + _membershipService.ValidateMembership(m); _membershipService.IsPersonAlreadyInActivity(m); var request = (REQUEST) membershipRequestUpload; @@ -224,13 +224,13 @@ public async Task UpdateAsync(int requestID, RequestUploadViewModel } // The validate function throws ResourceNotFoundException where needed. The exceptions are caught in my CustomExceptionFilter - await _membershipService.ValidateMembershipAsync((MembershipUploadViewModel) membershipRequest); + _membershipService.ValidateMembership((MembershipUploadViewModel) membershipRequest); // Only a few fields should be able to be changed through an update. - original.SESS_CDE = membershipRequest.SessCode; + original.SESS_CDE = membershipRequest.Session; original.COMMENT_TXT = membershipRequest.CommentText; original.DATE_SENT = membershipRequest.DateSent; - original.PART_CDE = membershipRequest.PartCode; + original.PART_CDE = membershipRequest.Participation; await _context.SaveChangesAsync(); diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 1ef2090c5..4065c7628 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -39,7 +39,7 @@ public async Task AddAsync(MembershipUploadViewModel membershipU IsPersonAlreadyInActivity(membershipUpload); var sessionBeginDate = _context.CM_SESSION_MSTR - .Where(x => x.SESS_CDE.Equals(membershipUpload.SessCode)) + .Where(x => x.SESS_CDE.Equals(membershipUpload.Session)) .FirstOrDefault()?.SESS_BEGN_DTE ?? DateTime.Now; int gordonId = int.Parse(_accountService.GetAccountByUsername(membershipUpload.Username).GordonID); @@ -232,8 +232,8 @@ public async Task UpdateAsync(int membershipID, MembershipUpload // One can only update certain fields within a membrship original.COMMENT_TXT = membership.CommentText; - original.PART_CDE = membership.PartCode; - if (membership.PartCode == ParticipationType.Guest.Value) + original.PART_CDE = membership.Participation; + if (membership.Participation == ParticipationType.Guest.Value) { await SetGroupAdminAsync(membershipID, false); } @@ -301,23 +301,23 @@ public bool ValidateMembership(MembershipUploadViewModel membership) { throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; } - var participationExists = _context.PART_DEF.Any(x => x.PART_CDE.Trim() == membership.PartCode); + var participationExists = _context.PART_DEF.Any(x => x.PART_CDE.Trim() == membership.Participation); if (!participationExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Participation was not found." }; } - var sessionExists = _context.CM_SESSION_MSTR.Any(x => x.SESS_CDE.Trim() == membership.SessCode); + var sessionExists = _context.CM_SESSION_MSTR.Any(x => x.SESS_CDE.Trim() == membership.Session); if (!sessionExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Session was not found." }; } - var activityExists = _context.ACT_INFO.Any(x => x.ACT_CDE.Trim() == membership.ACTCode); + var activityExists = _context.ACT_INFO.Any(x => x.ACT_CDE.Trim() == membership.Activity); if (!activityExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity was not found." }; } - if (!_context.InvolvementOffering.Any(i => i.SessionCode == membership.SessCode && i.ActivityCode.Trim() == membership.ACTCode)) + if (!_context.InvolvementOffering.Any(i => i.SessionCode == membership.Session && i.ActivityCode.Trim() == membership.Activity)) { throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; } @@ -327,8 +327,8 @@ public bool ValidateMembership(MembershipUploadViewModel membership) public bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest) { - var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.SessCode && - x.ActivityCode == membershipRequest.ACTCode && x.Username == membershipRequest.Username); + var personAlreadyInActivity = _context.MembershipView.Any(x => x.SessionCode == membershipRequest.Session && + x.ActivityCode == membershipRequest.Activity && x.Username == membershipRequest.Username); if (personAlreadyInActivity) { diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 737177328..60da02a44 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -220,7 +220,6 @@ public interface IMembershipRequestService IEnumerable GetMembershipRequestsByUsername(string usernamne); Task AddAsync(RequestUploadViewModel membershipRequest); Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); - // The ODD one out. When we approve a request, we would like to get back the new membership. Task ApproveAsync(int requestID); Task DenyAsync(int requestID); Task SetPendingAsync(int requestID); From 88fba84b668bf43eff2c76d7eccf9579f92fbcba Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 12:13:28 -0400 Subject: [PATCH 18/49] Remove ID Numbers from Admin --- Gordon360/Controllers/AdminsController.cs | 30 ++------- Gordon360/Models/ViewModels/AdminViewModel.cs | 31 +++++++++ Gordon360/Services/AdministratorService.cs | 64 ++++++------------- Gordon360/Services/ServiceInterfaces.cs | 8 +-- 4 files changed, 59 insertions(+), 74 deletions(-) create mode 100644 Gordon360/Models/ViewModels/AdminViewModel.cs diff --git a/Gordon360/Controllers/AdminsController.cs b/Gordon360/Controllers/AdminsController.cs index afab277da..b1526cf20 100644 --- a/Gordon360/Controllers/AdminsController.cs +++ b/Gordon360/Controllers/AdminsController.cs @@ -1,6 +1,7 @@ using Gordon360.Authorization; using Gordon360.Models.CCT.Context; using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; using Gordon360.Services; using Gordon360.Static.Names; using Microsoft.AspNetCore.Mvc; @@ -13,9 +14,9 @@ public class AdminsController : GordonControllerBase { private readonly IAdministratorService _adminService; - public AdminsController(CCTContext context) + public AdminsController(CCTContext context, IAccountService accountService) { - _adminService = new AdministratorService(context); + _adminService = new AdministratorService(context, accountService); } /// @@ -31,31 +32,12 @@ public AdminsController(CCTContext context) [HttpGet] [Route("")] [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ADMIN)] - public ActionResult> GetAll() + public ActionResult> GetAll() { var result = _adminService.GetAll(); return Ok(result); } - /// - /// Get a specific admin - /// - /// - /// The specific admin - /// - /// - /// Server makes call to the database and returns the specific admin - /// - // GET api//5 - [HttpGet] - [Route("{id}")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.ADMIN)] - public ActionResult GetByGordonId(string id) - { - var result = _adminService.Get(id); - return Ok(result); - } - /// Create a new admin to be added to database /// The admin item containing all required and relevant information /// @@ -64,7 +46,7 @@ public ActionResult GetByGordonId(string id) [HttpPost] [Route("", Name = "Admins")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.ADMIN)] - public ActionResult Post([FromBody] ADMIN admin) + public ActionResult Post([FromBody] AdminViewModel admin) { var result = _adminService.Add(admin); @@ -83,7 +65,7 @@ public ActionResult Post([FromBody] ADMIN admin) [HttpDelete] [Route("{id}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.ADMIN)] - public ActionResult Delete(int id) + public ActionResult Delete(int id) { var result = _adminService.Delete(id); diff --git a/Gordon360/Models/ViewModels/AdminViewModel.cs b/Gordon360/Models/ViewModels/AdminViewModel.cs new file mode 100644 index 000000000..f157a89e2 --- /dev/null +++ b/Gordon360/Models/ViewModels/AdminViewModel.cs @@ -0,0 +1,31 @@ +using Gordon360.Models.CCT; + +namespace Gordon360.Models.ViewModels +{ + public partial class AdminViewModel + { + public string Username { get; set; } + public string Email { get; set; } + public bool IsSuperAdmin { get; set; } + + public static implicit operator AdminViewModel(ADMIN adm) + { + return new AdminViewModel() + { + Username = adm.USER_NAME, + Email = adm.EMAIL, + IsSuperAdmin = adm.SUPER_ADMIN, + }; + } + + public ADMIN ToAdmin(int GordonID) + { + return new ADMIN() { + USER_NAME = Username, + EMAIL = Email, + SUPER_ADMIN = IsSuperAdmin, + ID_NUM = GordonID, + }; + } + } +} \ No newline at end of file diff --git a/Gordon360/Services/AdministratorService.cs b/Gordon360/Services/AdministratorService.cs index 382c7ab12..4358d2f12 100644 --- a/Gordon360/Services/AdministratorService.cs +++ b/Gordon360/Services/AdministratorService.cs @@ -1,6 +1,7 @@ using Gordon360.Models.CCT.Context; using Gordon360.Exceptions; using Gordon360.Models.CCT; +using Gordon360.Models.ViewModels; using System.Collections.Generic; using System.Linq; @@ -12,72 +13,46 @@ namespace Gordon360.Services public class AdministratorService : IAdministratorService { private CCTContext _context; + private IAccountService _accountService; - public AdministratorService(CCTContext context) + public AdministratorService(CCTContext context, IAccountService accountService) { _context = context; - } - - /// - /// Fetches the admin resource whose id is specified as an argument. - /// - /// The admin ID.l - /// The Specified administrator. If none was found, a null value is returned. - public ADMIN Get(int id) - { - var query = _context.ADMIN.Find(id); - if (query == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Administrator was not found." }; - } - return query; - } - - /// - /// Fetches the admin resource whose username matches the specified argument - /// - /// The administrator's gordon id - /// The Specified administrator. If none was found, a null value is returned. - public ADMIN Get(string gordon_id) - { - var query = _context.ADMIN.FirstOrDefault(x => x.ID_NUM.ToString() == gordon_id); - if (query == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Administrator was not found." }; - } - return query; + _accountService = accountService; } /// /// Fetches all the administrators from the database /// /// Returns a list of administrators. If no administrators were found, an empty list is returned. - public IEnumerable GetAll() + public IEnumerable GetAll() { - return _context.ADMIN; + return _context.ADMIN.Select(a => (AdminViewModel)a); } /// /// Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, /// we do it here by using the validateAdmin() method. /// - /// The admin to be added + /// The admin to be added /// The newly added Admin object - public ADMIN Add(ADMIN admin) + public AdminViewModel Add(AdminViewModel adminView) { // validate returns a boolean value. - validateAdmin(admin); + validateAdmin(adminView); + + var gordonId = int.Parse(_accountService.GetAccountByUsername(adminView.Username).GordonID); // The Add() method returns the added membership. - var payload = _context.ADMIN.Add(admin); + var payload = _context.ADMIN.Add(adminView.ToAdmin(gordonId)); // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) if (payload == null) { - throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the admin. Verify that this admin doesn't already exist." }; + throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the admin." }; } _context.SaveChanges(); - return admin; + return adminView; } @@ -86,7 +61,7 @@ public ADMIN Add(ADMIN admin) /// /// The admin id /// The admin that was just deleted - public ADMIN Delete(int id) + public AdminViewModel Delete(int id) { var result = _context.ADMIN.Find(id); if (result == null) @@ -97,7 +72,7 @@ public ADMIN Delete(int id) _context.SaveChanges(); - return result; + return (AdminViewModel)result; } /// @@ -105,16 +80,15 @@ public ADMIN Delete(int id) /// /// The admin to validate /// True if the admin is valid. Throws ResourceNotFoundException if not. Exception is cauth in an Exception Filter - private bool validateAdmin(ADMIN admin) + private bool validateAdmin(AdminViewModel adminView) { - var personExists = _context.ACCOUNT.Where(x => x.gordon_id.Trim() == admin.ID_NUM.ToString()).Count() > 0; + var personExists = _context.ACCOUNT.Where(a => a.AD_Username == adminView.Username).Count() > 0; if (!personExists) { throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; } - var personIsAlreadyAdmin = _context.ADMIN.Any(x => x.EMAIL == admin.EMAIL); - + var personIsAlreadyAdmin = _context.ADMIN.Any(a => a.USER_NAME == adminView.Username); if (personIsAlreadyAdmin) { throw new ResourceCreationException() { ExceptionMessage = "This person is already an admin." }; diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 60da02a44..276017d35 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -134,11 +134,9 @@ public interface IActivityInfoService public interface IAdministratorService { - ADMIN Get(int id); - ADMIN Get(string gordon_id); - IEnumerable GetAll(); - ADMIN Add(ADMIN admin); - ADMIN Delete(int id); + IEnumerable GetAll(); + AdminViewModel Add(AdminViewModel admin); + AdminViewModel Delete(int id); } public interface IEmailService From 766bb6c950d3b9a2b79bbacbd69ff6ac99693603 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 12:46:54 -0400 Subject: [PATCH 19/49] Fix call to admin service & allow filtering requests by status --- Gordon360/Controllers/HousingController.cs | 7 +++---- Gordon360/Controllers/RequestsController.cs | 15 ++++++--------- Gordon360/Services/AdministratorService.cs | 12 ++++++++++++ Gordon360/Services/HousingService.cs | 6 +++--- Gordon360/Services/MembershipRequestService.cs | 17 +++++++++++++++-- Gordon360/Services/ServiceInterfaces.cs | 5 +++-- 6 files changed, 42 insertions(+), 20 deletions(-) diff --git a/Gordon360/Controllers/HousingController.cs b/Gordon360/Controllers/HousingController.cs index b66562917..f0e1d502d 100644 --- a/Gordon360/Controllers/HousingController.cs +++ b/Gordon360/Controllers/HousingController.cs @@ -207,18 +207,17 @@ public ActionResult GetApartmentApplication(int a //get token data from context, username is the username of current logged in person var authenticatedUserUsername = AuthUtils.GetUsername(User); - string userID = _accountService.GetAccountByUsername(authenticatedUserUsername).GordonID; + string username = _accountService.GetAccountByUsername(authenticatedUserUsername).ADUserName; bool isAdmin = false; try { - ADMIN adminModel = _administratorService.Get(userID); - isAdmin = adminModel != null; + isAdmin = _administratorService.GetByUsername(username) != null; } catch { - isAdmin = _housingService.CheckIfHousingAdmin(userID); + isAdmin = _housingService.CheckIfHousingAdmin(username); } ApartmentApplicationViewModel result = _housingService.GetApartmentApplication(applicationID, isAdmin); diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index a1b904a6d..3b28b50d6 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -56,19 +56,16 @@ public ActionResult Get(int id) /// /// Gets the memberships requests for the specified activity /// - /// The activity code + /// The activity code + /// The session code + /// The status of the requests to search /// All membership requests associated with the activity [HttpGet] - [Route("activity/{activityCode}")] + [Route("activity/{activityCode}/session/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_REQUEST_BY_ACTIVITY)] - public ActionResult> GetMembershipRequestsByActivity(string activityCode) + public ActionResult> GetMembershipRequestsByActivity(string activityCode, string sessionCode, string? requestStatus = null) { - var result = _membershipRequestService.GetMembershipRequestsByActivity(activityCode); - - if (result == null) - { - return NotFound(); - } + IEnumerable result = _membershipRequestService.GetMembershipRequests(activityCode, sessionCode, requestStatus); return Ok(result); } diff --git a/Gordon360/Services/AdministratorService.cs b/Gordon360/Services/AdministratorService.cs index 4358d2f12..d29fb515c 100644 --- a/Gordon360/Services/AdministratorService.cs +++ b/Gordon360/Services/AdministratorService.cs @@ -29,6 +29,18 @@ public IEnumerable GetAll() return _context.ADMIN.Select(a => (AdminViewModel)a); } + /// + /// Fetches a specific admin from the database + /// + /// Returns a list of administrators. If no administrators were found, an empty list is returned. + public AdminViewModel? GetByUsername(string username) + { + var admin = _context.ADMIN.FirstOrDefault(a => a.USER_NAME == username); + if (admin != null) + return (AdminViewModel)admin; + return null; + } + /// /// Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, /// we do it here by using the validateAdmin() method. diff --git a/Gordon360/Services/HousingService.cs b/Gordon360/Services/HousingService.cs index fdd1f9111..f9a31e4ce 100644 --- a/Gordon360/Services/HousingService.cs +++ b/Gordon360/Services/HousingService.cs @@ -21,9 +21,9 @@ public HousingService(CCTContext context) /// Calls a stored procedure that returns a row in the staff whitelist which has the given user id, /// if it is in the whitelist /// - /// The id of the person using the page + /// The id of the person using the page /// Whether or not the user is on the staff whitelist - public bool CheckIfHousingAdmin(string gordonID) + public bool CheckIfHousingAdmin(string username) { return false; } @@ -43,7 +43,7 @@ public bool DeleteApplication(int applicationID) } catch { - throw new ResourceNotFoundException() { ExceptionMessage = "The application could not be found and removed." }; + throw new ResourceNotFoundException() { ExceptionMessage = "The housing application could not be found." }; } } diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index ed1f31d4f..2aafad065 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -3,6 +3,7 @@ using Gordon360.Models.CCT; using Gordon360.Models.ViewModels; using Gordon360.Static.Names; +using Gordon360.Static.Methods; using System; using System.Collections.Generic; using System.Linq; @@ -193,10 +194,22 @@ public IEnumerable GetAll() /// Fetches all the membership requests associated with this activity /// /// The activity id + /// The activity id /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - public IEnumerable GetMembershipRequestsByActivity(string activityCode) + public IEnumerable GetMembershipRequests(string activityCode, string? sessionCode = null, string? requestStatus = null) { - return _context.RequestView.Where(r => r.ActivityCode == activityCode); + if (!_context.ACT_INFO.Any(a => a.ACT_CDE == activityCode)) + { + throw new ResourceNotFoundException() { ExceptionMessage = "The activity could not be found." }; + } + + sessionCode ??= Helpers.GetCurrentSession(_context); + var requests = _context.RequestView.Where(r => r.ActivityCode == activityCode && r.SessionCode == sessionCode); + if (requestStatus != null) + { + requests = requests.Where(r => r.Status == requestStatus); + } + return requests; } /// diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 276017d35..2fadd788f 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -135,6 +135,7 @@ public interface IActivityInfoService public interface IAdministratorService { IEnumerable GetAll(); + AdminViewModel? GetByUsername(string username); AdminViewModel Add(AdminViewModel admin); AdminViewModel Delete(int id); } @@ -214,7 +215,7 @@ public interface IMembershipRequestService { RequestView Get(int requestID); IEnumerable GetAll(); - IEnumerable GetMembershipRequestsByActivity(string activityCode); + IEnumerable GetMembershipRequests(string activityCode, string? sessionCode, string? requestStatus); IEnumerable GetMembershipRequestsByUsername(string usernamne); Task AddAsync(RequestUploadViewModel membershipRequest); Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); @@ -278,7 +279,7 @@ public interface INewsService public interface IHousingService { - bool CheckIfHousingAdmin(string gordonID); + bool CheckIfHousingAdmin(string username); bool DeleteApplication(int applicationID); string[] GetAllApartmentHalls(); string GetEditorUsername(int applicationID); From 460169880327719e587a0e9f938a9d77ad985d22 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 13:02:58 -0400 Subject: [PATCH 20/49] Re-add membershipservice to emailservice --- Gordon360/Services/EmailService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gordon360/Services/EmailService.cs b/Gordon360/Services/EmailService.cs index e606f5f79..f9f0786cb 100644 --- a/Gordon360/Services/EmailService.cs +++ b/Gordon360/Services/EmailService.cs @@ -17,10 +17,12 @@ namespace Gordon360.Services public class EmailService : IEmailService { private readonly CCTContext _context; + private readonly IMembershipService _membershipService; - public EmailService(CCTContext context) + public EmailService(CCTContext context, IMembershipService membershipService) { _context = context; + _membershipService = membershipService; } /// From c1e3dfd7da4ecc8b115ce9938baf1a739c95c4aa Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 13:07:53 -0400 Subject: [PATCH 21/49] Remove WebHostEnvironment from StateYourBusiness --- Gordon360/Authorization/StateYourBusiness.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index 8c1c086b2..6de366440 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -39,12 +39,12 @@ public class StateYourBusiness : ActionFilterAttribute public string operation { get; set; } private ActionExecutingContext context; - private IWebHostEnvironment _webHostEnvironment; private CCTContext _CCTContext; private MyGordonContext _MyGordonContext; private IAccountService _accountService; private IMembershipService _membershipService; private IMembershipRequestService _membershipRequestService; + private INewsService _newsService; // User position at the college and their id. private IEnumerable user_groups { get; set; } @@ -54,7 +54,6 @@ public class StateYourBusiness : ActionFilterAttribute public async override Task OnActionExecutionAsync(ActionExecutingContext actionContext, ActionExecutionDelegate next) { context = actionContext; - _webHostEnvironment = context.HttpContext.RequestServices.GetService(); // Step 1: Who is to be authorized var authenticatedUser = actionContext.HttpContext.User; @@ -63,6 +62,7 @@ public async override Task OnActionExecutionAsync(ActionExecutingContext actionC _accountService = context.HttpContext.RequestServices.GetRequiredService(); _membershipService = context.HttpContext.RequestServices.GetRequiredService(); _membershipRequestService = context.HttpContext.RequestServices.GetRequiredService(); + _newsService = context.HttpContext.RequestServices.GetRequiredService(); user_name = AuthUtils.GetUsername(authenticatedUser); user_groups = AuthUtils.GetGroups(authenticatedUser); @@ -606,8 +606,7 @@ private async Task CanUpdateAsync(string resource) case Resource.NEWS: var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); + var newsItem = _newsService.Get((int)newsID); // only unapproved posts may be updated var approved = newsItem.Accepted; if (approved == null || approved == true) @@ -712,8 +711,7 @@ private async Task CanDeleteAsync(string resource) case Resource.NEWS: { var newsID = context.ActionArguments["newsID"]; - var newsService = new NewsService(_MyGordonContext, _CCTContext, _webHostEnvironment); - var newsItem = newsService.Get((int)newsID); + var newsItem = _newsService.Get((int)newsID); // only expired news items may be deleted var newsDate = newsItem.Entered; if (!newsDate.HasValue || (System.DateTime.Now - newsDate.Value).Days >= 14) From c13cf003359e8edfbbea20f4d4b3baf130dedd43 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 13:10:01 -0400 Subject: [PATCH 22/49] Fix issues with membershipService and accountService --- Gordon360/Controllers/EmailsController.cs | 4 +- Gordon360/Controllers/HousingController.cs | 2 +- Gordon360/Documentation/Gordon360.xml | 139 ++++++++------------- 3 files changed, 58 insertions(+), 87 deletions(-) diff --git a/Gordon360/Controllers/EmailsController.cs b/Gordon360/Controllers/EmailsController.cs index 9e49f65fd..f8c75f9f8 100644 --- a/Gordon360/Controllers/EmailsController.cs +++ b/Gordon360/Controllers/EmailsController.cs @@ -15,9 +15,9 @@ public class EmailsController : GordonControllerBase { private readonly EmailService _emailService; - public EmailsController(CCTContext context) + public EmailsController(CCTContext context, IMembershipService membershipService) { - _emailService = new EmailService(context); + _emailService = new EmailService(context, membershipService); } [HttpGet] diff --git a/Gordon360/Controllers/HousingController.cs b/Gordon360/Controllers/HousingController.cs index f0e1d502d..7feb38367 100644 --- a/Gordon360/Controllers/HousingController.cs +++ b/Gordon360/Controllers/HousingController.cs @@ -25,7 +25,7 @@ public HousingController(CCTContext context, IProfileService profileService) _context = context; _housingService = new HousingService(context); _accountService = new AccountService(context); - _administratorService = new AdministratorService(context); + _administratorService = new AdministratorService(context, _accountService); _profileService = profileService; } diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index a87be5d98..31b03b4fe 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -171,18 +171,7 @@ Server makes call to the database and returns all admins - - - Get a specific admin - - - The specific admin - - - Server makes call to the database and returns the specific admin - - - + Create a new admin to be added to database The admin item containing all required and relevant information @@ -431,14 +420,7 @@ The activity ID. A list of all advisor-type memberships for the specified activity. - - - Gets the number of followers of an activity - - The activity ID. - The number of followers of the activity - - + Gets the number of members (besides followers) of an activity @@ -467,14 +449,6 @@ Posts a new membership to the server to be added into the database - - - Fetch memberships that a specific student has been a part of - @TODO: Move security checks to state your business? Or consider changing implementation here - - The Student Username - The membership information that the student is a part of - Update an existing membership item The membership id of whichever one is to be changed @@ -484,17 +458,19 @@ Update an existing membership item to be a group admin or not - /// The content within the membership that is to be changed + The content within the membership that is to be changed + The new value of GroupAdmin Calls the server to make a call and update the database with the changed information Update an existing membership item to be private or not - The membership to toggle privacy on + The membership to set the privacy of + The new value of Privacy for the membership Calls the server to make a call and update the database with the changed information Delete an existing membership - The identifier for the membership to be deleted + The identifier for the membership to be deleted Calls the server to make a call and remove the given membership from the database @@ -707,6 +683,14 @@ Path to the profile image to load + + + Fetch memberships that a specific student has been a part of + @TODO: Move security checks to state your business? Or consider changing implementation here + + The Student Username + The membership information that the student is a part of + Gets all Membership Request Objects @@ -720,11 +704,13 @@ The ID of the membership request A memberships request with the specified id - + Gets the memberships requests for the specified activity - The activity code + The activity code + The session code + The status of the requests to search All membership requests associated with the activity @@ -744,29 +730,23 @@ Updates a membership request - The membership request id + The membership request id The updated membership request object The updated request if successful. HTTP error message if not. - + Sets a membership request to Approved - The id of the membership request in question. - If successful: THe updated membership request wrapped in an OK Http status code. - - - - Sets the membership request to Denied - - The id of the membership request in question. - If successful: The updated membership request wrapped in an OK Http status code. + The id of the membership request in question. + The status that the membership requst will be changed to. + If successful: The updated membership request wrapped in an OK HTTP status code. Deletes a membership request - The id of the membership request to delete + The id of the membership request to delete The deleted object @@ -1226,32 +1206,24 @@ Service class to facilitate interacting with the Admin table. - - - Fetches the admin resource whose id is specified as an argument. - - The admin ID.l - The Specified administrator. If none was found, a null value is returned. - - + - Fetches the admin resource whose username matches the specified argument + Fetches all the administrators from the database - The administrator's gordon id - The Specified administrator. If none was found, a null value is returned. + Returns a list of administrators. If no administrators were found, an empty list is returned. - + - Fetches all the administrators from the database + Fetches a specific admin from the database Returns a list of administrators. If no administrators were found, an empty list is returned. - + Adds a new Administrator record to storage. Since we can't establish foreign key constraints and relationships on the database side, we do it here by using the validateAdmin() method. - The admin to be added + The admin to be added The newly added Admin object @@ -1261,7 +1233,7 @@ The admin id The admin that was just deleted - + Helper method to Validate an admin @@ -1431,7 +1403,7 @@ Calls a stored procedure that returns a row in the staff whitelist which has the given user id, if it is in the whitelist - The id of the person using the page + The id of the person using the page Whether or not the user is on the staff whitelist @@ -1549,20 +1521,27 @@ The ID of the request to be approved The approved membership - + - Delete the membershipRequest object whose id is given in the parameters + Denies the membership request object whose id is given in the parameters The membership request id - A copy of the deleted membership request + - + Denies the membership request object whose id is given in the parameters The membership request id + + + Delete the membershipRequest object whose id is given in the parameters + + The membership request id + A copy of the deleted membership request + Get the membership request object whose Id is specified in the parameters. @@ -1576,11 +1555,12 @@ MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. - + Fetches all the membership requests associated with this activity The activity id + The activity id MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. @@ -1664,18 +1644,12 @@ The student's AD Username. A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - Fetches the number of followers associated with the activity whose code is specified by the parameter. - - The activity code. - int. - - + Fetches the number of memberships associated with the activity whose code is specified by the parameter. The activity code. + The session code. int. @@ -1698,6 +1672,7 @@ Updates the membership whose id is given as the first parameter to the contents of the second parameter. + The id of the membership to update. The updated membership. The newly modified membership. @@ -1705,17 +1680,19 @@ Switches the group-admin property of the person whose membership id is given - The corresponding membership object + The corresponding membership object + The new value of group admin The newly modified membership. Switches the privacy property of the person whose membership id is given - The membership object passed. + The membership object passed. + The new value of privacy. The newly modified membership. - + Helper method to Validate a membership @@ -1736,12 +1713,6 @@ The MEMBERSHIP to match on MembershipID The found MembershipView object corresponding to the MEMBERSHIP by ID - - - Gets the current session ID code for involvements - - The current session ID code for involvements - Service Class that facilitates data transactions between the MySchedulesController and the MySchedule part of the database model. From 90c6792d76ca903107827e5991601412111bc0b0 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 13:16:03 -0400 Subject: [PATCH 23/49] Remove duplicate endpoint --- Gordon360/Controllers/MembershipsController.cs | 15 --------------- Gordon360/Documentation/Gordon360.xml | 7 ------- 2 files changed, 22 deletions(-) diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index c549257ca..15281ff5e 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -83,21 +83,6 @@ public ActionResult> GetAdvisorsForActivityAsync(str return Ok(result); } - /// - /// Gets the number of members (besides followers) of an activity - /// - /// The activity ID. - /// The number of members of the activity - [HttpGet] - [Route("activities/{activityCode}/sessions/{sessionCode}/member-count")] - [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP)] - public ActionResult GetActivityMembersCount(string activityCode, string? sessionCode) - { - var result = _membershipService.GetActivityMembersCount(activityCode, sessionCode); - - return Ok(result); - } - /// /// Gets the number of followers of an activity /// diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 31b03b4fe..a77fbc596 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -420,13 +420,6 @@ The activity ID. A list of all advisor-type memberships for the specified activity. - - - Gets the number of members (besides followers) of an activity - - The activity ID. - The number of members of the activity - Gets the number of followers of an activity From fa1d068be848f8a4adf24bd9ba886a61b9bb8699 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Fri, 14 Oct 2022 14:46:51 -0400 Subject: [PATCH 24/49] Simplify logic for username --- Gordon360/Controllers/HousingController.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Gordon360/Controllers/HousingController.cs b/Gordon360/Controllers/HousingController.cs index 7feb38367..46191d37b 100644 --- a/Gordon360/Controllers/HousingController.cs +++ b/Gordon360/Controllers/HousingController.cs @@ -207,17 +207,16 @@ public ActionResult GetApartmentApplication(int a //get token data from context, username is the username of current logged in person var authenticatedUserUsername = AuthUtils.GetUsername(User); - string username = _accountService.GetAccountByUsername(authenticatedUserUsername).ADUserName; - bool isAdmin = false; try { - isAdmin = _administratorService.GetByUsername(username) != null; + isAdmin = _administratorService.GetByUsername(authenticatedUserUsername) != null + || _housingService.CheckIfHousingAdmin(authenticatedUserUsername); } catch { - isAdmin = _housingService.CheckIfHousingAdmin(username); + isAdmin = false; } ApartmentApplicationViewModel result = _housingService.GetApartmentApplication(applicationID, isAdmin); From a2d3f15325b7fe48e17091b56664359de2d76b79 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 09:17:00 -0400 Subject: [PATCH 25/49] Remove extra semicolon --- Gordon360/Services/MembershipRequestService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 2aafad065..b8a0d0ff9 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -247,7 +247,7 @@ public async Task UpdateAsync(int requestID, RequestUploadViewModel await _context.SaveChangesAsync(); - return _context.RequestView.FirstOrDefault(r => r.RequestID == original.REQUEST_ID); ; + return _context.RequestView.FirstOrDefault(r => r.RequestID == original.REQUEST_ID); } } } \ No newline at end of file From d227ae28deb523965fc3dff6f963c248afdaa5b9 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 09:19:17 -0400 Subject: [PATCH 26/49] Make RequestView nullable in update --- Gordon360/Controllers/RequestsController.cs | 2 +- Gordon360/Services/MembershipRequestService.cs | 2 +- Gordon360/Services/ServiceInterfaces.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 3b28b50d6..90c5dbf91 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -118,7 +118,7 @@ public async Task> PostAsync([FromBody] RequestUploadV [HttpPut] [Route("{membershipRequestID}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] - public async Task> PutAsync(int membershipRequestID, RequestUploadViewModel membershipRequest) + public async Task> PutAsync(int membershipRequestID, RequestUploadViewModel membershipRequest) { var result = await _membershipRequestService.UpdateAsync(membershipRequestID, membershipRequest); diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index b8a0d0ff9..d00f41ced 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -228,7 +228,7 @@ public IEnumerable GetMembershipRequestsByUsername(string username) /// The membership request id /// The newly modified membership request /// - public async Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest) + public async Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest) { var original = await _context.REQUEST.FindAsync(requestID); if (original == null) diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 2fadd788f..6ce048061 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -218,7 +218,7 @@ public interface IMembershipRequestService IEnumerable GetMembershipRequests(string activityCode, string? sessionCode, string? requestStatus); IEnumerable GetMembershipRequestsByUsername(string usernamne); Task AddAsync(RequestUploadViewModel membershipRequest); - Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); + Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest); Task ApproveAsync(int requestID); Task DenyAsync(int requestID); Task SetPendingAsync(int requestID); From e827f57158eba2c07bb2237f17fdc42b80be6757 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 09:44:36 -0400 Subject: [PATCH 27/49] Organize and rewrite XML comments --- .../Controllers/MembershipsController.cs | 20 +++--- Gordon360/Controllers/RequestsController.cs | 10 +-- .../Services/MembershipRequestService.cs | 25 ++++---- Gordon360/Services/MembershipService.cs | 64 +++++++++---------- 4 files changed, 60 insertions(+), 59 deletions(-) diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 15281ff5e..651521fbd 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -30,7 +30,7 @@ public MembershipsController(IActivityService activityService, IAccountService a /// /// The activity ID /// Optional code of session to get for - /// IHttpActionResult + /// An IEnumerable of the matching MembershipViews [HttpGet] [Route("activities/{activityCode}/sessions/{sessionCode}")] [StateYourBusiness(operation = Operation.READ_PARTIAL, resource = Resource.MEMBERSHIP_BY_ACTIVITY)] @@ -45,7 +45,7 @@ public ActionResult> GetMembershipsForActivity(strin /// Gets the group admin memberships associated with a given activity. /// /// The activity ID. - /// A list of all leader-type memberships for the specified activity. + /// An IEnumerable of all leader-type memberships for the specified activity. [HttpGet] [Route("activities/{activityCode}/sessions/{sessionCode}/admins")] public ActionResult> GetGroupAdminsForActivity(string activityCode, string sessionCode) @@ -59,7 +59,7 @@ public ActionResult> GetGroupAdminsForActivity(strin /// Gets the leader-type memberships associated with a given activity. /// /// The activity ID. - /// A list of all leader-type memberships for the specified activity. + /// An IEnumerable of all leader-type memberships for the specified activity. [HttpGet] [Route("activity/{activityCode}/leaders")] public ActionResult> GetLeadersForActivity(string activityCode) @@ -73,7 +73,7 @@ public ActionResult> GetLeadersForActivity(string ac /// Gets the advisor-type memberships associated with a given activity. /// /// The activity ID. - /// A list of all advisor-type memberships for the specified activity. + /// An IEnumerable of all advisor-type memberships for the specified activity. [HttpGet] [Route("activity/{activityCode}/advisors")] public ActionResult> GetAdvisorsForActivityAsync(string activityCode) @@ -116,10 +116,9 @@ public ActionResult GetActivityMembersCountForSession(string activityCode, } /// Create a new membership item to be added to database - /// The membership item containing all required and relevant information - /// + /// The membership item containing all required and relevant information + /// The newly created membership as a MembershipView object /// Posts a new membership to the server to be added into the database - // POST api/ [HttpPost] [Route("", Name = "Memberships")] [StateYourBusiness(operation = Operation.ADD, resource = Resource.MEMBERSHIP)] @@ -142,8 +141,7 @@ public async Task> PostAsync([FromBody] MembershipU /// The membership id of whichever one is to be changed /// The content within the membership that is to be changed and what it will change to /// Calls the server to make a call and update the database with the changed information - /// The membership information that the student is a part of - // PUT api//5 + /// The updated membership as a MembershipView object [HttpPut] [Route("{membershipID}")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] @@ -158,6 +156,7 @@ public async Task> PutAsync(int membershipID, [From /// The content within the membership that is to be changed /// The new value of GroupAdmin /// Calls the server to make a call and update the database with the changed information + /// The updated membership as a MembershipView object [HttpPut] [Route("{membershipID}/group-admin")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP)] @@ -172,6 +171,7 @@ public async Task> SetGroupAdminAsync(int membershi /// The membership to set the privacy of /// The new value of Privacy for the membership /// Calls the server to make a call and update the database with the changed information + /// The updated membership as a MembershipView object [HttpPut] [Route("{membershipID}/privacy")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)] @@ -185,6 +185,7 @@ public async Task> SetPrivacyAsync(int membershipID /// Delete an existing membership /// The identifier for the membership to be deleted /// Calls the server to make a call and remove the given membership from the database + /// The deleted membership as a MembershipView object [HttpDelete] [Route("{membershipID}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] @@ -199,6 +200,7 @@ public ActionResult Delete(int membershipID) /// Determines whether or not the given student is a Group Admin of some activity /// /// The account username to check + /// The updated membership as a MembershipView object [HttpGet] [Route("isGroupAdmin/{id}")] public ActionResult IsGroupAdmin(string username) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 90c5dbf91..aedab6807 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -36,7 +36,7 @@ public ActionResult> Get() /// Gets a specific Membership Request Object /// /// The ID of the membership request - /// A memberships request with the specified id + /// A RequestView that matches the specified id [HttpGet] [Route("{id}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP_REQUEST)] @@ -58,7 +58,7 @@ public ActionResult Get(int id) /// /// The activity code /// The session code - /// The status of the requests to search + /// The optional status of the requests to search /// All membership requests associated with the activity [HttpGet] [Route("activity/{activityCode}/session/{sessionCode}")] @@ -73,7 +73,7 @@ public ActionResult> GetMembershipRequestsByActivity(st /// /// Gets the memberships requests for the person making the request /// - /// All membership requests associated with the student + /// All membership requests associated with the current user [HttpGet] [Route("/users/current")] public ActionResult> GetMembershipsRequestsForCurrentUser() @@ -135,7 +135,7 @@ public async Task> PostAsync([FromBody] RequestUploadV /// /// The id of the membership request in question. /// The status that the membership requst will be changed to. - /// If successful: The updated membership request wrapped in an OK HTTP status code. + /// The updated request [HttpPost] [Route("{membershipRequestID}/status")] [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] @@ -170,7 +170,7 @@ public async Task> UpdateStatusAsync(int membershipReq /// Deletes a membership request /// /// The id of the membership request to delete - /// The deleted object + /// The deleted request as a RequestView [HttpDelete] [Route("{membershipRequestID}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP_REQUEST)] diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index d00f41ced..0020c18b4 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -31,7 +31,7 @@ public MembershipRequestService(CCTContext context, IMembershipService membershi /// Generate a new request to join an activity at a participation level higher than 'Guest' /// /// The membership request object - /// The membership request object once it is added + /// The new request object as a RequestView public async Task AddAsync(RequestUploadViewModel membershipRequestUpload) { @@ -54,7 +54,7 @@ public async Task AddAsync(RequestUploadViewModel membershipRequest /// Approves the request with the specified ID. /// /// The ID of the request to be approved - /// The approved membership + /// The approved request as a RequestView public async Task ApproveAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); @@ -87,7 +87,7 @@ public async Task ApproveAsync(int requestID) /// Denies the membership request object whose id is given in the parameters /// /// The membership request id - /// + /// A RequestView object of the denied request public async Task DenyAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); @@ -117,7 +117,7 @@ public async Task DenyAsync(int requestID) /// Denies the membership request object whose id is given in the parameters /// /// The membership request id - /// + /// A RequestView object of the now pending request public async Task SetPendingAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); @@ -147,7 +147,7 @@ public async Task SetPendingAsync(int requestID) /// Delete the membershipRequest object whose id is given in the parameters /// /// The membership request id - /// A copy of the deleted membership request + /// A copy of the deleted request as a RequestView public async Task DeleteAsync(int requestID) { var request = await _context.REQUEST.FindAsync(requestID); @@ -168,7 +168,7 @@ public async Task DeleteAsync(int requestID) /// Get the membership request object whose Id is specified in the parameters. /// /// The membership request id - /// If found, returns MembershipRequestViewModel. If not found, returns null. + /// The matching RequestView public RequestView Get(int requestID) { var request = Get(requestID); @@ -184,7 +184,7 @@ public RequestView Get(int requestID) /// /// Fetches all the membership request objects from the database. /// - /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + /// RequestView IEnumerable. If no records are found, returns an empty IEnumerable. public IEnumerable GetAll() { return _context.RequestView; @@ -194,8 +194,9 @@ public IEnumerable GetAll() /// Fetches all the membership requests associated with this activity /// /// The activity id - /// The activity id - /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + /// The session code to filter by + /// The request status to filter by + /// A RequestView IEnumerable. If no records are found, returns an empty IEnumerable. public IEnumerable GetMembershipRequests(string activityCode, string? sessionCode = null, string? requestStatus = null) { if (!_context.ACT_INFO.Any(a => a.ACT_CDE == activityCode)) @@ -216,7 +217,7 @@ public IEnumerable GetMembershipRequests(string activityCode, strin /// Fetches all the membership requests associated with this student /// /// The AD Username of the user - /// MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + /// A RequestView IEnumerable. If no records are found, returns an empty IEnumerable. public IEnumerable GetMembershipRequestsByUsername(string username) { return _context.RequestView.Where(r => r.Username == username); @@ -227,7 +228,7 @@ public IEnumerable GetMembershipRequestsByUsername(string username) /// /// The membership request id /// The newly modified membership request - /// + /// A RequestView object of the updated request public async Task UpdateAsync(int requestID, RequestUploadViewModel membershipRequest) { var original = await _context.REQUEST.FindAsync(requestID); @@ -247,7 +248,7 @@ public IEnumerable GetMembershipRequestsByUsername(string username) await _context.SaveChangesAsync(); - return _context.RequestView.FirstOrDefault(r => r.RequestID == original.REQUEST_ID); + return Get(original.REQUEST_ID); } } } \ No newline at end of file diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 4065c7628..986914627 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -31,10 +31,9 @@ public MembershipService(CCTContext context, IAccountService accountService) /// we do it here by using the validateMembership() method. /// /// The membership to be added - /// The newly added Membership object + /// The newly added membership object as a MembershipView public async Task AddAsync(MembershipUploadViewModel membershipUpload) { - // validate returns a boolean value. ValidateMembership(membershipUpload); IsPersonAlreadyInActivity(membershipUpload); @@ -45,10 +44,8 @@ public async Task AddAsync(MembershipUploadViewModel membershipU int gordonId = int.Parse(_accountService.GetAccountByUsername(membershipUpload.Username).GordonID); MEMBERSHIP m = membershipUpload.ToMembership(gordonId, sessionBeginDate); - // The Add() method returns the added membership. var payload = await _context.MEMBERSHIP.AddAsync(m); - // There is a unique constraint in the Database on columns (ID_NUM, PART_LVL, SESS_CDE and ACT_CDE) if (payload?.Entity == null) { throw new ResourceCreationException() { ExceptionMessage = "There was an error creating the membership." }; @@ -65,7 +62,7 @@ public async Task AddAsync(MembershipUploadViewModel membershipU /// Delete the membership whose id is specified by the parameter. /// /// The membership id - /// The membership that was just deleted + /// The membership that was just deleted as a MembershipView public MembershipView Delete(int membershipID) { var result = _context.MEMBERSHIP.Find(membershipID); @@ -86,7 +83,7 @@ public MembershipView Delete(int membershipID) /// Fetch the membership whose id is specified by the parameter /// /// The membership id - /// MembershipViewModel if found, null if not found + /// The found membership as a MembershipView public MembershipView GetSpecificMembership(int membershipID) { MembershipView result = _context.MembershipView.FirstOrDefault(m => m.MembershipID == membershipID); @@ -101,11 +98,11 @@ public MembershipView GetSpecificMembership(int membershipID) /// /// Fetches the memberships associated with the activity whose code is specified by the parameter. /// - /// The activity code. + /// The activity code /// Optional code of session to get memberships for /// Optional filter for group admins /// Optional filter for involvement participation type (MEMBR, ADV, LEAD, GUEST) - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + /// An IEnumerable of the matching MembershipView objects public IEnumerable GetMembershipsForActivity( string activityCode, string? sessionCode = null, @@ -136,9 +133,9 @@ public IEnumerable GetMembershipsForActivity( /// /// Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. /// - /// The activity code. - /// The session code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + /// The activity code + /// The session code + /// An IEnumerable of the matching MembershipView objects public IEnumerable GetGroupAdminMembershipsForActivity(string activityCode, string? sessionCode = null) { sessionCode ??= Helpers.GetCurrentSession(_context); @@ -148,8 +145,8 @@ public IEnumerable GetGroupAdminMembershipsForActivity(string ac /// /// Fetches the leaders of the activity whose activity code is specified by the parameter. /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + /// The activity code + /// An IEnumerable of the matching MembershipView objects public IEnumerable GetLeaderMembershipsForActivity(string activityCode) { var leaderRole = Helpers.GetLeaderRoleCodes(); @@ -159,8 +156,8 @@ public IEnumerable GetLeaderMembershipsForActivity(string activi /// /// Fetches the advisors of the activity whose activity code is specified by the parameter. /// - /// The activity code. - /// MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + /// The activity code + /// An IEnumerable of the matching MembershipView objects public IEnumerable GetAdvisorMembershipsForActivity(string activityCode) { @@ -171,8 +168,8 @@ public IEnumerable GetAdvisorMembershipsForActivity(string activ /// /// Fetches all the membership information linked to the student whose id appears as a parameter. /// - /// The student's AD Username. - /// A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. + /// The student's AD Username + /// An IEnumerable of the matching MembershipView objects public IEnumerable GetMembershipsByUser(string username) { var account = _accountService.GetAccountByUsername(username); @@ -183,9 +180,9 @@ public IEnumerable GetMembershipsByUser(string username) /// /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. /// - /// The activity code. - /// The session code. - /// int. + /// The activity code + /// The session code + /// The count of current members for the activity public int GetActivityMembersCount(string activityCode, string? sessionCode = null) { sessionCode ??= Helpers.GetCurrentSession(_context); @@ -195,9 +192,9 @@ public int GetActivityMembersCount(string activityCode, string? sessionCode = nu /// /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. /// - /// The activity code. + /// The activity code /// The session code - /// int. + /// The count of current guests (aka subscribers) for the activity public int GetActivitySubscribersCountForSession(string activityCode, string? sessionCode = null) { sessionCode ??= Helpers.GetCurrentSession(_context); @@ -209,7 +206,7 @@ public int GetActivitySubscribersCountForSession(string activityCode, string? se /// /// The activity code. /// The session code - /// int + /// The count of current members for the activity public int GetActivityMembersCountForSession(string activityCode, string? sessionCode = null) { sessionCode ??= Helpers.GetCurrentSession(_context); @@ -219,9 +216,9 @@ public int GetActivityMembersCountForSession(string activityCode, string? sessio /// /// Updates the membership whose id is given as the first parameter to the contents of the second parameter. /// - /// The id of the membership to update. - /// The updated membership. - /// The newly modified membership. + /// The id of the membership to update + /// The updated membership + /// The newly modified membership as a MembershipView object public async Task UpdateAsync(int membershipID, MembershipUploadViewModel membership) { var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); @@ -233,6 +230,7 @@ public async Task UpdateAsync(int membershipID, MembershipUpload // One can only update certain fields within a membrship original.COMMENT_TXT = membership.CommentText; original.PART_CDE = membership.Participation; + if (membership.Participation == ParticipationType.Guest.Value) { await SetGroupAdminAsync(membershipID, false); @@ -248,7 +246,7 @@ public async Task UpdateAsync(int membershipID, MembershipUpload /// /// The corresponding membership object /// The new value of group admin - /// The newly modified membership. + /// The newly modified membership as a MembershipView object public async Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin) { var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); @@ -270,9 +268,9 @@ public async Task SetGroupAdminAsync(int membershipID, bool isGr /// /// Switches the privacy property of the person whose membership id is given /// - /// The membership object passed. - /// The new value of privacy. - /// The newly modified membership. + /// The membership object passed + /// The new value of privacy + /// The newly modified membership as a MembershipView object public async Task SetPrivacyAsync(int membershipID, bool isPrivate) { var original = await _context.MEMBERSHIP.FirstOrDefaultAsync(m => m.MEMBERSHIP_ID == membershipID); @@ -293,7 +291,7 @@ public async Task SetPrivacyAsync(int membershipID, bool isPriva /// Helper method to Validate a membership /// /// The membership to validate - /// True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + /// True if the membership is valid. Throws an Exception if not. Exception is caught in an Exception Filter public bool ValidateMembership(MembershipUploadViewModel membership) { var personExists = _accountService.GetAccountByUsername(membership.Username); @@ -319,7 +317,7 @@ public bool ValidateMembership(MembershipUploadViewModel membership) if (!_context.InvolvementOffering.Any(i => i.SessionCode == membership.Session && i.ActivityCode.Trim() == membership.Activity)) { - throw new ResourceNotFoundException() { ExceptionMessage = "The Activity is not available for this session." }; + throw new BadInputException() { ExceptionMessage = "The Activity is not available for this session." }; } return true; @@ -395,7 +393,7 @@ public class ParticipationType /// /// Finds the matching MembershipView object from an existing MEMBERSHIP object /// - /// The MEMBERSHIP to match on MembershipID + /// The MEMBERSHIP to match on MembershipID /// The found MembershipView object corresponding to the MEMBERSHIP by ID public MembershipView GetMembershipViewById(int membershipId) { From 6151fed090795e2a110e620e3fba40d64c840c99 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 09:47:50 -0400 Subject: [PATCH 28/49] Remove unused methods --- Gordon360/Controllers/MembershipsController.cs | 14 -------------- Gordon360/Services/MembershipService.cs | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 651521fbd..2890d7253 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -195,19 +195,5 @@ public ActionResult Delete(int membershipID) return Ok(result); } - - /// - /// Determines whether or not the given student is a Group Admin of some activity - /// - /// The account username to check - /// The updated membership as a MembershipView object - [HttpGet] - [Route("isGroupAdmin/{id}")] - public ActionResult IsGroupAdmin(string username) - { - var result = _membershipService.IsGroupAdmin(username); - - return Ok(result); - } } } diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 986914627..04ea747a1 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -177,18 +177,6 @@ public IEnumerable GetMembershipsByUser(string username) return _context.MembershipView.Where(m => m.Username == account.ADUserName).OrderByDescending(x => x.StartDate); } - /// - /// Fetches the number of memberships associated with the activity whose code is specified by the parameter. - /// - /// The activity code - /// The session code - /// The count of current members for the activity - public int GetActivityMembersCount(string activityCode, string? sessionCode = null) - { - sessionCode ??= Helpers.GetCurrentSession(_context); - return _context.MembershipView.Where(m => m.ActivityCode == activityCode && m.Participation != ParticipationType.Guest.Value && m.SessionCode == sessionCode).Count(); - } - /// /// Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. /// From 1b2ce9c2e604677e26ff752acef8c0af32c3876c Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 09:51:29 -0400 Subject: [PATCH 29/49] Remove method from interface -- missed in last commit --- Gordon360/Services/ServiceInterfaces.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 6ce048061..911ea1013 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -176,7 +176,6 @@ public IEnumerable GetMembershipsForActivity( int GetActivitySubscribersCountForSession(string activityCode, string? sessionCode); int GetActivityMembersCountForSession(string activityCode, string? sessionCode); MembershipView GetSpecificMembership(int membershipID); - int GetActivityMembersCount(string activityCode, string? sessionCode); Task AddAsync(MembershipUploadViewModel membership); Task UpdateAsync(int membershipID, MembershipUploadViewModel membership); Task SetGroupAdminAsync(int membershipID, bool isGroupAdmin); From 86f4eb80135c28a860a055a8430eb04337eda61f Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 10:13:01 -0400 Subject: [PATCH 30/49] Revert changes to PreserveCasingWithRegex --- Gordon360/Models/CCT/Context/efpt.CCT.config.json | 1 - 1 file changed, 1 deletion(-) diff --git a/Gordon360/Models/CCT/Context/efpt.CCT.config.json b/Gordon360/Models/CCT/Context/efpt.CCT.config.json index e8ddb5edc..461d038ac 100644 --- a/Gordon360/Models/CCT/Context/efpt.CCT.config.json +++ b/Gordon360/Models/CCT/Context/efpt.CCT.config.json @@ -8,7 +8,6 @@ "ModelNamespace": null, "OutputContextPath": "Models\/CCT\/Context", "OutputPath": "Models\/CCT", - "PreserveCasingWithRegex": true, "ProjectRootNamespace": "Gordon360", "Schemas": null, "SelectedHandlebarsLanguage": 0, From c18f52c95a1eba8899e92b4679021c1c9d586310 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 11:51:48 -0400 Subject: [PATCH 31/49] Changes requested by @EJPlatzer --- Gordon360/Services/AdministratorService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gordon360/Services/AdministratorService.cs b/Gordon360/Services/AdministratorService.cs index d29fb515c..90e34479b 100644 --- a/Gordon360/Services/AdministratorService.cs +++ b/Gordon360/Services/AdministratorService.cs @@ -26,7 +26,7 @@ public AdministratorService(CCTContext context, IAccountService accountService) /// Returns a list of administrators. If no administrators were found, an empty list is returned. public IEnumerable GetAll() { - return _context.ADMIN.Select(a => (AdminViewModel)a); + return _context.ADMIN.Select(a => a); } /// @@ -37,7 +37,7 @@ public IEnumerable GetAll() { var admin = _context.ADMIN.FirstOrDefault(a => a.USER_NAME == username); if (admin != null) - return (AdminViewModel)admin; + return admin; return null; } From 8e6130fd30ef9fc6a48f7c4ee7c538f61f09c4c3 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 12:25:24 -0400 Subject: [PATCH 32/49] Remove unnecessary try catch and allow null pass/return from implicit operator --- Gordon360/Controllers/AdminsController.cs | 2 +- Gordon360/Controllers/HousingController.cs | 12 +----------- Gordon360/Models/ViewModels/AdminViewModel.cs | 4 +++- Gordon360/Services/AdministratorService.cs | 8 +++----- Gordon360/Services/ServiceInterfaces.cs | 2 +- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Gordon360/Controllers/AdminsController.cs b/Gordon360/Controllers/AdminsController.cs index b1526cf20..736fecf61 100644 --- a/Gordon360/Controllers/AdminsController.cs +++ b/Gordon360/Controllers/AdminsController.cs @@ -32,7 +32,7 @@ public AdminsController(CCTContext context, IAccountService accountService) [HttpGet] [Route("")] [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.ADMIN)] - public ActionResult> GetAll() + public ActionResult> GetAll() { var result = _adminService.GetAll(); return Ok(result); diff --git a/Gordon360/Controllers/HousingController.cs b/Gordon360/Controllers/HousingController.cs index 46191d37b..ea9a485aa 100644 --- a/Gordon360/Controllers/HousingController.cs +++ b/Gordon360/Controllers/HousingController.cs @@ -207,17 +207,7 @@ public ActionResult GetApartmentApplication(int a //get token data from context, username is the username of current logged in person var authenticatedUserUsername = AuthUtils.GetUsername(User); - bool isAdmin = false; - - try - { - isAdmin = _administratorService.GetByUsername(authenticatedUserUsername) != null - || _housingService.CheckIfHousingAdmin(authenticatedUserUsername); - } - catch - { - isAdmin = false; - } + bool isAdmin = _administratorService.GetByUsername(authenticatedUserUsername) != null || _housingService.CheckIfHousingAdmin(authenticatedUserUsername); ApartmentApplicationViewModel result = _housingService.GetApartmentApplication(applicationID, isAdmin); if (result != null) diff --git a/Gordon360/Models/ViewModels/AdminViewModel.cs b/Gordon360/Models/ViewModels/AdminViewModel.cs index f157a89e2..bec70382e 100644 --- a/Gordon360/Models/ViewModels/AdminViewModel.cs +++ b/Gordon360/Models/ViewModels/AdminViewModel.cs @@ -8,8 +8,10 @@ public partial class AdminViewModel public string Email { get; set; } public bool IsSuperAdmin { get; set; } - public static implicit operator AdminViewModel(ADMIN adm) + public static implicit operator AdminViewModel?(ADMIN? adm) { + if (adm == null) return null; + return new AdminViewModel() { Username = adm.USER_NAME, diff --git a/Gordon360/Services/AdministratorService.cs b/Gordon360/Services/AdministratorService.cs index 90e34479b..3010cc147 100644 --- a/Gordon360/Services/AdministratorService.cs +++ b/Gordon360/Services/AdministratorService.cs @@ -24,9 +24,9 @@ public AdministratorService(CCTContext context, IAccountService accountService) /// Fetches all the administrators from the database /// /// Returns a list of administrators. If no administrators were found, an empty list is returned. - public IEnumerable GetAll() + public IEnumerable GetAll() { - return _context.ADMIN.Select(a => a); + return _context.ADMIN.Select(a => a); } /// @@ -36,9 +36,7 @@ public IEnumerable GetAll() public AdminViewModel? GetByUsername(string username) { var admin = _context.ADMIN.FirstOrDefault(a => a.USER_NAME == username); - if (admin != null) - return admin; - return null; + return admin; } /// diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 911ea1013..2f99623fc 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -134,7 +134,7 @@ public interface IActivityInfoService public interface IAdministratorService { - IEnumerable GetAll(); + IEnumerable GetAll(); AdminViewModel? GetByUsername(string username); AdminViewModel Add(AdminViewModel admin); AdminViewModel Delete(int id); From 9afb642b48dbcbdced040546afc8bf71cefe3ce9 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 13:17:23 -0400 Subject: [PATCH 33/49] Use dependency injection instead of new instance in constructor --- Gordon360/Controllers/AdminsController.cs | 4 +- Gordon360/Controllers/EmailsController.cs | 6 +- Gordon360/Documentation/Gordon360.xml | 116 ++++++++++------------ Gordon360/Program.cs | 2 + 4 files changed, 60 insertions(+), 68 deletions(-) diff --git a/Gordon360/Controllers/AdminsController.cs b/Gordon360/Controllers/AdminsController.cs index 736fecf61..cb51eb16e 100644 --- a/Gordon360/Controllers/AdminsController.cs +++ b/Gordon360/Controllers/AdminsController.cs @@ -14,9 +14,9 @@ public class AdminsController : GordonControllerBase { private readonly IAdministratorService _adminService; - public AdminsController(CCTContext context, IAccountService accountService) + public AdminsController(IAdministratorService adminService) { - _adminService = new AdministratorService(context, accountService); + _adminService = adminService; } /// diff --git a/Gordon360/Controllers/EmailsController.cs b/Gordon360/Controllers/EmailsController.cs index f8c75f9f8..902fd5766 100644 --- a/Gordon360/Controllers/EmailsController.cs +++ b/Gordon360/Controllers/EmailsController.cs @@ -13,11 +13,11 @@ namespace Gordon360.Controllers [Route("api/[controller]")] public class EmailsController : GordonControllerBase { - private readonly EmailService _emailService; + private readonly IEmailService _emailService; - public EmailsController(CCTContext context, IMembershipService membershipService) + public EmailsController(CCTContext context, IEmailService emailService) { - _emailService = new EmailService(context, membershipService); + _emailService = emailService; } [HttpGet] diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index a77fbc596..6009b8cbc 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -397,28 +397,28 @@ The activity ID Optional code of session to get for - IHttpActionResult + An IEnumerable of the matching MembershipViews Gets the group admin memberships associated with a given activity. The activity ID. - A list of all leader-type memberships for the specified activity. + An IEnumerable of all leader-type memberships for the specified activity. Gets the leader-type memberships associated with a given activity. The activity ID. - A list of all leader-type memberships for the specified activity. + An IEnumerable of all leader-type memberships for the specified activity. Gets the advisor-type memberships associated with a given activity. The activity ID. - A list of all advisor-type memberships for the specified activity. + An IEnumerable of all advisor-type memberships for the specified activity. @@ -438,8 +438,8 @@ Create a new membership item to be added to database - The membership item containing all required and relevant information - + The membership item containing all required and relevant information + The newly created membership as a MembershipView object Posts a new membership to the server to be added into the database @@ -447,30 +447,27 @@ The membership id of whichever one is to be changed The content within the membership that is to be changed and what it will change to Calls the server to make a call and update the database with the changed information - The membership information that the student is a part of + The updated membership as a MembershipView object Update an existing membership item to be a group admin or not The content within the membership that is to be changed The new value of GroupAdmin Calls the server to make a call and update the database with the changed information + The updated membership as a MembershipView object Update an existing membership item to be private or not The membership to set the privacy of The new value of Privacy for the membership Calls the server to make a call and update the database with the changed information + The updated membership as a MembershipView object Delete an existing membership The identifier for the membership to be deleted Calls the server to make a call and remove the given membership from the database - - - - Determines whether or not the given student is a Group Admin of some activity - - The account username to check + The deleted membership as a MembershipView object @@ -695,7 +692,7 @@ Gets a specific Membership Request Object The ID of the membership request - A memberships request with the specified id + A RequestView that matches the specified id @@ -703,14 +700,14 @@ The activity code The session code - The status of the requests to search + The optional status of the requests to search All membership requests associated with the activity Gets the memberships requests for the person making the request - All membership requests associated with the student + All membership requests associated with the current user @@ -733,14 +730,14 @@ The id of the membership request in question. The status that the membership requst will be changed to. - If successful: The updated membership request wrapped in an OK HTTP status code. + The updated request Deletes a membership request The id of the membership request to delete - The deleted object + The deleted request as a RequestView @@ -1505,63 +1502,64 @@ Generate a new request to join an activity at a participation level higher than 'Guest' The membership request object - The membership request object once it is added + The new request object as a RequestView Approves the request with the specified ID. The ID of the request to be approved - The approved membership + The approved request as a RequestView Denies the membership request object whose id is given in the parameters The membership request id - + A RequestView object of the denied request Denies the membership request object whose id is given in the parameters The membership request id - + A RequestView object of the now pending request Delete the membershipRequest object whose id is given in the parameters The membership request id - A copy of the deleted membership request + A copy of the deleted request as a RequestView Get the membership request object whose Id is specified in the parameters. The membership request id - If found, returns MembershipRequestViewModel. If not found, returns null. + The matching RequestView Fetches all the membership request objects from the database. - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + RequestView IEnumerable. If no records are found, returns an empty IEnumerable. Fetches all the membership requests associated with this activity The activity id - The activity id - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + The session code to filter by + The request status to filter by + A RequestView IEnumerable. If no records are found, returns an empty IEnumerable. Fetches all the membership requests associated with this student The AD Username of the user - MembershipRequestViewModel IEnumerable. If no records are found, returns an empty IEnumerable. + A RequestView IEnumerable. If no records are found, returns an empty IEnumerable. @@ -1569,7 +1567,7 @@ The membership request id The newly modified membership request - + A RequestView object of the updated request @@ -1582,76 +1580,68 @@ we do it here by using the validateMembership() method. The membership to be added - The newly added Membership object + The newly added membership object as a MembershipView Delete the membership whose id is specified by the parameter. The membership id - The membership that was just deleted + The membership that was just deleted as a MembershipView Fetch the membership whose id is specified by the parameter The membership id - MembershipViewModel if found, null if not found + The found membership as a MembershipView Fetches the memberships associated with the activity whose code is specified by the parameter. - The activity code. + The activity code Optional code of session to get memberships for Optional filter for group admins Optional filter for involvement participation type (MEMBR, ADV, LEAD, GUEST) - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + An IEnumerable of the matching MembershipView objects Fetches the group admin (who have edit privileges of the page) of the activity whose activity code is specified by the parameter. - The activity code. - The session code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + The activity code + The session code + An IEnumerable of the matching MembershipView objects Fetches the leaders of the activity whose activity code is specified by the parameter. - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + The activity code + An IEnumerable of the matching MembershipView objects Fetches the advisors of the activity whose activity code is specified by the parameter. - The activity code. - MembershipViewModel IEnumerable. If no records were found, an empty IEnumerable is returned. + The activity code + An IEnumerable of the matching MembershipView objects Fetches all the membership information linked to the student whose id appears as a parameter. - The student's AD Username. - A MembershipViewModel IEnumerable. If nothing is found, an empty IEnumerable is returned. - - - - Fetches the number of memberships associated with the activity whose code is specified by the parameter. - - The activity code. - The session code. - int. + The student's AD Username + An IEnumerable of the matching MembershipView objects Fetches the number of followers associated with the activity and session whose codes are specified by the parameter. - The activity code. + The activity code The session code - int. + The count of current guests (aka subscribers) for the activity @@ -1659,15 +1649,15 @@ The activity code. The session code - int + The count of current members for the activity Updates the membership whose id is given as the first parameter to the contents of the second parameter. - The id of the membership to update. - The updated membership. - The newly modified membership. + The id of the membership to update + The updated membership + The newly modified membership as a MembershipView object @@ -1675,22 +1665,22 @@ The corresponding membership object The new value of group admin - The newly modified membership. + The newly modified membership as a MembershipView object Switches the privacy property of the person whose membership id is given - The membership object passed. - The new value of privacy. - The newly modified membership. + The membership object passed + The new value of privacy + The newly modified membership as a MembershipView object Helper method to Validate a membership The membership to validate - True if the membership is valid. Throws ResourceNotFoundException if not. Exception is caught in an Exception Filter + True if the membership is valid. Throws an Exception if not. Exception is caught in an Exception Filter @@ -1703,7 +1693,7 @@ Finds the matching MembershipView object from an existing MEMBERSHIP object - The MEMBERSHIP to match on MembershipID + The MEMBERSHIP to match on MembershipID The found MembershipView object corresponding to the MEMBERSHIP by ID diff --git a/Gordon360/Program.cs b/Gordon360/Program.cs index 009a1b4e3..6a27fddff 100644 --- a/Gordon360/Program.cs +++ b/Gordon360/Program.cs @@ -47,6 +47,8 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddMemoryCache(); From a72895be2b41fced20fdfd2ae506fe3feef3184e Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 13:58:20 -0400 Subject: [PATCH 34/49] Add News Interface and fix recursive get on requests service --- Gordon360/Controllers/RequestsController.cs | 2 +- Gordon360/Program.cs | 1 + Gordon360/Services/MembershipRequestService.cs | 4 ++-- Gordon360/Services/MembershipService.cs | 2 +- Gordon360/Services/ServiceInterfaces.cs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index aedab6807..4659e1c31 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -40,7 +40,7 @@ public ActionResult> Get() [HttpGet] [Route("{id}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult Get(int id) + public ActionResult Get(int id) { var result = _membershipRequestService.Get(id); diff --git a/Gordon360/Program.cs b/Gordon360/Program.cs index 6a27fddff..8af4604f5 100644 --- a/Gordon360/Program.cs +++ b/Gordon360/Program.cs @@ -49,6 +49,7 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddMemoryCache(); diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 0020c18b4..36787e651 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -169,9 +169,9 @@ public async Task DeleteAsync(int requestID) /// /// The membership request id /// The matching RequestView - public RequestView Get(int requestID) + public RequestView? Get(int requestID) { - var request = Get(requestID); + var request = _context.RequestView.FirstOrDefault(rv => rv.RequestID == requestID); if (request == null) { diff --git a/Gordon360/Services/MembershipService.cs b/Gordon360/Services/MembershipService.cs index 04ea747a1..aa96d640b 100644 --- a/Gordon360/Services/MembershipService.cs +++ b/Gordon360/Services/MembershipService.cs @@ -283,7 +283,7 @@ public async Task SetPrivacyAsync(int membershipID, bool isPriva public bool ValidateMembership(MembershipUploadViewModel membership) { var personExists = _accountService.GetAccountByUsername(membership.Username); - if (personExists != null) + if (personExists == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Person was not found." }; } diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 2f99623fc..e8dd2e7be 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -212,7 +212,7 @@ public interface IParticipationService public interface IMembershipRequestService { - RequestView Get(int requestID); + RequestView? Get(int requestID); IEnumerable GetAll(); IEnumerable GetMembershipRequests(string activityCode, string? sessionCode, string? requestStatus); IEnumerable GetMembershipRequestsByUsername(string usernamne); From 127c29d7b0da3c59f26f17267f4031d8c5f7f2a1 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 17 Oct 2022 14:29:34 -0400 Subject: [PATCH 35/49] Re-add logic to check for existing identical request/s --- Gordon360/Controllers/RequestsController.cs | 2 +- Gordon360/Services/MembershipRequestService.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 4659e1c31..bc391f9b0 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -75,7 +75,7 @@ public ActionResult> GetMembershipRequestsByActivity(st /// /// All membership requests associated with the current user [HttpGet] - [Route("/users/current")] + [Route("users/current")] public ActionResult> GetMembershipsRequestsForCurrentUser() { var authenticatedUserUsername = AuthUtils.GetUsername(User); diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index 36787e651..c5c89cee7 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -39,6 +39,10 @@ public async Task AddAsync(RequestUploadViewModel membershipRequest // Validates the memberships request by throwing appropriate exceptions. The exceptions are caugth in the CustomExceptionFilter _membershipService.ValidateMembership(m); _membershipService.IsPersonAlreadyInActivity(m); + if (RequestAlreadyExists(membershipRequestUpload)) + { + throw new ResourceCreationException() { ExceptionMessage = "A request already exists with this activity, session, and user." }; + } var request = (REQUEST) membershipRequestUpload; request.ID_NUM = int.Parse(_accountService.GetAccountByUsername(membershipRequestUpload.Username).GordonID); @@ -50,6 +54,15 @@ public async Task AddAsync(RequestUploadViewModel membershipRequest } + private bool RequestAlreadyExists(RequestUploadViewModel requestUpload) + { + return _context.REQUEST.Any(r => + r.STATUS == Request_Status.PENDING + && r.ACT_CDE == requestUpload.Activity + && r.SESS_CDE == requestUpload.Session + ); + } + /// /// Approves the request with the specified ID. /// From d0921e9bf471436ed28534deb8f4d1a31d683b63 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Tue, 18 Oct 2022 16:10:45 -0400 Subject: [PATCH 36/49] Fixing misc broken functionality --- Gordon360/Controllers/AdminsController.cs | 8 ++++---- Gordon360/Controllers/MembershipsController.cs | 1 + Gordon360/Documentation/Gordon360.xml | 8 ++++---- Gordon360/Services/AdministratorService.cs | 6 +++--- Gordon360/Services/EmailService.cs | 6 +----- Gordon360/Services/ServiceInterfaces.cs | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Gordon360/Controllers/AdminsController.cs b/Gordon360/Controllers/AdminsController.cs index cb51eb16e..148df44ee 100644 --- a/Gordon360/Controllers/AdminsController.cs +++ b/Gordon360/Controllers/AdminsController.cs @@ -59,15 +59,15 @@ public ActionResult Post([FromBody] AdminViewModel admin) } /// Delete an existing admin - /// The identifier for the admin to be deleted + /// The username of the user to demote /// Calls the server to make a call and remove the given admin from the database // DELETE api//5 [HttpDelete] - [Route("{id}")] + [Route("{username}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.ADMIN)] - public ActionResult Delete(int id) + public ActionResult Delete(string username) { - var result = _adminService.Delete(id); + var result = _adminService.Delete(username); if (result == null) { diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 2890d7253..80ede7d1b 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -45,6 +45,7 @@ public ActionResult> GetMembershipsForActivity(strin /// Gets the group admin memberships associated with a given activity. /// /// The activity ID. + /// The session code of the activity. /// An IEnumerable of all leader-type memberships for the specified activity. [HttpGet] [Route("activities/{activityCode}/sessions/{sessionCode}/admins")] diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 6009b8cbc..647bc7484 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -177,9 +177,9 @@ Posts a new admin to the server to be added into the database - + Delete an existing admin - The identifier for the admin to be deleted + The username of the user to demote Calls the server to make a call and remove the given admin from the database @@ -1216,11 +1216,11 @@ The admin to be added The newly added Admin object - + Delete the admin whose id is specified by the parameter. - The admin id + The username of the admin to demote The admin that was just deleted diff --git a/Gordon360/Services/AdministratorService.cs b/Gordon360/Services/AdministratorService.cs index 3010cc147..7f279551a 100644 --- a/Gordon360/Services/AdministratorService.cs +++ b/Gordon360/Services/AdministratorService.cs @@ -69,11 +69,11 @@ public AdminViewModel Add(AdminViewModel adminView) /// /// Delete the admin whose id is specified by the parameter. /// - /// The admin id + /// The username of the admin to demote /// The admin that was just deleted - public AdminViewModel Delete(int id) + public AdminViewModel Delete(string username) { - var result = _context.ADMIN.Find(id); + var result = _context.ADMIN.FirstOrDefault(a => a.USER_NAME == username); if (result == null) { throw new ResourceNotFoundException() { ExceptionMessage = "The Admin was not found." }; diff --git a/Gordon360/Services/EmailService.cs b/Gordon360/Services/EmailService.cs index f9f0786cb..93970d422 100644 --- a/Gordon360/Services/EmailService.cs +++ b/Gordon360/Services/EmailService.cs @@ -34,11 +34,7 @@ public EmailService(CCTContext context, IMembershipService membershipService) /// A list of emails (along with first and last name) associated with that activity public async Task> GetEmailsForActivityAsync(string activityCode, string? sessionCode = null, ParticipationType? participationType = null) { - if (sessionCode == null) - { - sessionCode = Helpers.GetCurrentSession(_context); - } - + sessionCode ??= Helpers.GetCurrentSession(_context); var result = _membershipService.MembershipEmails(activityCode, sessionCode, participationType); diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index e8dd2e7be..6dada0bfc 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -137,7 +137,7 @@ public interface IAdministratorService IEnumerable GetAll(); AdminViewModel? GetByUsername(string username); AdminViewModel Add(AdminViewModel admin); - AdminViewModel Delete(int id); + AdminViewModel Delete(string username); } public interface IEmailService From cb8823e067e423141242f187365e60dda028c22e Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Wed, 19 Oct 2022 12:16:30 -0400 Subject: [PATCH 37/49] Handle null case in service method --- Gordon360/Controllers/RequestsController.cs | 4 ++-- Gordon360/Documentation/Gordon360.xml | 1 + Gordon360/Services/MembershipRequestService.cs | 9 +++------ Gordon360/Services/ServiceInterfaces.cs | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index bc391f9b0..6bfa189b0 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -27,7 +27,7 @@ public RequestsController(IMembershipRequestService membershipRequestService) [HttpGet] [Route("")] [StateYourBusiness(operation = Operation.READ_ALL, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult> Get() + public ActionResult> Get() { return Ok(_membershipRequestService.GetAll()); } @@ -40,7 +40,7 @@ public ActionResult> Get() [HttpGet] [Route("{id}")] [StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.MEMBERSHIP_REQUEST)] - public ActionResult Get(int id) + public ActionResult Get(int id) { var result = _membershipRequestService.Get(id); diff --git a/Gordon360/Documentation/Gordon360.xml b/Gordon360/Documentation/Gordon360.xml index 647bc7484..cf28116bc 100644 --- a/Gordon360/Documentation/Gordon360.xml +++ b/Gordon360/Documentation/Gordon360.xml @@ -404,6 +404,7 @@ Gets the group admin memberships associated with a given activity. The activity ID. + The session code of the activity. An IEnumerable of all leader-type memberships for the specified activity. diff --git a/Gordon360/Services/MembershipRequestService.cs b/Gordon360/Services/MembershipRequestService.cs index c5c89cee7..eb4117253 100644 --- a/Gordon360/Services/MembershipRequestService.cs +++ b/Gordon360/Services/MembershipRequestService.cs @@ -182,14 +182,11 @@ public async Task DeleteAsync(int requestID) /// /// The membership request id /// The matching RequestView - public RequestView? Get(int requestID) + public RequestView Get(int requestID) { - var request = _context.RequestView.FirstOrDefault(rv => rv.RequestID == requestID); + RequestView? query = _context.RequestView.FirstOrDefault(rv => rv.RequestID == requestID); - if (request == null) - { - throw new ResourceNotFoundException() { ExceptionMessage = "The Request was not found." }; - } + if (query is not RequestView request) throw new ResourceNotFoundException() { ExceptionMessage = "The request was not found"}; return request; } diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 6dada0bfc..36ff3674b 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -212,7 +212,7 @@ public interface IParticipationService public interface IMembershipRequestService { - RequestView? Get(int requestID); + RequestView Get(int requestID); IEnumerable GetAll(); IEnumerable GetMembershipRequests(string activityCode, string? sessionCode, string? requestStatus); IEnumerable GetMembershipRequestsByUsername(string usernamne); From 28a6fe3fff48e7f248675905bf4cdad060dee803 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Wed, 2 Nov 2022 09:21:17 -0400 Subject: [PATCH 38/49] Change MEMBERSHIP to MembershipView on MC.Delete --- Gordon360/Controllers/MembershipsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gordon360/Controllers/MembershipsController.cs b/Gordon360/Controllers/MembershipsController.cs index 80ede7d1b..21ae1fd21 100644 --- a/Gordon360/Controllers/MembershipsController.cs +++ b/Gordon360/Controllers/MembershipsController.cs @@ -190,7 +190,7 @@ public async Task> SetPrivacyAsync(int membershipID [HttpDelete] [Route("{membershipID}")] [StateYourBusiness(operation = Operation.DELETE, resource = Resource.MEMBERSHIP)] - public ActionResult Delete(int membershipID) + public ActionResult Delete(int membershipID) { var result = _membershipService.Delete(membershipID); From 041e9768acff368ec4f3c1efcb2d43a1e846e530 Mon Sep 17 00:00:00 2001 From: Bennett F Forkner <43764277+bennettforkner@users.noreply.github.com> Date: Fri, 11 Nov 2022 15:54:06 -0500 Subject: [PATCH 39/49] simplify logic for housing admin check Co-authored-by: Evan Platzer --- Gordon360/Controllers/HousingController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gordon360/Controllers/HousingController.cs b/Gordon360/Controllers/HousingController.cs index ea9a485aa..2c8a363ba 100644 --- a/Gordon360/Controllers/HousingController.cs +++ b/Gordon360/Controllers/HousingController.cs @@ -207,7 +207,9 @@ public ActionResult GetApartmentApplication(int a //get token data from context, username is the username of current logged in person var authenticatedUserUsername = AuthUtils.GetUsername(User); - bool isAdmin = _administratorService.GetByUsername(authenticatedUserUsername) != null || _housingService.CheckIfHousingAdmin(authenticatedUserUsername); + var siteAdmin = _administratorService.GetByUsername(authenticatedUserUsername); + var isHousingAdmin = _housingService.CheckIfHousingAdmin(authenticatedUserUsername); + bool isAdmin = siteAdmin != null || isHousingAdmin; ApartmentApplicationViewModel result = _housingService.GetApartmentApplication(applicationID, isAdmin); if (result != null) From f3d4e60d4e11a00ba9c1ce2eae8fa50d4368e11b Mon Sep 17 00:00:00 2001 From: Bennett F Forkner <43764277+bennettforkner@users.noreply.github.com> Date: Fri, 11 Nov 2022 15:56:10 -0500 Subject: [PATCH 40/49] Simplify logic for visible memberships on profile Co-authored-by: Evan Platzer --- Gordon360/Controllers/ProfilesController.cs | 25 +++++++++------------ 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Gordon360/Controllers/ProfilesController.cs b/Gordon360/Controllers/ProfilesController.cs index 634c70673..7bfd9aa79 100644 --- a/Gordon360/Controllers/ProfilesController.cs +++ b/Gordon360/Controllers/ProfilesController.cs @@ -520,24 +520,19 @@ public ActionResult> GetMembershipsByUser(string username) return Ok(result); else { - List visibleMemberships = new List(); - foreach (var thisMembership in result) - { - var act = _activityService.Get(thisMembership.ActivityCode); - if (!(act.Privacy == true || thisMembership.Privacy == true)) - { - visibleMemberships.Add(thisMembership); - } - else + var visibleMemberships = result.Where(m => { + var act = _activityService.Get(m.ActivityCode); + var isPublic = !(act.Privacy == true || m.Privacy == true); + if (isPublic) { + return true; + } else { // If the current authenticated user is an admin of this group, then include the membership - var admins = _membershipService.GetGroupAdminMembershipsForActivity(thisMembership.ActivityCode, thisMembership.SessionCode); - if (admins.Any(a => a.Username == authenticatedUserUsername)) - { - visibleMemberships.Add(thisMembership); - } + var admins = _membershipService.GetGroupAdminMembershipsForActivity(m.ActivityCode, m.SessionCode); + + return admins.Any(a => a.Username == authenticatedUserUsername); } - } + }); return Ok(visibleMemberships); } } From 41a471f756ccda8e553f43181d2920ac587529ae Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 14 Nov 2022 09:30:04 -0500 Subject: [PATCH 41/49] Remove status from SYB logic --- Gordon360/Authorization/StateYourBusiness.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index 6de366440..ffcd4f867 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -484,9 +484,9 @@ private async Task CanUpdateAsync(string resource) case Resource.MEMBERSHIP_REQUEST: { - // Once a request is sent, no one should be able to edit its contents. - // If a mistake is made in creating the original request, the user can always delete it and make a new one. - if (context.ActionArguments["status"] is string && context.ActionArguments["membershipRequestID"] is int mrID) + // Once a request is sent, no one is able to edit its contents. + // If a mistake is made in creating the original request, the user can delete it and make a new one. + if (context.ActionArguments["membershipRequestID"] is int mrID) { // Get the view model from the repository var activityCode = _membershipRequestService.Get(mrID).ActivityCode; From f05e76ada8b1d8067abd69c99ccdc8017619e95c Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 14 Nov 2022 10:03:29 -0500 Subject: [PATCH 42/49] Convert switch into switch expression --- Gordon360/Controllers/RequestsController.cs | 22 +++++++-------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index 6bfa189b0..b158eca46 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using System.Threading.Tasks; +using Gordon360.Exceptions; namespace Gordon360.Controllers { @@ -141,22 +142,13 @@ public async Task> PostAsync([FromBody] RequestUploadV [StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_REQUEST)] public async Task> UpdateStatusAsync(int membershipRequestID, [FromBody] string status) { - RequestView? updated = null; - - switch (status) + RequestView? updated = status switch { - case Request_Status.APPROVED: - updated = await _membershipRequestService.ApproveAsync(membershipRequestID); - break; - case Request_Status.DENIED: - updated = await _membershipRequestService.DenyAsync(membershipRequestID); - break; - case Request_Status.PENDING: - updated = await _membershipRequestService.SetPendingAsync(membershipRequestID); - break; - default: - return BadRequest($"Status must be one of '{Request_Status.APPROVED}', '{Request_Status.DENIED}', or '{Request_Status.PENDING}'"); - } + Request_Status.APPROVED => await _membershipRequestService.ApproveAsync(membershipRequestID), + Request_Status.DENIED => await _membershipRequestService.DenyAsync(membershipRequestID), + Request_Status.PENDING => await _membershipRequestService.SetPendingAsync(membershipRequestID), + _ => throw new BadInputException() { ExceptionMessage = $"Status must be one of '{Request_Status.APPROVED}', '{Request_Status.DENIED}', or '{Request_Status.PENDING}'" }; + }; if (updated == null) { From e5fa8ae6a1697ed67c5c7bc39d2f158b61889a96 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 14 Nov 2022 10:06:57 -0500 Subject: [PATCH 43/49] Remove public tag as methods are public by default --- Gordon360/Services/ServiceInterfaces.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gordon360/Services/ServiceInterfaces.cs b/Gordon360/Services/ServiceInterfaces.cs index 2f33d92b8..daa6fa206 100644 --- a/Gordon360/Services/ServiceInterfaces.cs +++ b/Gordon360/Services/ServiceInterfaces.cs @@ -159,8 +159,8 @@ public interface IErrorLogService public interface ISessionService { SessionViewModel Get(string sessionCode); - public SessionViewModel GetCurrentSession(); - public double[] GetDaysLeft(); + SessionViewModel GetCurrentSession(); + double[] GetDaysLeft(); IEnumerable GetAll(); } @@ -169,7 +169,7 @@ public interface IMembershipService IEnumerable GetLeaderMembershipsForActivity(string activityCode); IEnumerable GetAdvisorMembershipsForActivity(string activityCode); IEnumerable GetGroupAdminMembershipsForActivity(string activityCode, string? sessionCode = null); - public IEnumerable GetMembershipsForActivity( + IEnumerable GetMembershipsForActivity( string activityCode, string? sessionCode = null, bool? groupAdmin = null, @@ -185,10 +185,10 @@ public IEnumerable GetMembershipsForActivity( Task SetPrivacyAsync(int membershipID, bool isPrivate); MembershipView Delete(int membershipID); bool IsGroupAdmin(string username); - public IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); - public MembershipView GetMembershipViewById(int membershipId); + IEnumerable MembershipEmails(string activityCode, string sessionCode, ParticipationType? participationCode = null); + MembershipView GetMembershipViewById(int membershipId); bool ValidateMembership(MembershipUploadViewModel membership); - public bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest); + bool IsPersonAlreadyInActivity(MembershipUploadViewModel membershipRequest); } public interface IJobsService From 30a7c48a359471b35caded2507a3d9b10c4cb5d2 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Mon, 14 Nov 2022 10:14:09 -0500 Subject: [PATCH 44/49] Remove semicolon in switch statement --- Gordon360/Controllers/RequestsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gordon360/Controllers/RequestsController.cs b/Gordon360/Controllers/RequestsController.cs index b158eca46..91b8a5ccd 100644 --- a/Gordon360/Controllers/RequestsController.cs +++ b/Gordon360/Controllers/RequestsController.cs @@ -147,7 +147,7 @@ public async Task> UpdateStatusAsync(int membershipReq Request_Status.APPROVED => await _membershipRequestService.ApproveAsync(membershipRequestID), Request_Status.DENIED => await _membershipRequestService.DenyAsync(membershipRequestID), Request_Status.PENDING => await _membershipRequestService.SetPendingAsync(membershipRequestID), - _ => throw new BadInputException() { ExceptionMessage = $"Status must be one of '{Request_Status.APPROVED}', '{Request_Status.DENIED}', or '{Request_Status.PENDING}'" }; + _ => throw new BadInputException() { ExceptionMessage = $"Status must be one of '{Request_Status.APPROVED}', '{Request_Status.DENIED}', or '{Request_Status.PENDING}'" } }; if (updated == null) From 928272f059549bd0e16fc9e8915c950b636df3d8 Mon Sep 17 00:00:00 2001 From: Bennett F Forkner <43764277+bennettforkner@users.noreply.github.com> Date: Tue, 15 Nov 2022 08:17:40 -0500 Subject: [PATCH 45/49] Correct namespace of viewmodel --- Gordon360/Models/ViewModels/MembershipUploadViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index 7253070ff..b9fb537a8 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -1,6 +1,6 @@ using System; -namespace Gordon360.Models.CCT +namespace Gordon360.Models.ViewModels { public partial class MembershipUploadViewModel { @@ -57,4 +57,4 @@ public static implicit operator MembershipUploadViewModel(RequestUploadViewModel } } -} \ No newline at end of file +} From ad35dfb91ab275c49e27873fd28fe942b8140899 Mon Sep 17 00:00:00 2001 From: Bennett F Forkner <43764277+bennettforkner@users.noreply.github.com> Date: Tue, 15 Nov 2022 08:18:47 -0500 Subject: [PATCH 46/49] use CCT models --- Gordon360/Models/ViewModels/MembershipUploadViewModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs index b9fb537a8..561ed5629 100644 --- a/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs +++ b/Gordon360/Models/ViewModels/MembershipUploadViewModel.cs @@ -1,4 +1,5 @@ using System; +using Gordon360.Models.CCT; namespace Gordon360.Models.ViewModels { From a0b7ccc7695b8d66c59c2f8a84e8806d156969ed Mon Sep 17 00:00:00 2001 From: Bennett F Forkner <43764277+bennettforkner@users.noreply.github.com> Date: Tue, 15 Nov 2022 08:50:31 -0500 Subject: [PATCH 47/49] use viewmodels in StateYourBusiness --- Gordon360/Authorization/StateYourBusiness.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Gordon360/Authorization/StateYourBusiness.cs b/Gordon360/Authorization/StateYourBusiness.cs index ffcd4f867..7363ff87f 100644 --- a/Gordon360/Authorization/StateYourBusiness.cs +++ b/Gordon360/Authorization/StateYourBusiness.cs @@ -14,6 +14,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; +using Gordon360.Models.ViewModels; namespace Gordon360.Authorization { From c8aade4d6e896ee699183c1b1125640a2ba03276 Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Wed, 16 Nov 2022 09:40:47 -0500 Subject: [PATCH 48/49] Add IsAlumni to MembershipView in database --- Gordon360/Models/CCT/MembershipView.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Gordon360/Models/CCT/MembershipView.cs b/Gordon360/Models/CCT/MembershipView.cs index 68834347a..9b1b12d9d 100644 --- a/Gordon360/Models/CCT/MembershipView.cs +++ b/Gordon360/Models/CCT/MembershipView.cs @@ -12,7 +12,6 @@ namespace Gordon360.Models.CCT public partial class MembershipView { public int MembershipID { get; set; } - [Required] [StringLength(8)] [Unicode(false)] public string ActivityCode { get; set; } @@ -22,7 +21,6 @@ public partial class MembershipView public string ActivityDescription { get; set; } [Unicode(false)] public string ActivityImagePath { get; set; } - [Required] [StringLength(8)] [Unicode(false)] public string SessionCode { get; set; } @@ -38,7 +36,6 @@ public partial class MembershipView [StringLength(50)] [Unicode(false)] public string LastName { get; set; } - [Required] [StringLength(5)] [Unicode(false)] public string Participation { get; set; } @@ -55,5 +52,6 @@ public partial class MembershipView public string Description { get; set; } public bool? GroupAdmin { get; set; } public bool? Privacy { get; set; } + public int IsAlumni { get; set; } } } \ No newline at end of file From a9c8001969b6095f68423481cd8364bf4da9d86a Mon Sep 17 00:00:00 2001 From: "bennett.forkner" Date: Thu, 17 Nov 2022 11:16:07 -0500 Subject: [PATCH 49/49] Delete MembershipViewModel as it is replaced by MembershipView --- .../Models/ViewModels/MembershipViewModel.cs | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 Gordon360/Models/ViewModels/MembershipViewModel.cs diff --git a/Gordon360/Models/ViewModels/MembershipViewModel.cs b/Gordon360/Models/ViewModels/MembershipViewModel.cs deleted file mode 100644 index b3043fe40..000000000 --- a/Gordon360/Models/ViewModels/MembershipViewModel.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Gordon360.Models.CCT; -using System; -namespace Gordon360.Models.ViewModels -{ - public class MembershipViewModel - { - - public int MembershipID { get; set; } - public string ActivityCode { get; set; } - public string ActivityDescription { get; set; } - public string ActivityImage { get; set; } - public string ActivityImagePath { get; set; } - public string SessionCode { get; set; } - public string SessionDescription { get; set; } - public int IDNumber { get; set; } - public string AD_Username { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public bool? IsAlumni { get; set; } - public string Mail_Location { get; set; } - public string Participation { get; set; } - public string ParticipationDescription { get; set; } - public bool? GroupAdmin { get; set; } - public DateTime StartDate { get; set; } - public Nullable EndDate { get; set; } - public string Description { get; set; } - public string ActivityType { get; set; } - public string ActivityTypeDescription { get; set; } - public bool? Privacy { get; set; } - public int AccountPrivate { get; set; } - - - public static implicit operator MembershipViewModel(MEMBERSHIP m) - { - MembershipViewModel vm = new MembershipViewModel - { - MembershipID = m.MEMBERSHIP_ID, - ActivityCode = m.ACT_CDE.Trim(), - SessionCode = m.SESS_CDE.Trim(), - IDNumber = m.ID_NUM, - Participation = m.PART_CDE.Trim(), - GroupAdmin = m.GRP_ADMIN ?? false, - StartDate = m.BEGIN_DTE, - EndDate = m.END_DTE, - Description = m.COMMENT_TXT ?? "", // For Null comments - Privacy = m.PRIVACY ?? false, - }; - - return vm; - } - } -} \ No newline at end of file