Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6de23161e9 | |||
5ccd28f815 |
49
README.MD
Normal file
49
README.MD
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Uruchomienie
|
||||||
|
|
||||||
|
Aby uruchomić środowisko deweloperskie wystarczy
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -f ./InternshipSystem.Api/Dockerfile -t internship.api .
|
||||||
|
docker-compose -f ./.docker/docker-compose.yaml --build --volumes
|
||||||
|
```
|
||||||
|
|
||||||
|
# Opis struktury
|
||||||
|
|
||||||
|
Opis struktury projektu
|
||||||
|
|
||||||
|
## src/
|
||||||
|
|
||||||
|
zawiera kod podzielony na 3 projekty
|
||||||
|
|
||||||
|
- Api - Definicja interfejsu wystawianego dla częsci frontendowej
|
||||||
|
- Core - Logika biznesowa aplikacji, definicja domeny.
|
||||||
|
- Repository - Definicja repozytorium EFCore
|
||||||
|
|
||||||
|
## test/
|
||||||
|
|
||||||
|
Zawiera testy jednostkowe projektu. Przy pisaniu wykorzystano Machine-Specification
|
||||||
|
|
||||||
|
## .build/
|
||||||
|
|
||||||
|
Folder zawierający pliki definiujące CI/CD projektu
|
||||||
|
|
||||||
|
## .docker/
|
||||||
|
|
||||||
|
Folder zawiera pliki docker-compose przeznaczone do uruchamiania środowiska deweloperskiego, stanowiące również dokumentacje zmiennych środowiskowych konfigurujących projekt
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
CONNECTIONSTRINGS__INTERNSHIPDATABASE: "Host=db.postgres;Port=5432;Database=postgres;Username=postgres;Password=password"
|
||||||
|
ASPNETCORE_ENVIRONMENT: Development
|
||||||
|
ASPNETCORE_URLS: http://+:80
|
||||||
|
SECURITYOPTIONS__SECRET: secret
|
||||||
|
SECURITYOPTIONS__EXPIRATION: 1440 # 24h in minutes
|
||||||
|
SECURITYOPTIONS__BASEURL: https://logowanie.pg.edu.pl
|
||||||
|
SECURITYOPTIONS__TOKENPATH: /oauth2.0/accessToken
|
||||||
|
SECURITYOPTIONS__PROFILEPATH: /oauth2.0/profile
|
||||||
|
SECURITYOPTIONS__CLIENTID: PraktykiClientId
|
||||||
|
SECURITYOPTIONS__REDIRECTURL: https://system-praktyk.net/user/login/check/pg
|
||||||
|
```
|
||||||
|
|
||||||
|
## props/
|
||||||
|
|
||||||
|
Folder ze współdzieloną konfiguracją dla grup projektów, np. wersji bibliotek używanych przy pisaniu testów.
|
@ -38,11 +38,14 @@ namespace InternshipSystem.Api.Controllers
|
|||||||
.Include(i => i.InternshipRegistration.Type)
|
.Include(i => i.InternshipRegistration.Type)
|
||||||
.Include(i => i.Student)
|
.Include(i => i.Student)
|
||||||
.Include(i => i.Documentation)
|
.Include(i => i.Documentation)
|
||||||
.Where(i => !searchQuery.EditionId.HasValue || i.Edition.Id.Equals(searchQuery.EditionId))
|
.Include(i => i.Report)
|
||||||
.Where(i => !searchQuery.InternshipState.HasValue || i.InternshipRegistration.State.Equals(searchQuery.InternshipState))
|
.Where(i => !searchQuery.EditionId.HasValue || i.Edition.Id == searchQuery.EditionId)
|
||||||
.Where(i => !searchQuery.StudentAlbumNumber.HasValue || i.Student.AlbumNumber.Equals(searchQuery.StudentAlbumNumber))
|
.Where(i => !searchQuery.InternshipState.HasValue || i.InternshipRegistration.State == searchQuery.InternshipState)
|
||||||
|
.Where(i => !searchQuery.InternshipState.HasValue || i.Report.State == searchQuery.ReportState)
|
||||||
|
.Where(i => !searchQuery.StudentAlbumNumber.HasValue || i.Student.AlbumNumber == searchQuery.StudentAlbumNumber)
|
||||||
.Where(i => string.IsNullOrEmpty(searchQuery.StudentFirstName) || i.Student.FirstName.ToLower().Contains(searchQuery.StudentFirstName.ToLower()))
|
.Where(i => string.IsNullOrEmpty(searchQuery.StudentFirstName) || i.Student.FirstName.ToLower().Contains(searchQuery.StudentFirstName.ToLower()))
|
||||||
.Where(i => string.IsNullOrEmpty(searchQuery.StudentLastName) || i.Student.LastName.ToLower().Contains(searchQuery.StudentLastName.ToLower()))
|
.Where(i => string.IsNullOrEmpty(searchQuery.StudentLastName) || i.Student.LastName.ToLower().Contains(searchQuery.StudentLastName.ToLower()))
|
||||||
|
.Where(i => !searchQuery.DocumentWithState.HasValue || i.Documentation.Any(d => d.State == searchQuery.DocumentWithState))
|
||||||
.Skip(searchQuery.Page * searchQuery.PerPage)
|
.Skip(searchQuery.Page * searchQuery.PerPage)
|
||||||
.Take(searchQuery.PerPage);
|
.Take(searchQuery.PerPage);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ namespace InternshipSystem.Api.Queries.SearchQuery
|
|||||||
{
|
{
|
||||||
public Guid? EditionId { get; set; } = null;
|
public Guid? EditionId { get; set; } = null;
|
||||||
public DocumentState? InternshipState { get; set; } = null;
|
public DocumentState? InternshipState { get; set; } = null;
|
||||||
|
public DocumentState? ReportState { get; set; }
|
||||||
public int? StudentAlbumNumber { get; set; } = null;
|
public int? StudentAlbumNumber { get; set; } = null;
|
||||||
public string StudentFirstName { get; set; } = "";
|
public string StudentFirstName { get; set; } = "";
|
||||||
public string StudentLastName { get; set; } = "";
|
public string StudentLastName { get; set; } = "";
|
||||||
@ -15,5 +16,7 @@ namespace InternshipSystem.Api.Queries.SearchQuery
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string OrderByField { get; set; } = "";
|
public string OrderByField { get; set; } = "";
|
||||||
public SortOrder SortOrder { get; set; } = SortOrder.None;
|
public SortOrder SortOrder { get; set; } = SortOrder.None;
|
||||||
|
|
||||||
|
public DocumentState? DocumentWithState { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user