SocialPost Entity düzenlemesi silinebilir

This commit is contained in:
Sedat Öztürk 2025-10-28 00:09:06 +03:00
parent 0203ffb8b3
commit 9d50954cc4

View file

@ -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<Guid>, 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<Guid>, 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<SocialLikeUser> LikeUsers { get; set; }
public ICollection<SocialComment> Comments { get; set; }
}
public class SocialLikeUser : FullAuditedEntity<Guid>, 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<Guid>, 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<Guid>, 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 URLler JSON saklanabilir
public string FilePath { get; set; }
public Guid? PollId { get; set; }
public SocialPoll Poll { get; set; }
}
public class SocialPoll : FullAuditedEntity<Guid>, 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<SocialPollOption> Options { get; set; }
}
public class SocialPollOption : FullAuditedEntity<Guid>, 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; }
}