using Hotline.Share.Dtos.Users;
using Hotline.Share.Enums.Article;
using Hotline.Share.Enums.Snapshot;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Utility.EnumExtensions;
namespace Hotline.Share.Dtos.Snapshot;
class SnapshotBulletinDto
{
}
///
/// 入参
///
/// 类别名称
/// 标题
/// 文档编号
/// 部门
/// 发布人
/// 发布开始时间
/// 发布结束时间
/// 状态
public record SnapshotBulletinItemsInDto(string? SnapshotBulletinTypeName, string? Title,
string? No,
string? DepartmentName,
string? CreatorName,
DateTime? BeginCreationTime,
DateTime? EndCreationTime,
EBulletinState? State
) : PagedRequest;
public class SnapshotBulletinItemsOutDto
{
public string Id { get; set; }
///
/// 标题
///
public string Title { get; set; }
///
/// No
///
public string? No { get; set; }
///
/// 字典中添加类型Id
///
public string SnapshotBulletinTypeId { get; set; }
///
/// 系统字典中添加类型名称
///
public string SnapshotBulletinTypeName { get; set; }
///
/// 阅读量
///
public int ReadedNum { get; set; }
///
/// 发布时间
///
public DateTime? BulletinTime { get; set; }
///
/// 公告状态
///
public EBulletinState BulletinState { get; set; }
public string BulletinStateText => BulletinState.GetDescription();
///
/// 所属部门ID
///
public string SourceOrgId { get; set; }
///
/// 所属部门
///
public string SourceOrgName { get; set; }
///
/// 发布人
///
public string? CreatorId { get; set; }
///
/// 发布人名
///
public string? CreatorName { get; set; }
///
/// 部门名称
///
public string? DepartmentName { get; set; }
///
/// 是否公开
///
public bool? IsOpen { get; set; }
///
/// 是否加粗
///
public bool? IsBold { get; set; }
///
/// 网站公开
///
public bool? IsOpenWebsite { get; set; }
///
/// 微博公开
///
public bool? IsWeibo { get; set; }
///
/// 微信公开
///
public bool? IsWeChat { get; set; }
///
/// 上下架
///
public bool IsArrive { get; set; }
}
public class SnapshotBulletinDetailOutDto : UpdateSnapshotBulletinInDto
{
///
/// 创建时间
///
public DateTime CreationTime { get; set; }
///
/// 创建人
///
public string CreatorName { get; set; }
///
/// 阅读次数
///
public int ReadedNum { get; set; }
///
/// 审核状态
///
public string BulletinStateTxt => BulletinState.GetDescription();
///
/// 审核状态
///
public EBulletinState BulletinState { get; set; }
///
/// 上下架
///
public bool IsArrive { get; set; }
///
/// 类型
///
public IList SafetyTypeNames { get; set; }
}
public class UpdateSnapshotBulletinInDto : AddSnapshotBulletinInDto
{
///
/// Id
///
[Required]
public string Id { get; set; }
}
public class AddSnapshotBulletinInDto
{
///
/// 标题
///
[Required]
public string Title { get; set; }
///
/// 内容
///
[Required]
public string Content { get; set; }
///
/// 公告类型
///
[Required]
public string BulletinTypeId { get; set; }
///
/// 公告类型名称
///
[Required]
public string BulletinTypeName { get; set; }
///
/// 文档编号
///
public string? No { get; set; }
///
/// 所属部门
///
public string? DepartmentName { get; set; }
///
/// 所属部门Id
///
public string? DepartmentId { get; set; }
///
/// 来源部门名称
///
public string? SourceOrgName { get; set; }
///
/// 是否公开
///
public bool? IsOpen { get; set; }
///
/// 是否加粗
///
public bool? IsBold { get; set; }
///
/// 网站公开
///
public bool? IsOpenWebsite { get; set; }
///
/// 微博公开
///
public bool? IsWeibo { get; set; }
///
/// 微信公开
///
public bool? IsWeChat { get; set; }
///
/// 是否置顶
///
public bool? IsTop { get; set; }
///
/// 是否飘窗
///
public bool IsPopup { get; set; }
///
/// 公告形式
/// 0: 消息
/// 1: 视频
///
public EBulletinShape? Shape { get; set; }
///
/// 志愿者类型Id
///
public IList? SafetyTypeId { get; set; }
///
/// 时间
///
public DateTime? BulletinTime { get; set; }
///
/// 来源方式
///
public string SourceMode { get; set; }
///
/// 视频地址
///
public string? VideoPath { get; set; }
///
/// 视频封面
///
public string? VideoCoverImgUrl { get; set; }
}