mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
25 lines
615 B
C#
25 lines
615 B
C#
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; }
|
|
}
|
|
|
|
}
|