2020-08-22 21:29:54 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-06-01 20:40:01 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
2020-08-29 17:30:09 +00:00
|
|
|
namespace Jellyfin.Data.Entities.Libraries
|
2019-06-01 20:40:01 +00:00
|
|
|
{
|
2020-05-02 21:56:05 +00:00
|
|
|
public partial class MusicAlbumMetadata : Metadata
|
|
|
|
{
|
|
|
|
partial void Init();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
|
|
/// </summary>
|
2020-05-10 14:54:41 +00:00
|
|
|
protected MusicAlbumMetadata()
|
2020-05-02 21:56:05 +00:00
|
|
|
{
|
|
|
|
Labels = new HashSet<Company>();
|
|
|
|
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
|
|
|
/// </summary>
|
|
|
|
public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe()
|
|
|
|
{
|
|
|
|
return new MusicAlbumMetadata();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Public constructor with required data.
|
2020-05-02 21:56:05 +00:00
|
|
|
/// </summary>
|
2020-06-19 10:21:49 +00:00
|
|
|
/// <param name="title">The title or name of the object.</param>
|
|
|
|
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
2020-08-22 21:29:54 +00:00
|
|
|
/// <param name="dateadded">The date the object was added.</param>
|
|
|
|
/// <param name="datemodified">The date the object was last modified.</param>
|
2020-05-02 21:56:05 +00:00
|
|
|
/// <param name="_musicalbum0"></param>
|
|
|
|
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
|
|
|
|
{
|
2020-06-20 08:35:29 +00:00
|
|
|
if (string.IsNullOrEmpty(title))
|
|
|
|
{
|
|
|
|
throw new ArgumentNullException(nameof(title));
|
|
|
|
}
|
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
this.Title = title;
|
|
|
|
|
2020-06-20 08:35:29 +00:00
|
|
|
if (string.IsNullOrEmpty(language))
|
|
|
|
{
|
|
|
|
throw new ArgumentNullException(nameof(language));
|
|
|
|
}
|
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
this.Language = language;
|
|
|
|
|
2020-06-20 08:35:29 +00:00
|
|
|
if (_musicalbum0 == null)
|
|
|
|
{
|
|
|
|
throw new ArgumentNullException(nameof(_musicalbum0));
|
|
|
|
}
|
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
_musicalbum0.MusicAlbumMetadata.Add(this);
|
|
|
|
|
|
|
|
this.Labels = new HashSet<Company>();
|
|
|
|
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Static create function (for use in LINQ queries, etc.)
|
|
|
|
/// </summary>
|
2020-06-19 10:21:49 +00:00
|
|
|
/// <param name="title">The title or name of the object.</param>
|
|
|
|
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
2020-08-22 21:29:54 +00:00
|
|
|
/// <param name="dateadded">The date the object was added.</param>
|
|
|
|
/// <param name="datemodified">The date the object was last modified.</param>
|
2020-05-02 21:56:05 +00:00
|
|
|
/// <param name="_musicalbum0"></param>
|
|
|
|
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
|
|
|
|
{
|
|
|
|
return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* Properties
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Backing field for Barcode.
|
2020-05-02 21:56:05 +00:00
|
|
|
/// </summary>
|
|
|
|
protected string _Barcode;
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of Barcode to be changed before setting.
|
|
|
|
/// </summary>
|
|
|
|
partial void SetBarcode(string oldValue, ref string newValue);
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of Barcode to be changed before returning.
|
|
|
|
/// </summary>
|
|
|
|
partial void GetBarcode(ref string result);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Max length = 255
|
|
|
|
/// </summary>
|
|
|
|
[MaxLength(255)]
|
|
|
|
[StringLength(255)]
|
|
|
|
public string Barcode
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
string value = _Barcode;
|
|
|
|
GetBarcode(ref value);
|
2020-06-19 09:57:37 +00:00
|
|
|
return _Barcode = value;
|
2020-05-02 21:56:05 +00:00
|
|
|
}
|
2020-06-15 21:43:52 +00:00
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
set
|
|
|
|
{
|
|
|
|
string oldValue = _Barcode;
|
|
|
|
SetBarcode(oldValue, ref value);
|
|
|
|
if (oldValue != value)
|
|
|
|
{
|
|
|
|
_Barcode = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Backing field for LabelNumber.
|
2020-05-02 21:56:05 +00:00
|
|
|
/// </summary>
|
|
|
|
protected string _LabelNumber;
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of LabelNumber to be changed before setting.
|
|
|
|
/// </summary>
|
|
|
|
partial void SetLabelNumber(string oldValue, ref string newValue);
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of LabelNumber to be changed before returning.
|
|
|
|
/// </summary>
|
|
|
|
partial void GetLabelNumber(ref string result);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Max length = 255
|
|
|
|
/// </summary>
|
|
|
|
[MaxLength(255)]
|
|
|
|
[StringLength(255)]
|
|
|
|
public string LabelNumber
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
string value = _LabelNumber;
|
|
|
|
GetLabelNumber(ref value);
|
2020-06-19 09:57:37 +00:00
|
|
|
return _LabelNumber = value;
|
2020-05-02 21:56:05 +00:00
|
|
|
}
|
2020-06-15 21:43:52 +00:00
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
set
|
2019-06-01 20:40:01 +00:00
|
|
|
{
|
2020-05-02 21:56:05 +00:00
|
|
|
string oldValue = _LabelNumber;
|
|
|
|
SetLabelNumber(oldValue, ref value);
|
|
|
|
if (oldValue != value)
|
|
|
|
{
|
|
|
|
_LabelNumber = value;
|
|
|
|
}
|
2019-06-01 20:40:01 +00:00
|
|
|
}
|
2020-05-02 21:56:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Backing field for Country.
|
2020-05-02 21:56:05 +00:00
|
|
|
/// </summary>
|
|
|
|
protected string _Country;
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of Country to be changed before setting.
|
|
|
|
/// </summary>
|
|
|
|
partial void SetCountry(string oldValue, ref string newValue);
|
|
|
|
/// <summary>
|
|
|
|
/// When provided in a partial class, allows value of Country to be changed before returning.
|
|
|
|
/// </summary>
|
|
|
|
partial void GetCountry(ref string result);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Max length = 2
|
|
|
|
/// </summary>
|
|
|
|
[MaxLength(2)]
|
|
|
|
[StringLength(2)]
|
|
|
|
public string Country
|
|
|
|
{
|
|
|
|
get
|
2019-06-01 20:40:01 +00:00
|
|
|
{
|
2020-05-02 21:56:05 +00:00
|
|
|
string value = _Country;
|
|
|
|
GetCountry(ref value);
|
2020-06-19 09:57:37 +00:00
|
|
|
return _Country = value;
|
2019-06-01 20:40:01 +00:00
|
|
|
}
|
2020-06-15 21:43:52 +00:00
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
set
|
2019-06-01 20:40:01 +00:00
|
|
|
{
|
2020-05-02 21:56:05 +00:00
|
|
|
string oldValue = _Country;
|
|
|
|
SetCountry(oldValue, ref value);
|
|
|
|
if (oldValue != value)
|
|
|
|
{
|
|
|
|
_Country = value;
|
|
|
|
}
|
2019-06-01 20:40:01 +00:00
|
|
|
}
|
2020-05-02 21:56:05 +00:00
|
|
|
}
|
2019-06-01 20:40:01 +00:00
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* Navigation properties
|
|
|
|
*************************************************************************/
|
2019-06-01 20:40:01 +00:00
|
|
|
|
2020-05-02 21:56:05 +00:00
|
|
|
[ForeignKey("Company_Labels_Id")]
|
|
|
|
public virtual ICollection<Company> Labels { get; protected set; }
|
|
|
|
}
|
2019-06-01 20:40:01 +00:00
|
|
|
}
|
|
|
|
|