Добавил ImageUrl
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 19s
Create and publish a Docker image / Deploy image (push) Successful in 3s

This commit is contained in:
Sergey Karmanov 2023-08-25 02:06:59 +03:00
parent b07e41e9a6
commit b53f1d6986
Signed by: serega404
GPG Key ID: B6AD49C8C835460C
4 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@ public class Film
public City City { get; set; }
public string Cinema { get; set; }
public string FilmName { get; set; }
public string ImageURL { get; set; }
public string? Genre { get; set; }
public string? Time { get; set; }
public float Price { get; set; } = 0;

View File

@ -5,6 +5,7 @@ public class FilmDto
public string City { get; set; }
public string Cinema { get; set; }
public string FilmName { get; set; }
public string ImageURL { get; set; }
public string? Genre { get; set; }
public string? Time { get; set; }
public float? Price { get; set; }

View File

@ -41,6 +41,7 @@ public class PublicDataService : IPublicDataService
film.Price = filmDto.Price ?? 0;
film.Genre = filmDto.Genre;
film.Time = filmDto.Time;
film.ImageURL = filmDto.ImageURL;
film.City = await _databaseContext.Cities.FirstOrDefaultAsync(x => x.Name == filmDto.City);
await _databaseContext.Films.AddAsync(film);
}

View File

@ -1,4 +1,7 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=192.168.0.46;Port=5432;Database=backend;Username=prod;Password=q8ne6LHAobv5EX"
},
"Logging": {
"LogLevel": {
"Default": "Information",