You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.4 KiB
C#

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