sozsoft-platform/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SocialPostDto.cs

70 lines
2.1 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using Sozsoft.Platform.Identity.Dto;
using Volo.Abp.Application.Dtos;
namespace Sozsoft.Platform.Intranet;
public class SocialPostDto : FullAuditedEntityDto<Guid>
{
public Guid? UserId { get; set; }
public UserInfoViewModel? User { get; set; }
public string Content { get; set; } = string.Empty;
public int LikeCount { get; set; }
public bool IsLiked { get; set; }
public bool IsOwnPost { get; set; }
public SocialLocationDto? Location { get; set; }
public SocialMediaDto? Media { get; set; }
public List<SocialCommentDto> Comments { get; set; } = [];
public List<SocialLikeDto> Likes { get; set; } = [];
}
public class SocialLocationDto : FullAuditedEntityDto<Guid>
{
public Guid SocialPostId { get; set; }
public string Name { get; set; } = string.Empty;
public string? Address { get; set; }
public double? Lat { get; set; }
public double? Lng { get; set; }
public string? PlaceId { get; set; }
}
public class SocialMediaDto : FullAuditedEntityDto<Guid>
{
public Guid SocialPostId { get; set; }
public string Type { get; set; } = string.Empty; // image | video | poll
public string[] Urls { get; set; } = [];
// Poll Fields
public string? PollQuestion { get; set; }
public int? PollTotalVotes { get; set; }
public DateTime? PollEndsAt { get; set; }
public string? PollUserVoteId { get; set; }
public List<SocialPollOptionDto> PollOptions { get; set; } = [];
}
public class SocialPollOptionDto : FullAuditedEntityDto<Guid>
{
public Guid SocialMediaId { get; set; }
public string Text { get; set; } = string.Empty;
public int Votes { get; set; }
}
public class SocialCommentDto : FullAuditedEntityDto<Guid>
{
public Guid SocialPostId { get; set; }
public Guid? UserId { get; set; }
public UserInfoViewModel? User { get; set; }
public string Content { get; set; } = string.Empty;
}
public class SocialLikeDto : FullAuditedEntityDto<Guid>
{
public Guid SocialPostId { get; set; }
public Guid? UserId { get; set; }
public UserInfoViewModel? User { get; set; }
}