2011-02-09 00:05:32 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Portoa.Persistence;
|
|
|
|
|
|
|
|
|
|
namespace VideoGameQuotes.Api {
|
|
|
|
|
public class Vote : Entity<Vote, int> {
|
2011-02-09 19:28:33 +00:00
|
|
|
|
public Vote() {
|
|
|
|
|
Created = DateTime.UtcNow;
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-09 00:05:32 +00:00
|
|
|
|
public virtual User Voter { get; set; }
|
|
|
|
|
public virtual Quote Quote { get; set; }
|
|
|
|
|
public virtual DateTime Created { get; set; }
|
2011-02-09 19:28:33 +00:00
|
|
|
|
public virtual DateTime? Modified { get; set; }
|
|
|
|
|
public virtual int Value { get; set; }
|
2011-02-09 00:05:32 +00:00
|
|
|
|
|
|
|
|
|
public static explicit operator int(Vote vote) {
|
2011-02-09 19:28:33 +00:00
|
|
|
|
return vote.Value;
|
2011-02-09 00:05:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|