feat: implemetar até parte 3
This commit is contained in:
		| @@ -1,28 +1,19 @@ | ||||
|  | ||||
| namespace CampusWorkshops.Api.Models; | ||||
|  | ||||
| // Modelo mínimo para Workshop.Completar as validações | ||||
| // e ajustar os tipos/atributos durante a atividade. | ||||
| public class Workshop | ||||
| { | ||||
|     // Identificador único | ||||
|     public Guid Id { get; set; } = Guid.NewGuid(); | ||||
|  | ||||
|     // TODO: adicionar [Required], [StringLength(120, MinimumLength = 3)] | ||||
|     public string? Title { get; set; } | ||||
|  | ||||
|     // TODO: limitar tamanho (ex.: 2000) | ||||
|     public string? Description { get; set; } | ||||
|  | ||||
|     // TODO: usar DateTimeOffset com formato ISO 8601 | ||||
|     public DateTimeOffset StartAt { get; set; } | ||||
|  | ||||
|      | ||||
|     public DateTimeOffset EndAt { get; set; } | ||||
|  | ||||
|     // Location deve ser obrigatório se IsOnline == false | ||||
|     public string? Location { get; set; } | ||||
|  | ||||
|     // TODO: validar Capacity >= 1 | ||||
|     public int Capacity { get; set; } = 1; | ||||
|  | ||||
|     public bool IsOnline { get; set; } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sheila
					Sheila