using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Magic.Core.Service;
///
/// 通知公告参数
///
public class NoticeInput : PageInputBase
{
///
/// 标题
///
public virtual string Title { get; set; }
///
/// 内容
///
public virtual string Content { get; set; }
///
/// 类型(字典 1通知 2公告)
///
public virtual NoticeType Type { get; set; }
///
/// 状态(字典 0草稿 1发布 2撤回 3删除)
///
public virtual NoticeStatus Status { get; set; }
///
/// 通知到的人
///
public virtual List NoticeUserIdList { get; set; }
}
public class AddNoticeInput : NoticeInput
{
///
/// 标题
///
[Required(ErrorMessage = "标题不能为空")]
public override string Title { get; set; }
///
/// 内容
///
[Required(ErrorMessage = "内容不能为空")]
public override string Content { get; set; }
///
/// 类型(字典 1通知 2公告)
///
[Required(ErrorMessage = "类型不能为空")]
public override NoticeType Type { get; set; }
///
/// 状态(字典 0草稿 1发布 2撤回 3删除)
///
[Required(ErrorMessage = "状态不能为空")]
public override NoticeStatus Status { get; set; }
///
/// 通知到的人
///
[Required(ErrorMessage = "通知到的人不能为空")]
public override List NoticeUserIdList { get; set; }
}
public class DeleteNoticeInput
{
///
/// Id
///
[Required(ErrorMessage = "通知公告Id不能为空")]
public long Id { get; set; }
}
public class UpdateNoticeInput : AddNoticeInput
{
///
/// Id
///
[Required(ErrorMessage = "通知公告Id不能为空")]
public long Id { get; set; }
}
public class QueryNoticeInput : DeleteNoticeInput
{
}
public class ChangeStatusNoticeInput : DeleteNoticeInput
{
///
/// 状态(字典 0草稿 1发布 2撤回 3删除)
///
[Required(ErrorMessage = "状态不能为空")]
public NoticeStatus Status { get; set; }
}