Update Happiness Task

This commit is contained in:
Chris Chen
2022-10-02 09:50:42 -07:00
parent b33c0d8286
commit f9a5dc5e34
43 changed files with 4904 additions and 623 deletions
+16 -2
View File
@@ -1,17 +1,31 @@
using System;
using Church.Net.Entity.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Church.Net.Entity
{
public class AddressInfo
public class AddressInfo : IEntity
{
public AddressInfo()
{
Id = "new";
}
[Key]
public string Id { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
public string GetCSZ()
{
string result = City;
string sz = $"{State} {Zip}".Trim();
return result + (string.IsNullOrWhiteSpace(sz) ? "" : $", {sz}");
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace Church.Net.Entity
[ForeignKey("HappinessGroup")]
public string GroupId { get; set; }
public HappinessGroup HappinessGroup { get; set; }
public PastoralDomain HappinessGroup { get; set; }
[Key]
public string Id { get; set; }
-35
View File
@@ -1,35 +0,0 @@
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 HappinessGroup : IEntity, IMessengerClient
{
[Required, Key]
public string Id { get; set; }
public string Name { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy/MM/dd HH:mm}")]
public DateTime BeginTime { get; set; }
public string Address { get; set; }
public string CityAndZipCode { get; set; }
public string InvitationText { get; set; }
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; }
}
}
+10 -1
View File
@@ -1,6 +1,7 @@
using Church.Net.Entity.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
@@ -14,7 +15,7 @@ namespace Church.Net.Entity
[ForeignKey("HappinessGroup")]
public string GroupId { get; set; }
public HappinessGroup HappinessGroup { get; set; }
public PastoralDomain HappinessGroup { get; set; }
[Required, Key]
public string Id { get; set; }
@@ -25,17 +26,25 @@ namespace Church.Net.Entity
public int SEQ { get; set; }
[NotMapped]
public bool UpdateRestWeekDate { get; set; }
[NotMapped]
public string Topic { get; set; }
public virtual ICollection<HappinessTask> Tasks { get; set; }
public string Comment { get; set; }
}
public enum HappinessTaskType
{
[Description("帶遊戲")]
IceBreak,
[Description("唱歌")]
Worship,
[Description("見證")]
Testimony,
[Description("信息")]
Message,
[Description("準備禮物")]
Gift,
[Description("準備點心")]
Dessert
}
public class HappinessTask : IEntity
-24
View File
@@ -1,24 +0,0 @@
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; }
}
}
+15 -3
View File
@@ -10,6 +10,14 @@ using System.Threading.Tasks;
namespace Church.Net.Entity
{
public enum DomainType
{
CellGroup,
HappinessGroup,
CellGroupCoworker,
ChurchCoworker,
Person = 99
}
public class PastoralDomain : IEntity, IMessengerClient
{
public PastoralDomain()
@@ -31,7 +39,8 @@ namespace Church.Net.Entity
public string Image4 { get; set; }
public string Image5 { get; set; }
public string CommunityAppId { get; set; }
public string LineGroupId { get; set; }
[ForeignKey("LineMessagingAccount")]
public string LineAccountId { get; set; }
@@ -46,7 +55,10 @@ namespace Church.Net.Entity
public string ServiceAddressId { get; set; }
public AddressInfo ServiceAddress { get; set; }
public DomainType Type { get; set; }
public DateTime? ServiceTime { get; set; }
public virtual ICollection<HappinessBEST> Bests { get; set; }
public virtual ICollection<HappinessWeek> HappinessWeeks { get; set; }
[JsonIgnore]
public virtual ICollection<PastoralDomainMembers> Members { get; set; }
@@ -54,6 +66,6 @@ namespace Church.Net.Entity
public virtual IList<PastoralDomainAutoReplys> AutoReplyItemRelations { get; set; }
[NotMapped]
public virtual ICollection<FamilyMember> FamilyMembers { get; set; }
}
}