Update API
This commit is contained in:
@@ -19,6 +19,11 @@ namespace Church.Net.Entity
|
||||
public string Address { get; set; }
|
||||
public virtual ICollection<CellGroupRoutineEventAttendee> Attendees { get; set; }
|
||||
public virtual ICollection<CellGroupRoutineEventPrayer> Prayers { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("CellGroupInfo")]
|
||||
public string PastoralDomainId { get; set; }
|
||||
public PastoralDomain CellGroupInfo { get; set; }
|
||||
}
|
||||
public class CellGroupRoutineEventAttendee : ICombinedKeyEntity
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Church.Net.Entity
|
||||
{
|
||||
public class HappinessGroup : IEntity
|
||||
public class HappinessGroup : IEntity, IMessengerClient
|
||||
{
|
||||
[Required, Key]
|
||||
public string Id { get; set; }
|
||||
@@ -25,5 +25,11 @@ namespace Church.Net.Entity
|
||||
|
||||
public virtual ICollection<HappinessBEST> BestList { get; set; }
|
||||
public virtual ICollection<HappinessWeek> Weeks { get; set; }
|
||||
public string CommunityAppId { get; set; }
|
||||
|
||||
[ForeignKey("LineMessagingAccount")]
|
||||
public string LineAccountId { get; set; }
|
||||
public virtual LineMessagingAccount LineMessagingAccount { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,5 +25,28 @@ namespace Church.Net.Entity
|
||||
public int SEQ { get; set; }
|
||||
[NotMapped]
|
||||
public bool UpdateRestWeekDate { get; set; }
|
||||
public virtual ICollection<HappinessTask> Tasks { get; set; }
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
|
||||
public enum HappinessTaskType
|
||||
{
|
||||
IceBreak,
|
||||
Worship,
|
||||
Testimony,
|
||||
Message,
|
||||
Gift,
|
||||
Dessert
|
||||
}
|
||||
public class HappinessTask : IEntity
|
||||
{
|
||||
[ForeignKey("HappinessWeek")]
|
||||
public string WeekId { get; set; }
|
||||
public HappinessWeek HappinessWeek { get; set; }
|
||||
[Required, Key]
|
||||
public string Id { get; set; }
|
||||
public HappinessTaskType Type { get; set; }
|
||||
public string Tasker { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Church.Net.Entity.Interface
|
||||
{
|
||||
public enum MessengerType
|
||||
{
|
||||
Email,
|
||||
Line,
|
||||
Wechat,
|
||||
SMS
|
||||
}
|
||||
public interface IMessenger
|
||||
{
|
||||
MessengerType Type { get; }
|
||||
Task<bool> SendMessage(IMessengerClient target, string message);
|
||||
Task<bool> SendMessage(IMessengerClient target, object message);
|
||||
}
|
||||
|
||||
public interface IMessengerClient
|
||||
{
|
||||
string Id { get; }
|
||||
|
||||
string LineAccountId { get; set; }
|
||||
|
||||
LineMessagingAccount LineMessagingAccount { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public interface IMessageClient: IEntity
|
||||
{
|
||||
MessengerType Type { get; }
|
||||
string ClientId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace Church.Net.Entity
|
||||
{
|
||||
public class LineBotInfo
|
||||
{
|
||||
|
||||
public string Id { get; set; }
|
||||
public string GroupId { get; set; }
|
||||
}
|
||||
|
||||
public class LineClient
|
||||
{
|
||||
[Required, Key]
|
||||
public string Id { get; set; }
|
||||
public string LineId { get; set; }
|
||||
public bool IsGroup { get; set; }
|
||||
public bool IsManager { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Church.Net.Entity.Interface;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Church.Net.Entity
|
||||
{
|
||||
public class LineMessagingAccount : IEntity
|
||||
{
|
||||
[Required, Key]
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ChatToken { get; set; }
|
||||
public int TotalUsage { get; set; }
|
||||
public int Seq { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Church.Net.Entity.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace Church.Net.Entity.Messenger
|
||||
{
|
||||
public class LineMessageClient : IMessageClient
|
||||
{
|
||||
public MessengerType Type => MessengerType.Line;
|
||||
[Required, Key]
|
||||
public string Id { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public bool IsGroup { get; set; }
|
||||
public bool IsManager { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Church.Net.Entity
|
||||
{
|
||||
public class PastoralDomain : IEntity
|
||||
public class PastoralDomain : IEntity, IMessengerClient
|
||||
{
|
||||
public PastoralDomain()
|
||||
{
|
||||
@@ -31,8 +31,12 @@ namespace Church.Net.Entity
|
||||
public string Image4 { get; set; }
|
||||
|
||||
public string Image5 { get; set; }
|
||||
|
||||
public string CommunityAppId { get; set; }
|
||||
|
||||
[ForeignKey("LineMessagingAccount")]
|
||||
public string LineAccountId { get; set; }
|
||||
public virtual LineMessagingAccount LineMessagingAccount { get; set; }
|
||||
|
||||
[ForeignKey("Leader")]
|
||||
public string LeaderMemberId { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user