aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-12 19:57:54 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-12 19:57:54 -0400
commit31afb168f88493ffff7f7ec73695d8a9d1204d25 (patch)
treea8ab7f01663d3c0dcab49a5b977ec55b88876706 /MediaBrowser.Model
parent16593b3350f2fc17ae7d86aeec5ffcd8bc0e6d69 (diff)
Added BaseEntity so that Person, User, and other misc classes don't have to inherit from BaseItem
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Entities/BaseEntity.cs19
-rw-r--r--MediaBrowser.Model/Entities/BaseItem.cs6
-rw-r--r--MediaBrowser.Model/Entities/Genre.cs2
-rw-r--r--MediaBrowser.Model/Entities/Person.cs2
-rw-r--r--MediaBrowser.Model/Entities/Studio.cs2
-rw-r--r--MediaBrowser.Model/Entities/Year.cs2
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj1
-rw-r--r--MediaBrowser.Model/Users/User.cs2
8 files changed, 26 insertions, 10 deletions
diff --git a/MediaBrowser.Model/Entities/BaseEntity.cs b/MediaBrowser.Model/Entities/BaseEntity.cs
new file mode 100644
index 0000000000..3d1f6952b1
--- /dev/null
+++ b/MediaBrowser.Model/Entities/BaseEntity.cs
@@ -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; }
+ }
+}
diff --git a/MediaBrowser.Model/Entities/BaseItem.cs b/MediaBrowser.Model/Entities/BaseItem.cs
index ebcb16fd70..69dcec2a33 100644
--- a/MediaBrowser.Model/Entities/BaseItem.cs
+++ b/MediaBrowser.Model/Entities/BaseItem.cs
@@ -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; }
diff --git a/MediaBrowser.Model/Entities/Genre.cs b/MediaBrowser.Model/Entities/Genre.cs
index 79dea52be3..0ac6c9e38c 100644
--- a/MediaBrowser.Model/Entities/Genre.cs
+++ b/MediaBrowser.Model/Entities/Genre.cs
@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
- public class Genre : BaseItem
+ public class Genre : BaseEntity
{
}
}
diff --git a/MediaBrowser.Model/Entities/Person.cs b/MediaBrowser.Model/Entities/Person.cs
index 93f541a18e..831da4f658 100644
--- a/MediaBrowser.Model/Entities/Person.cs
+++ b/MediaBrowser.Model/Entities/Person.cs
@@ -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; }
}
diff --git a/MediaBrowser.Model/Entities/Studio.cs b/MediaBrowser.Model/Entities/Studio.cs
index da9582aeda..16b0bc5373 100644
--- a/MediaBrowser.Model/Entities/Studio.cs
+++ b/MediaBrowser.Model/Entities/Studio.cs
@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
- public class Studio : BaseItem
+ public class Studio : BaseEntity
{
}
}
diff --git a/MediaBrowser.Model/Entities/Year.cs b/MediaBrowser.Model/Entities/Year.cs
index 6c25f2ac5e..359bb6aaf8 100644
--- a/MediaBrowser.Model/Entities/Year.cs
+++ b/MediaBrowser.Model/Entities/Year.cs
@@ -1,7 +1,7 @@

namespace MediaBrowser.Model.Entities
{
- public class Year : BaseItem
+ public class Year : BaseEntity
{
}
}
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 9485692d4b..8574ccf9fd 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -35,6 +35,7 @@
<Compile Include="Configuration\UserConfiguration.cs" />
<Compile Include="Entities\ApiBaseItem.cs" />
<Compile Include="Entities\Audio.cs" />
+ <Compile Include="Entities\BaseEntity.cs" />
<Compile Include="Entities\BaseItem.cs" />
<Compile Include="Entities\CategoryInfo.cs" />
<Compile Include="Entities\Folder.cs" />
diff --git a/MediaBrowser.Model/Users/User.cs b/MediaBrowser.Model/Users/User.cs
index 3761d981d4..63698dc857 100644
--- a/MediaBrowser.Model/Users/User.cs
+++ b/MediaBrowser.Model/Users/User.cs
@@ -4,7 +4,7 @@ using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Users
{
- public class User : BaseItem
+ public class User : BaseEntity
{
public string MaxParentalRating { get; set; }