mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 06:44:12 +00:00
49 lines
No EOL
1.3 KiB
C#
49 lines
No EOL
1.3 KiB
C#
using Roadie.Library.Identity;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Roadie.Library.Data
|
|
{
|
|
[Table("playlist")]
|
|
public partial class Playlist : NamedEntityBase
|
|
{
|
|
[InverseProperty("Playlist")]
|
|
public virtual ICollection<Comment> Comments { get; set; }
|
|
|
|
[Column("Description")]
|
|
[MaxLength(1000)]
|
|
public string Description { get; set; }
|
|
|
|
[Column("duration")]
|
|
public int? Duration { get; set; }
|
|
|
|
[Column("isPublic")]
|
|
public bool IsPublic { get; set; }
|
|
|
|
[Column("releaseCount")]
|
|
public short ReleaseCount { get; set; }
|
|
|
|
[NotMapped]
|
|
public new string SortName { get; set; }
|
|
|
|
[Column("trackCount")]
|
|
public short TrackCount { get; set; }
|
|
|
|
[InverseProperty("Playlist")]
|
|
public virtual ICollection<PlaylistTrack> Tracks { get; set; }
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
[InverseProperty("Playlists")]
|
|
public virtual User User { get; set; }
|
|
|
|
[Column("userId")]
|
|
public int? UserId { get; set; }
|
|
|
|
public Playlist()
|
|
{
|
|
Comments = new HashSet<Comment>();
|
|
Tracks = new HashSet<PlaylistTrack>();
|
|
}
|
|
}
|
|
} |