vgquotes/Src/VideoGameQuotes.Api/Game.cs

30 lines
877 B
C#

using System;
using System.Collections.Generic;
using Iesi.Collections.Generic;
using Portoa.Persistence;
namespace VideoGameQuotes.Api {
public class Game : Entity<Game, int> {
private readonly Iesi.Collections.Generic.ISet<System> systems = new HashedSet<System>();
public Game() {
Created = DateTime.UtcNow;
}
public virtual User Creator { get; set; }
public virtual DateTime Created { get; set; }
public virtual IEnumerable<System> Systems { get { return systems; } }
public virtual string Name { get; set; }
public virtual Publisher Publisher { get; set; }
public virtual byte[] Screenshot { get; set; }
public virtual Region Region { get; set; }
public virtual void AddSystem(System system) {
systems.Add(system);
}
public virtual void RemoveSystem(System system) {
systems.Remove(system);
}
}
}