Y2S1-Web_Apps_and_Services/ThAmCo.Venues/Data/Reservation.cs

28 lines
697 B
C#
Raw Normal View History

2020-06-07 21:36:12 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ThAmCo.Venues.Data
{
public class Reservation
{
[Key, MinLength(13), MaxLength(13)]
public string Reference { get; set; }
[DataType(DataType.Date)]
public DateTime EventDate { get; set; }
[Required]
public string VenueCode { get; set; }
[ForeignKey(nameof(EventDate) + ", " + nameof(VenueCode))]
public Availability Availability { get; set; }
public DateTime WhenMade { get; set; }
[Required]
public string StaffId { get; set; }
}
}