mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-18 04:54:15 -04:00
40 lines
1018 B
C#
40 lines
1018 B
C#
using System.Collections.Generic;
|
|
using Kyoo.Models.Attributes;
|
|
|
|
namespace Kyoo.Models
|
|
{
|
|
public class PeopleRole : IResource
|
|
{
|
|
[SerializeIgnore] public int ID { get; set; }
|
|
[SerializeIgnore] public string Slug => ForPeople ? Show.Slug : People.Slug;
|
|
[SerializeIgnore] public bool ForPeople;
|
|
[SerializeIgnore] public int PeopleID { get; set; }
|
|
[SerializeIgnore] public virtual People People { get; set; }
|
|
[SerializeIgnore] public int ShowID { get; set; }
|
|
[SerializeIgnore] public virtual Show Show { get; set; }
|
|
public string Role { get; set; }
|
|
public string Type { get; set; }
|
|
|
|
public PeopleRole() {}
|
|
|
|
public PeopleRole(People people, Show show, string role, string type)
|
|
{
|
|
People = people;
|
|
Show = show;
|
|
Role = role;
|
|
Type = type;
|
|
}
|
|
|
|
public PeopleRole(string slug,
|
|
string name,
|
|
string role,
|
|
string type,
|
|
string poster,
|
|
IEnumerable<MetadataID> externalIDs)
|
|
{
|
|
People = new People(slug, name, poster, externalIDs);
|
|
Role = role;
|
|
Type = type;
|
|
}
|
|
}
|
|
} |