using System.ComponentModel.DataAnnotations;

namespace Ewide.Application
{
    // 继承PageInputBase,可以直接使用一些通用的查询和分页字段
    public class DtoPageInput : Core.PageInputBase {}

    // 可定义一个主键Dto
    public class DtoKeyInput
    {
        public virtual string Id { get; set; }
    }

    // 可定义一个必传主键的Dto
    public class DtoKeyRequiredInput : DtoKeyInput
    {
        [Required]
        public override string Id { get; set; }
    }

    public class DtoAddInput
    {
        [MaxLength(100)]
        [Required]
        public string RequiredString { get; set; }
    }

    public class DtoUpdateInput : DtoAddInput
    {
         [Required]
        public override string Id { get; set; }
    }

    public class DtoDeleteInput: DtoKeyInput {}
}