2019-11-28 11:38:26 -06:00
|
|
|
|
using System.Collections.Generic;
|
2018-11-02 16:04:49 -05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace Roadie.Library.Data
|
|
|
|
|
{
|
|
|
|
|
[Table("genre")]
|
|
|
|
|
public partial class Genre : EntityBase
|
|
|
|
|
{
|
2019-11-28 11:38:26 -06:00
|
|
|
|
[InverseProperty("Genre")]
|
|
|
|
|
public virtual ICollection<ArtistGenre> Artists { get; set; }
|
2018-12-23 15:36:38 -06:00
|
|
|
|
|
2019-11-28 11:38:26 -06:00
|
|
|
|
[InverseProperty("Genre")]
|
|
|
|
|
public virtual ICollection<Comment> Comments { get; set; }
|
2019-06-28 16:24:32 -05:00
|
|
|
|
|
2019-11-10 08:48:07 -06:00
|
|
|
|
[Column("name")]
|
2019-11-28 11:38:26 -06:00
|
|
|
|
[MaxLength(100)]
|
2019-11-10 08:48:07 -06:00
|
|
|
|
[Required]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("sortName")]
|
|
|
|
|
[MaxLength(100)]
|
|
|
|
|
public string SortName { get; set; }
|
|
|
|
|
|
|
|
|
|
public string SortNameValue => string.IsNullOrEmpty(SortName) ? Name : SortName;
|
2019-07-03 11:21:29 -05:00
|
|
|
|
|
2019-08-02 15:59:24 -05:00
|
|
|
|
[Column("description")]
|
|
|
|
|
[MaxLength(4000)]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("alternateNames", TypeName = "text")]
|
|
|
|
|
[MaxLength(65535)]
|
|
|
|
|
public string AlternateNames { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("tags", TypeName = "text")]
|
|
|
|
|
[MaxLength(65535)]
|
|
|
|
|
public string Tags { get; set; }
|
|
|
|
|
|
2019-11-28 11:38:26 -06:00
|
|
|
|
[Column("normalizedName")]
|
|
|
|
|
[MaxLength(100)]
|
|
|
|
|
public string NormalizedName { get; set; }
|
2019-07-04 10:50:31 -05:00
|
|
|
|
|
2019-11-28 11:38:26 -06:00
|
|
|
|
[InverseProperty("Genre")]
|
|
|
|
|
public virtual ICollection<ReleaseGenre> Releases { get; set; }
|
2019-07-03 11:21:29 -05:00
|
|
|
|
|
2018-12-23 15:36:38 -06:00
|
|
|
|
public Genre()
|
|
|
|
|
{
|
2019-07-03 11:21:29 -05:00
|
|
|
|
Releases = new HashSet<ReleaseGenre>();
|
|
|
|
|
Artists = new HashSet<ArtistGenre>();
|
|
|
|
|
Comments = new HashSet<Comment>();
|
2019-08-02 15:59:24 -05:00
|
|
|
|
Status = Enums.Statuses.Ok;
|
2018-12-23 15:36:38 -06:00
|
|
|
|
}
|
2018-11-02 16:04:49 -05:00
|
|
|
|
}
|
2018-11-02 16:11:11 -05:00
|
|
|
|
}
|