Church.Net.API/Church.Net.Entity2/CellGroupRoutineEvent.cs
2022-09-08 08:04:32 -07:00

64 lines
2.0 KiB
C#

using Church.Net.Entity.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Church.Net.Entity
{
public class CellGroupRoutineEvent : IEntity
{
[Required, Key]
public string Id { get; set; }
[Required]
public DateTime Time { get; set; }
public string Address { get; set; }
public virtual ICollection<CellGroupRoutineEventAttendee> Attendees { get; set; }
public virtual ICollection<CellGroupRoutineEventPrayer> Prayers { get; set; }
}
public class CellGroupRoutineEventAttendee : ICombinedKeyEntity
{
[ForeignKey("CellGroupRoutineEvent")]
[Key, Column(Order = 0)]
public string EventId { get; set; }
public CellGroupRoutineEvent CellGroupRoutineEvent { get; set; }
[Required, Key, Column(Order = 1)]
public string Id { get; set; }
public string Name { get; set; }
public bool JoinPotluck { get; set; }
public string PotluckItem { get; set; }
public string Comment { get; set; }
}
public class CellGroupRoutineEventWorship : ICombinedKeyEntity
{
[ForeignKey("CellGroupRoutineEvent")]
[Key, Column(Order = 0)]
public string EventId { get; set; }
[Required, Key, Column(Order = 1)]
public string WorshipVideoId { get; set; }
public string Comment { get; set; }
}
public class CellGroupRoutineEventPrayer : ICombinedKeyEntity
{
[ForeignKey("CellGroupRoutineEvent")]
[Key, Column(Order = 0)]
public string EventId { get; set; }
public CellGroupRoutineEvent CellGroupRoutineEvent { get; set; }
[Required, Key, Column(Order = 1)]
public string MemberId { get; set; }
public string Prayer { get; set; }
public string Comment { get; set; }
}
}