add changes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace server.Models
|
||||
{
|
||||
public class Character
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("firstName")]
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
[BsonElement("lastName")]
|
||||
public string? LastName { get; set; }
|
||||
|
||||
[BsonElement("actorFirstName")]
|
||||
public string? ActorFirstName { get; set; }
|
||||
|
||||
[BsonElement("actorLastName")]
|
||||
public string? ActorLastName { get; set; }
|
||||
|
||||
[BsonElement("seasons")]
|
||||
public int[]? Seasons { get; set; }
|
||||
|
||||
[BsonElement("firstEpisode")]
|
||||
public string? FirstEpisode { get; set; }
|
||||
|
||||
[BsonElement("lastEpisode")]
|
||||
public string? LastEpisode { get; set; }
|
||||
|
||||
[BsonElement("image")]
|
||||
public string? Image { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace server.Models
|
||||
{
|
||||
public class Episode
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("season")]
|
||||
public int? Season { get; set; }
|
||||
|
||||
[BsonElement("numberInSeries")]
|
||||
public int? NumberInSeries { get; set; }
|
||||
|
||||
[BsonElement("numberInSeason")]
|
||||
public int? NumberInSeason { get; set; }
|
||||
|
||||
[BsonElement("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[BsonElement("summary")]
|
||||
public string? Summary { get; set; }
|
||||
|
||||
[BsonElement("directedBy")]
|
||||
public string? DirectedBy { get; set; }
|
||||
|
||||
[BsonElement("writtenBy")]
|
||||
public string[]? WrittenBy { get; set; }
|
||||
|
||||
[BsonElement("airDate")]
|
||||
public DateTime? AirDate { get; set; }
|
||||
|
||||
[BsonElement("usViewersInMillions")]
|
||||
public double? UsViewersInMillions { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace server.Models
|
||||
{
|
||||
public class ErrorResponse
|
||||
{
|
||||
public string Error { get; set; }
|
||||
|
||||
public ErrorResponse(string error)
|
||||
{
|
||||
Error = error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace server.Models
|
||||
{
|
||||
public class Quote
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("season")]
|
||||
public int? Season { get; set; }
|
||||
|
||||
[BsonElement("episode")]
|
||||
public int Episode { get; set; }
|
||||
|
||||
[BsonElement("text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
[BsonElement("source")]
|
||||
public string? Source { get; set; }
|
||||
|
||||
[BsonElement("narrator")]
|
||||
public string? Narrator { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace server.Models
|
||||
{
|
||||
public class Season
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("seasonNumber")]
|
||||
public int? SeasonNumber { get; set; }
|
||||
|
||||
[BsonElement("numberOfEpisodes")]
|
||||
public int? NumberOfEpisodes { get; set; }
|
||||
|
||||
[BsonElement("dateFirstAired")]
|
||||
public DateTime? DateFirstAired { get; set; }
|
||||
|
||||
[BsonElement("dateLastAired")]
|
||||
public DateTime? DateLastAired { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user