refactoring
This commit is contained in:
parent
30a8ac75ec
commit
8e658d2bb4
21 changed files with 135 additions and 29 deletions
60
Yavsc/Models/Workflow/BookQuery.cs
Normal file
60
Yavsc/Models/Workflow/BookQuery.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using YavscLib;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Relationship;
|
||||
/// <summary>
|
||||
/// Query, for a date, with a given perfomer, at this given place.
|
||||
/// </summary>
|
||||
|
||||
public class BookQuery : NominativeServiceCommand<RendezVous>, IBaseTrackedEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Display(Name = "Event date")]
|
||||
public DateTime EventDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Location Location
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public LocationType LocationType
|
||||
{
|
||||
set;
|
||||
get;
|
||||
}
|
||||
public string Reason { get; set; }
|
||||
|
||||
public BookQuery()
|
||||
{
|
||||
}
|
||||
|
||||
public BookQuery(string activityCode, Location eventLocation, DateTime eventDate)
|
||||
{
|
||||
Location = eventLocation;
|
||||
EventDate = eventDate;
|
||||
ActivityCode = activityCode;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string ActivityCode { get; set; }
|
||||
|
||||
[ForeignKey("ActivityCode"),JsonIgnore]
|
||||
public virtual Activity Context { get; set ; }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue