Add contact controller
This commit is contained in:
14
Dtos/ContactDto.cs
Normal file
14
Dtos/ContactDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace weddingapi.Dtos
|
||||
{
|
||||
public record ContactDto
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
public string From { get; init; }
|
||||
public string Email { get; init; }
|
||||
public string Message { get; init; }
|
||||
public DateTimeOffset CreatedDate { get; set; }
|
||||
}
|
||||
}
|
||||
15
Dtos/CreateContactDto.cs
Normal file
15
Dtos/CreateContactDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace weddingapi.Dtos
|
||||
{
|
||||
public record CreateContactDto
|
||||
{
|
||||
[Required]
|
||||
public string From { get; init; }
|
||||
[Required]
|
||||
public string Email { get; init; }
|
||||
[Required]
|
||||
public string Message { get; init; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user