123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- using EyeSoft.Collections.Generic;
- using FluentValidation;
- using Org.BouncyCastle.Utilities;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OASystem.Domain.Dtos.Groups
- {
- public class VisaCommissionDto
- {
- }
- public class VisaCommissionItemDto : PortDtoBase
- {
- public int CurrUserId { get; set; }
- public int DiId { get; set; }
- }
- public class VisaCommissionItemDtoValidator : AbstractValidator<VisaCommissionItemDto>
- {
- public VisaCommissionItemDtoValidator() {
- RuleFor(x => x.PortType).InclusiveBetween(from: 1, to: 3)
- .WithMessage(MsgTips.Port);
- RuleFor(x => x.CurrUserId).GreaterThan(valueToCompare: 1)
- .WithMessage("请输入有效的CurrUserId!");
- RuleFor(x => x.DiId).GreaterThan(valueToCompare: 1)
- .WithMessage("请输入有效的DiId!");
- }
- }
- public class VisaCommissionSaveDto
- {
- public VisaCommissionCreateView[] Items { get; set; }
- }
- public class VisaCommissionCreateView
- {
- /// <summary>
- /// ID
- /// ID<1 添加
- /// ID>0 修改
- /// </summary>
- public int Id { get; set; }
- /// 用户ID
- /// </summary>
- public int CurrUserId { get; set; }
- /// <summary>
- /// 团组ID
- /// </summary>
- public int DiId { get; set; }
- /// <summary>
- /// 国家
- /// </summary>
- public string Country { get; set; }
- /// <summary>
- /// 数量
- /// </summary>
- public int Quantity { get; set; }
- /// <summary>
- /// 备注
- /// </summary>
- public string Remark { get; set; }
- }
- /// <summary>
- /// Create Dto
- /// </summary>
- public class VisaCommissionCreateDto
- {
- /// <summary>
- /// 用户ID
- /// </summary>
- public int CurrUserId { get; set; }
- /// <summary>
- /// 团组ID
- /// </summary>
- public int DiId { get; set; }
- /// <summary>
- /// 国家
- /// </summary>
- public string Country { get; set; }
- /// <summary>
- /// 数量
- /// </summary>
- public int Quantity { get; set; }
- /// <summary>
- /// 备注
- /// </summary>
- public string Remark { get; set; }
- }
- public class VisaCommissionCreateDtoValidator : AbstractValidator<VisaCommissionCreateDto>
- {
- public VisaCommissionCreateDtoValidator()
- {
- RuleFor(x => x.CurrUserId).GreaterThan(valueToCompare: 0)
- .WithMessage("请输入有效的CurrUserId!");
- RuleFor(x => x.DiId).GreaterThan(valueToCompare: 0)
- .WithMessage("请输入有效的DiId!");
- RuleFor(x => x.Country).NotEmpty()
- .WithMessage("国家不能为空!");
- RuleFor(x => x.Quantity).GreaterThan(valueToCompare: 0)
- .WithMessage("请输入有效的Qauntity!");
- }
- }
- }
|