20 lines
495 B
C#
20 lines
495 B
C#
using System;
|
|
using Portoa.Persistence;
|
|
|
|
namespace VideoGameQuotes.Api {
|
|
public class Vote : Entity<Vote, int> {
|
|
public Vote() {
|
|
Created = DateTime.UtcNow;
|
|
}
|
|
|
|
public virtual User Voter { get; set; }
|
|
public virtual Quote Quote { get; set; }
|
|
public virtual DateTime Created { get; set; }
|
|
public virtual DateTime? Modified { get; set; }
|
|
public virtual int Value { get; set; }
|
|
|
|
public static explicit operator int(Vote vote) {
|
|
return vote.Value;
|
|
}
|
|
}
|
|
} |