Commit 26aef3ec authored by Fjen Undso's avatar Fjen Undso
Browse files

models/VoteStats: add currentusers type and cleanup

parent 6eb37cd1
......@@ -2,50 +2,26 @@ package models;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import play.data.format.Formats;
import play.data.validation.Constraints;
import play.db.ebean.Model;
import com.avaje.ebean.annotation.EnumValue;
@Entity
public class VoteStats extends Model {
private static final long serialVersionUID = 8660259739658830119L;
@Id
public Long id;
private static final long serialVersionUID = -4667216362514477494L;
@Formats.DateTime(pattern = "yyyy-MM-dd HH:mm:ss")
public Date date = new Date();
@Column(nullable = true)
public Integer value;
@Constraints.Required
public Type type;
public enum Type {
@EnumValue("A")
ALL,
@EnumValue("S")
SPEED,
@EnumValue("U")
UNDERSTANDABILITY,
@EnumValue("R")
REQUEST,
CURRENTUSERS,
}
public static Finder<Long, VoteStats> find = new Finder<Long, VoteStats>(Long.class,
VoteStats.class);
public VoteStats(Type type, Integer value) {
this.type = type;
this.value = value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment