🏗️ structured files for testing
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
5cfc2653bb
commit
d4b53e9912
15 changed files with 4 additions and 5 deletions
16
backend/cinemateket/Models/Movie.cs
Normal file
16
backend/cinemateket/Models/Movie.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
#nullable disable
|
||||
|
||||
namespace backend;
|
||||
|
||||
public class Movie
|
||||
{
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Year { get; set; }
|
||||
|
||||
public string imdbID { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public string Poster { get; set; }
|
||||
}
|
19
backend/cinemateket/Models/MovieResponse.cs
Normal file
19
backend/cinemateket/Models/MovieResponse.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
#nullable disable
|
||||
|
||||
namespace backend;
|
||||
|
||||
public class MovieResponse
|
||||
{
|
||||
|
||||
public MovieResponse(string Response, int TotalResults, IEnumerable<MovieDB> Search) {
|
||||
this.Response = Response;
|
||||
this.TotalResults = TotalResults;
|
||||
this.Search = Search;
|
||||
}
|
||||
|
||||
public string Response { get; set; }
|
||||
|
||||
public int TotalResults { get; set; }
|
||||
|
||||
public IEnumerable<MovieDB> Search { get; set; }
|
||||
}
|
29
backend/cinemateket/Models/db/MovieDB.cs
Normal file
29
backend/cinemateket/Models/db/MovieDB.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
#nullable disable
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using CsvHelper.Configuration;
|
||||
using System.Globalization;
|
||||
|
||||
namespace backend;
|
||||
|
||||
[PrimaryKey(nameof(imdbID))]
|
||||
public class MovieDB
|
||||
{
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Year { get; set; }
|
||||
|
||||
public string imdbID { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public string Poster { get; set; }
|
||||
|
||||
public MovieDB(string Title, string Year, string imdbID, string Type, string Poster) {
|
||||
this.Title = Title;
|
||||
this.Year = Year;
|
||||
this.imdbID = imdbID;
|
||||
this.Type = Type;
|
||||
this.Poster = Poster;
|
||||
}
|
||||
}
|
Reference in a new issue