Add project
All checks were successful
SanStudent Multi-Project Deployment / deploy-api (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontadmin (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontstudent (push) Successful in 40s

This commit is contained in:
aherman-san
2026-03-07 11:14:26 +01:00
parent bca807d4c1
commit b8f03bf6d3
191 changed files with 122377 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
using System.Net;
namespace Common.Dtos.Common;
public abstract class BaseResponse
{
public bool Ok { get; set; }
public string? Error { get; set; }
}

View File

@@ -0,0 +1,22 @@
namespace Common.Dtos.Common;
public class PagedList<T>
{
public PagedList(T[] items, int pageNumber, int pageSize, int totalItemsCount, int numberOfPages)
{
Items = items;
PageNumber = pageNumber;
PageSize = pageSize;
TotalItemsCount = totalItemsCount;
NumberOfPages = numberOfPages;
}
public static PagedList<T> Empty(int pagedNumber, int pageSize)
=> new([], pagedNumber, pageSize, 0, 0);
public T[] Items { get; }
public int PageNumber { get; }
public int PageSize { get; }
public int TotalItemsCount { get; }
public int NumberOfPages { get; }
}

View File

@@ -0,0 +1,7 @@
namespace Common.Dtos.Common;
public abstract class PagedRequest
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace Common.Dtos.Common;
public class ValidationProblems
{
public ValidationProblems()
{
Errors = [];
}
public List<string> Errors { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace Common.Dtos.Season;
public class CreateSeasonRequest
{
public string? Name { get; set; }
public DateOnly StartDate { get; set; }
public DateOnly EndDate { get; set; }
}

View File

@@ -0,0 +1,8 @@
using Common.Dtos.Common;
namespace Common.Dtos.Season;
public class CreateSeasonResponse : BaseResponse
{
public string? CreateSeasonResult { get; set; }
}

View File

@@ -0,0 +1,9 @@
using Common.Dtos.Common;
namespace Common.Dtos.Season;
public class GetSeasonsRequest : PagedRequest
{
public string? Name { get; set; }
public bool? HideObsolete { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace Common.Dtos.Season;
public class SeasonDto
{
public int Id { get; set; }
public string? Name { get; set; }
public DateOnly StartDate { get; set; }
public DateOnly EndDate { get; set; }
public bool IsCurrent => StartDate <= DateOnly.FromDateTime(DateTime.Now) && EndDate >= DateOnly.FromDateTime(DateTime.Now);
}

View File

@@ -0,0 +1,7 @@
namespace Common.Dtos.Specialization;
public class CreateSpecializationRequest
{
public string? Name { get; set; }
public string? ShortName { get; set; }
}

View File

@@ -0,0 +1,12 @@
using Common.Dtos.Common;
using System;
using System.Collections.Generic;
using System.Text;
namespace Common.Dtos.Specialization
{
public class CreateSpecializationResponse : BaseResponse
{
public string? CreateSpecializationResult { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
using Common.Dtos.Common;
namespace Common.Dtos.Specialization;
public class GetSpecializationsRequest : PagedRequest
{
public string? Name { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace Common.Dtos.Specialization;
public class SpecializationDto
{
public int Id { get; set; }
public string? Name { get; set; }
public string? ShortName { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace Common.Dtos.Student;
public class CreateStudentRequest
{
public required string FirstName { get; set; }
public required string LastName { get; set; }
public required string AlbumNumber { get; set; }
}

View File

@@ -0,0 +1,8 @@
using Common.Dtos.Common;
namespace Common.Dtos.Student;
public class CreateStudentResponse : BaseResponse
{
public string? CreateStudentResult { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace Common.Dtos.Student;
public class StudentBasicDto
{
public Guid Id { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? AlbumNumber { get; set; }
public string FullNameReverese => $"{LastName} {FirstName} ({AlbumNumber})";
}

View File

@@ -0,0 +1,7 @@
namespace Common.Dtos.Subject;
public class CreateSubjectRequest
{
public string? Name { get; set; }
public string? ShortName { get; set; }
}

View File

@@ -0,0 +1,12 @@
using Common.Dtos.Common;
using System;
using System.Collections.Generic;
using System.Text;
namespace Common.Dtos.Subject
{
public class CreateSubjectResponse : BaseResponse
{
public string? CreateSubjectResult { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
using Common.Dtos.Common;
namespace Common.Dtos.Subject;
public class GetSubjectsRequest : PagedRequest
{
public string? Name { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Common.Dtos.Subject;
public class SubjectDto
{
public int Id { get; set; }
public string? Name { get; set; }
public string? ShortName { get; set; }
}