Added BaseEntity so that Person, User, and other misc classes don't have to inherit from BaseItem

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-12 19:57:54 -04:00
parent 16593b3350
commit 31afb168f8
10 changed files with 32 additions and 21 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MediaBrowser.Model.Entities
{
/// <summary>
/// Provides a base entity for all of our types
/// </summary>
public abstract class BaseEntity
{
public string Name { get; set; }
public Guid Id { get; set; }
public string PrimaryImagePath { get; set; }
}
}

View File

@@ -4,13 +4,10 @@ using System.Runtime.Serialization;
namespace MediaBrowser.Model.Entities
{
public abstract class BaseItem
public abstract class BaseItem : BaseEntity
{
public string Name { get; set; }
public string SortName { get; set; }
public Guid Id { get; set; }
public DateTime DateCreated { get; set; }
public DateTime DateModified { get; set; }
@@ -25,7 +22,6 @@ namespace MediaBrowser.Model.Entities
[IgnoreDataMember]
public Folder Parent { get; set; }
public string PrimaryImagePath { get; set; }
public string LogoImagePath { get; set; }
public string ArtImagePath { get; set; }
public string ThumbnailImagePath { get; set; }

View File

@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Genre : BaseItem
public class Genre : BaseEntity
{
}
}

View File

@@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// This is the full Person object that can be retrieved with all of it's data.
/// </summary>
public class Person : BaseItem
public class Person : BaseEntity
{
public PersonType PersonType { get; set; }
}

View File

@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Studio : BaseItem
public class Studio : BaseEntity
{
}
}

View File

@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Year : BaseItem
public class Year : BaseEntity
{
}
}