40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace 电子展板.Utility.Swagger
|
|
{
|
|
[AttributeUsage(AttributeTargets.Property)]
|
|
public class SwaggerCommentAttribute : Attribute
|
|
{
|
|
public string Comment { get; set; }
|
|
public bool? IsRequired { get; set; }
|
|
|
|
public long? Min { get; set; }
|
|
public long? Max { get; set; }
|
|
public SwaggerCommentAttribute()
|
|
{
|
|
Comment = "";
|
|
}
|
|
public SwaggerCommentAttribute(string comment)
|
|
{
|
|
Comment = comment;
|
|
}
|
|
public SwaggerCommentAttribute(string comment, bool isRequired)
|
|
{
|
|
Comment = comment;
|
|
IsRequired = isRequired;
|
|
}
|
|
public SwaggerCommentAttribute(string comment, bool isRequired, long min, long max)
|
|
{
|
|
Comment = comment;
|
|
IsRequired = isRequired;
|
|
Min = min;
|
|
Max = max;
|
|
}
|
|
|
|
}
|
|
}
|