Files
housemove3/Api/Ewide.Application/Service/HouseSafety/HouseCompany/Dto/HouseCompanyInput.cs
路 范 c03092bc0c .
2021-09-24 14:33:10 +08:00

62 lines
1.5 KiB
C#

using Ewide.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ewide.Application
{
public class HouseCompanyInput
{
[Required(ErrorMessage = "Id不能为空")]
public string Id { get; set; }
}
public class HouseCompanyInfoInput
{
[Required(ErrorMessage = "信息名称不能为空")]
public string Name { get; set; }
[Required(ErrorMessage = "信息内容不能为空")]
public string Value { get; set; }
}
public class HouseCompanyPageInput : PageInputBase {}
public class HouseCompanyAddInput
{
[Required(ErrorMessage = "名称不能为空")]
public virtual string Name { get; set; }
private string _Type { get; set; }
[Required(ErrorMessage = "类型不能为空")]
public virtual string Type
{
get
{
return _Type;
}
set
{
_Type = String.Join(",", value.Split(',').Select(p => $"[{p}]"));
}
}
public virtual List<HouseCompanyInfoInput> Info { get; set; }
}
public class HouseCompanyEditInput : HouseCompanyAddInput
{
[Required(ErrorMessage = "Id不能为空")]
public string Id { get; set; }
}
public class HouseCompanyListInput
{
[Required(ErrorMessage = "类型不能为空")]
public string Type { get; set; }
}
}