-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d850bc
commit 7b56d4e
Showing
27 changed files
with
313 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using OpenAdm.Domain.Model.Pedidos; | ||
|
||
namespace OpenAdm.Application.Dtos.Pedidos; | ||
|
||
public class PedidoCreateDto | ||
{ | ||
public IList<PedidoPorPesoModel> PedidosPorPeso { get; set; } = new List<PedidoPorPesoModel>(); | ||
public IList<PedidoPorTamanhoModel> PedidosPorTamanho { get; set; } = new List<PedidoPorTamanhoModel>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using OpenAdm.Application.Models; | ||
using OpenAdm.Domain.Entities; | ||
using System.ComponentModel.DataAnnotations; | ||
using static BCrypt.Net.BCrypt; | ||
|
||
namespace OpenAdm.Application.Dtos.Usuarios; | ||
|
||
public class CreateUsuarioDto : BaseModel | ||
{ | ||
[Required] | ||
[MaxLength(255)] | ||
public string Nome { get; set; } = string.Empty; | ||
[Required] | ||
[MaxLength(255)] | ||
[DataType(DataType.EmailAddress)] | ||
public string Email { get; set; } = string.Empty; | ||
[Required] | ||
[MaxLength(1000)] | ||
public string Senha { get; set; } = string.Empty; | ||
[Required] | ||
[MaxLength(1000)] | ||
[Compare("Senha", ErrorMessage = "As senhas não conferem!")] | ||
public string ReSenha { get; set; } = string.Empty; | ||
[MaxLength(15)] | ||
public string? Telefone { get; set; } = string.Empty; | ||
[MaxLength(20)] | ||
public string? Cnpj { get; set; } = string.Empty; | ||
|
||
public Usuario ToEntity() | ||
{ | ||
var senha = HashPassword(Senha, 10); | ||
|
||
var date = DateTime.Now; | ||
return new Usuario( | ||
Guid.NewGuid(), | ||
date, | ||
date, | ||
0, | ||
Email, | ||
senha, | ||
Nome, | ||
Telefone, | ||
Cnpj); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using OpenAdm.Domain.Entities; | ||
|
||
namespace OpenAdm.Domain.Interfaces; | ||
|
||
public interface ITabelaDePrecoRepository : IGenericRepository<TabelaDePreco> | ||
{ | ||
Task<TabelaDePreco?> GetTabelaDePrecoAtivaAsync(); | ||
} |
Oops, something went wrong.