ql_apimanager_backend/Apimanager_backend/Dtos/CreateApiInfo.cs

23 lines
817 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Apimanager_backend.Models;
using System.ComponentModel.DataAnnotations;
namespace Apimanager_backend.Dtos
{
public class CreateApiInfo
{
[Required(ErrorMessage = "API名称必填")]
[MaxLength(50,ErrorMessage = "API名称最大50字符")]
public string Name { get; set; }
public string Description { get; set; } = string.Empty;
[Required(ErrorMessage = "调用端点必填")]
public string Endpoint { get; set; }
[Required(ErrorMessage = "调用方式必填")]
[MaxLength(20,ErrorMessage = "调用方式最大20字符")]
public ApiMethod Method { get; set; }
public int? PackageId { get; set; }
[Required(ErrorMessage = "是否为三方接口必选")]
public bool IsThirdParty { get; set; }
}
}