Dapper, FluentMigrator, FluentValidator, ASP.NET DI, Postgresql, Npgsql
NET 6.0 SDK or later
PostgreSQL server
- Docker compose up
- Connect and configure DB
- Set PostgresConnectionString in appsetings.json
- Run project and check for migrations
- POST /Applications
{
"author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"activity": "report",
"name": "C# Basics",
"description": "",
"outline": "very interesting"
}
Response ==> 201 OK
{
"id": "f1303566-6c19-439f-8063-d302750c7930",
"author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"activity": "report",
"name": "C# Basics",
"description": "",
"outline": "very interesting"
}
- POST /Applications/{applicationId}/Submit
Response ==> 200 OK
- GET /Applications/{applicationId}
Response ==> 200 OK
{
"id": "f1303566-6c19-439f-8063-d302750c7930",
"author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"activity": "report",
"name": "C# Basics",
"description": "",
"outline": "very interesting"
}
- GET /Applications/submittedAfter={timeString}
Response ==> 200 OK
[
...
{
"id": "f1303566-6c19-439f-8063-d302750c7930",
"author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"activity": "report",
"name": "C# Basics",
"description": "",
"outline": "very interesting"
}
...
]
- GET /Applications/unsubmittedOlder={timeString}
Response ==> 200 OK
[
...
{
"id": "f1303566-6c19-439f-8063-d302750c7930",
"author": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"activity": "report",
"name": "C# Basics",
"description": "",
"outline": "very interesting"
}
...
]
- DELETE /Applications/{applicationId}
Response ==> 200 OK
- PUT /Applications/{applicationId}
{
"activity": "report",
"name": "report",
"description": "string",
"outline": "string"
}
Response ==> 201 OK
{
"id": "863f91a5-95c7-4995-a661-8375018c4642",
"author": "3fa85f64-5717-4562-b3fc-2c963f66a666",
"activity": "report",
"name": "report",
"description": "string",
"outline": "string"
}
- GET /Activities
Response ==> 200 OK
[
{
"name": "report",
"description": "Доклад, 35-45 минут"
},
{
"name": "masterclass",
"description": "Мастеркласс, 1-2 часа"
},
{
"name": "discussion",
"description": "Дискуссия / круглый стол, 40-50 минут"
}
]
- GET /Users/{userId}/currentapplication
Response ==> 200 OK
{
"id": "863f91a5-95c7-4995-a661-8375018c4642",
"author": "3fa85f64-5717-4562-b3fc-2c963f66a666",
"activity": "report",
"name": "report",
"description": "string",
"outline": "string"
}