blob: 05c0b0374bda1fb67fc6ec88d98b09846d02e8f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#pragma warning disable CA2227
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Jellyfin.Data.Entities.Libraries
{
/// <summary>
/// An entity holding the metadata for a music album.
/// </summary>
public class MusicAlbumMetadata : ItemMetadata
{
/// <summary>
/// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.
/// </summary>
/// <param name="title">The title or name of the album.</param>
/// <param name="language">ISO-639-3 3-character language codes.</param>
/// <param name="album">The music album.</param>
public MusicAlbumMetadata(string title, string language, MusicAlbum album) : base(title, language)
{
Labels = new HashSet<Company>();
album.MusicAlbumMetadata.Add(this);
}
/// <summary>
/// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.
/// </summary>
/// <remarks>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </remarks>
protected MusicAlbumMetadata()
{
}
/// <summary>
/// Gets or sets the barcode.
/// </summary>
/// <remarks>
/// Max length = 255.
/// </remarks>
[MaxLength(255)]
[StringLength(255)]
public string Barcode { get; set; }
/// <summary>
/// Gets or sets the label number.
/// </summary>
/// <remarks>
/// Max length = 255.
/// </remarks>
[MaxLength(255)]
[StringLength(255)]
public string LabelNumber { get; set; }
/// <summary>
/// Gets or sets the country code.
/// </summary>
/// <remarks>
/// Max length = 2.
/// </remarks>
[MaxLength(2)]
[StringLength(2)]
public string Country { get; set; }
/// <summary>
/// Gets or sets a collection containing the labels.
/// </summary>
public virtual ICollection<Company> Labels { get; protected set; }
}
}
|