37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
using Props.Models.Search;
|
||
|
using Props.Models.User;
|
||
|
|
||
|
namespace Props.Models.User
|
||
|
{
|
||
|
public class SearchOutlinePreferences
|
||
|
{
|
||
|
public int Id { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public string ApplicationUserId { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public virtual ApplicationUser ApplicationUser { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public virtual ISet<SearchOutline> SearchOutlines { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public virtual SearchOutline ActiveSearchOutline { get; set; }
|
||
|
|
||
|
public SearchOutlinePreferences()
|
||
|
{
|
||
|
SearchOutlines = new HashSet<SearchOutline>();
|
||
|
ActiveSearchOutline = new SearchOutline();
|
||
|
SearchOutlines.Add(ActiveSearchOutline);
|
||
|
}
|
||
|
|
||
|
public SearchOutlinePreferences(ISet<SearchOutline> searchOutlines, SearchOutline activeSearchOutline)
|
||
|
{
|
||
|
this.SearchOutlines = searchOutlines;
|
||
|
this.ActiveSearchOutline = activeSearchOutline;
|
||
|
}
|
||
|
}
|
||
|
}
|