roadie/Roadie.Api.Library/Data/UserTrack.cs

50 lines
1.2 KiB
C#
Raw Normal View History

2018-11-02 22:20:36 +00:00
using Roadie.Library.Identity;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Roadie.Library.Data
{
[Table("usertrack")]
public partial class UserTrack : EntityBase
{
[Column("isDisliked")]
public bool? IsDisliked { get; set; }
[Column("isFavorite")]
public bool? IsFavorite { get; set; }
[Column("lastPlayed")]
public DateTime? LastPlayed { get; set; }
[Column("playedCount")]
public int? PlayedCount { get; set; }
[Column("rating")]
public short Rating { get; set; }
public Track Track { get; set; }
[Column("trackId")]
[Required]
public int TrackId { get; set; }
public ApplicationUser User { get; set; }
[Column("userId")]
[Required]
public int UserId { get; set; }
2018-11-17 02:14:32 +00:00
public UserTrack()
{ }
public UserTrack(DateTime? now = null)
{
PlayedCount = 0;
Rating = 0;
IsDisliked = false;
IsFavorite = false;
LastPlayed = now ?? DateTime.UtcNow;
}
2018-11-02 22:20:36 +00:00
}
}