yavsc/Yavsc/Models/Workflow/BookQuery.cs

59 lines
1.4 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2017-01-16 01:20:39 +01:00
using Newtonsoft.Json;
2016-05-17 18:22:18 +02:00
2017-02-11 15:46:26 +01:00
namespace Yavsc.Models.Workflow
2016-05-17 18:22:18 +02:00
{
2017-02-07 15:04:58 +01:00
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
2016-05-17 18:22:18 +02:00
/// <summary>
/// Query, for a date, with a given perfomer, at this given place.
/// </summary>
2017-02-13 01:32:03 +01:00
public class BookQuery : NominativeServiceCommand
2017-01-16 01:20:39 +01:00
{
/// <summary>
/// The command identifier
/// </summary>
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
2016-07-27 13:06:00 +02:00
2017-01-16 01:20:39 +01:00
[Display(Name = "Event date")]
public DateTime EventDate
{
2016-09-17 03:36:34 +02:00
get;
set;
2017-01-16 01:20:39 +01:00
}
public Location Location
{
2016-09-17 03:36:34 +02:00
get;
set;
2017-01-16 01:20:39 +01:00
}
public LocationType LocationType
{
set;
get;
}
2017-01-16 01:20:39 +01:00
public string Reason { get; set; }
2016-06-14 03:37:57 +02:00
public BookQuery()
{
}
2017-01-16 01:20:39 +01:00
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 ; }
2016-05-17 18:22:18 +02:00
}
2017-02-07 15:04:58 +01:00
}