2025-11-02 17:05:06 -08:00

77 lines
2.2 KiB
C#

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;
using System.Text;
using System.Threading.Tasks;
namespace Church.Net.Entity
{
public class HappinessWeek : IEntity
{
[ForeignKey("HappinessGroup")]
public string GroupId { get; set; }
public PastoralDomain HappinessGroup { get; set; }
[Required, Key]
public string Id { get; set; }
public DateTime Date { get; set;}
public string InvitationText { get; set; }
public string Address { get; set; }
public string CityAndZipCode { get; set; }
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 virtual ICollection<HappinessCost> Costs { 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
{
[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; }
}
public class HappinessCost : IEntity
{
[ForeignKey("HappinessWeek")]
public string WeekId { get; set; }
public HappinessWeek HappinessWeek { get; set; }
[Key]
public string Id { get; set; }
public string Tasker { get; set; }
public string Content { get; set; }
public decimal Amount { get; set; }
}
}