using Church.Net.Entity.Interface; using Newtonsoft.Json; 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 enum DomainType { CellGroup, HappinessGroup, CellGroupCoworker, ChurchCoworker, Administrator = 99 } public class PastoralDomain : IEntity, IMessengerClient { public PastoralDomain() { } [Key] public string Id { get; set; } public string Name { get; set; } public string LogoImage { get; set; } public string Description { get; set; } public string Image1 { get; set; } public string Image2 { get; set; } public string Image3 { get; set; } public string Image4 { get; set; } public string Image5 { get; set; } public string LineGroupId { get; set; } [ForeignKey("LineMessagingAccount")] public string LineAccountId { get; set; } public virtual LineMessagingAccount LineMessagingAccount { get; set; } [ForeignKey("Leader")] public string LeaderMemberId { get; set; } public FamilyMember Leader { get; set; } [ForeignKey("ServiceAddress")] public string ServiceAddressId { get; set; } public AddressInfo ServiceAddress { get; set; } public DomainType Type { get; set; } public DateTime? ServiceTime { get; set; } public string TimeZone { get; set; } public virtual ICollection Bests { get; set; } public virtual ICollection HappinessWeeks { get; set; } public virtual ICollection Contributions { get; set; } [JsonIgnore] public virtual ICollection Members { get; set; } [JsonIgnore] public virtual IList AutoReplyItemRelations { get; set; } [NotMapped] public virtual ICollection FamilyMembers { get; set; } } }