feat: 添加sample示例
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Acme.BookStore.Domain.Shared.Enums;
|
||||
|
||||
namespace Acme.BookStore.Application.Contracts.Dtos.Book
|
||||
{
|
||||
|
||||
public class BookCreateUpdateDto
|
||||
{
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public BookTypeEnum Type { get; set; } = BookTypeEnum.Undefined;
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime PublishDate { get; set; } = DateTime.Now;
|
||||
|
||||
[Required]
|
||||
public float Price { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user