2011-02-16 02:48:11 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2011-02-16 10:11:55 +00:00
|
|
|
|
using VideoGameQuotes.Api;
|
2011-02-16 02:48:11 +00:00
|
|
|
|
|
|
|
|
|
namespace VideoGameQuotes.Web.Models {
|
|
|
|
|
public class BrowseModel {
|
|
|
|
|
public BrowseModel() {
|
|
|
|
|
GameIds = Enumerable.Empty<int>();
|
|
|
|
|
SystemIds = Enumerable.Empty<int>();
|
|
|
|
|
CategoryIds = Enumerable.Empty<int>();
|
|
|
|
|
PublisherIds = Enumerable.Empty<int>();
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-27 01:14:56 +00:00
|
|
|
|
public User CurrentUser { get; set; }
|
2011-02-16 10:11:55 +00:00
|
|
|
|
|
2011-02-16 02:48:11 +00:00
|
|
|
|
public IEnumerable<int> GameIds { get; set; }
|
|
|
|
|
public IEnumerable<int> SystemIds { get; set; }
|
|
|
|
|
public IEnumerable<int> CategoryIds { get; set; }
|
|
|
|
|
public IEnumerable<int> PublisherIds { get; set; }
|
|
|
|
|
public SortMethod SortMethod { get; set; }
|
|
|
|
|
public SortOrder SortOrder { get; set; }
|
2011-02-16 10:11:55 +00:00
|
|
|
|
|
|
|
|
|
public bool IsEmpty {
|
|
|
|
|
get { return !GameIds.Any() && !SystemIds.Any() && !CategoryIds.Any() && !PublisherIds.Any(); }
|
|
|
|
|
}
|
2011-02-16 02:48:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum SortMethod {
|
|
|
|
|
None,
|
|
|
|
|
Alphabetical,
|
|
|
|
|
Rating,
|
|
|
|
|
Date
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum SortOrder {
|
|
|
|
|
Ascending,
|
|
|
|
|
Descending
|
|
|
|
|
}
|
|
|
|
|
}
|