From 9d50954cc4ac0c5eab027da7886b8790030aa9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Tue, 28 Oct 2025 00:09:06 +0300 Subject: [PATCH] =?UTF-8?q?SocialPost=20Entity=20d=C3=BCzenlemesi=20siline?= =?UTF-8?q?bilir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/Tenant/Hr/SocialPost.cs | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/SocialPost.cs diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/SocialPost.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/SocialPost.cs new file mode 100644 index 00000000..7427a1d7 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Hr/SocialPost.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class SocialLocation : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + public string Address { get; set; } + public double Lat { get; set; } + public double Lng { get; set; } + public string PlaceId { get; set; } +} + +public class SocialPost : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid AuthorId { get; set; } + public Employee Author { get; set; } + + public string Content { get; set; } + + public Guid? LocationId { get; set; } + public SocialLocation Location { get; set; } + + public Guid? MediaId { get; set; } + public SocialMedia Media { get; set; } + + public int LikesCount { get; set; } + public bool IsOwnPost { get; set; } + + public ICollection LikeUsers { get; set; } + public ICollection Comments { get; set; } +} + +public class SocialLikeUser : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid PostId { get; set; } + public SocialPost Post { get; set; } + + public Guid UserId { get; set; } + public Employee User { get; set; } +} + +public class SocialComment : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid PostId { get; set; } + public SocialPost Post { get; set; } + + public Guid AuthorId { get; set; } + public Employee Author { get; set; } + + public string Content { get; set; } +} + +public class SocialMedia : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Type { get; set; } // "image" | "video" | "poll" + public string Url { get; set; } + public string UrlsJson { get; set; } // Çoklu URL’ler JSON saklanabilir + public string FilePath { get; set; } + + public Guid? PollId { get; set; } + public SocialPoll Poll { get; set; } +} + +public class SocialPoll : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Question { get; set; } + public int TotalVotes { get; set; } + public DateTime EndsAt { get; set; } + public string UserVote { get; set; } + + public ICollection Options { get; set; } +} + +public class SocialPollOption : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid PollId { get; set; } + public SocialPoll Poll { get; set; } + + public string Text { get; set; } + public int Votes { get; set; } +} \ No newline at end of file