mirror of
https://github.com/sphildreth/roadie
synced 2024-11-26 06:00:23 +00:00
40 lines
No EOL
980 B
C#
40 lines
No EOL
980 B
C#
using Roadie.Library.Identity;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Roadie.Library.Data
|
|
{
|
|
[Table("userartist")]
|
|
public class UserArtist : EntityBase
|
|
{
|
|
[ForeignKey(nameof(ArtistId))]
|
|
[InverseProperty("UserArtists")]
|
|
public virtual Artist Artist { get; set; }
|
|
|
|
[Column("artistId")]
|
|
[Required]
|
|
public int ArtistId { get; set; }
|
|
|
|
[Column("isDisliked")]
|
|
public bool? IsDisliked { get; set; }
|
|
|
|
[Column("isFavorite")]
|
|
public bool? IsFavorite { get; set; }
|
|
|
|
[Column("rating")]
|
|
public short Rating { get; set; }
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
[InverseProperty("ArtistRatings")]
|
|
public virtual User User { get; set; }
|
|
|
|
[Column("userId")]
|
|
[Required]
|
|
public int UserId { get; set; }
|
|
|
|
public UserArtist()
|
|
{
|
|
Rating = 0;
|
|
}
|
|
}
|
|
} |