feat: refinamentos
This commit is contained in:
@@ -10,9 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: "7.0.x"
|
||||
# Disable .NET Core welcome and telemetry messages
|
||||
DOTNET_NOLOGO: true
|
||||
# Disable .NET Core SDK telemetry
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -78,5 +78,6 @@ public class Customer : BaseEntity, IAggregateRoot
|
||||
/// <summary>
|
||||
/// Adiciona o evento de entidade deletada.
|
||||
/// </summary>
|
||||
public void Delete() => AddDomainEvent(new CustomerDeletedEvent(Id));
|
||||
public void Delete()
|
||||
=> AddDomainEvent(new CustomerDeletedEvent(Id, FirstName, LastName, Gender, Email.Address, DateOfBirth));
|
||||
}
|
||||
@@ -1,14 +1,20 @@
|
||||
using System;
|
||||
using Shop.Core.Abstractions;
|
||||
using Shop.Domain.Enums;
|
||||
|
||||
namespace Shop.Domain.Entities.Customer.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Evento que representa um cliente deletado.
|
||||
/// </summary>
|
||||
public class CustomerDeletedEvent : BaseDomainEvent
|
||||
public class CustomerDeletedEvent : CustomerBaseEvent
|
||||
{
|
||||
public CustomerDeletedEvent(Guid id) => Id = id;
|
||||
|
||||
public Guid Id { get; private init; }
|
||||
public CustomerDeletedEvent(
|
||||
Guid id,
|
||||
string firstName,
|
||||
string lastName,
|
||||
EGender gender,
|
||||
string email,
|
||||
DateTime dateOfBirth) : base(id, firstName, lastName, gender, email, dateOfBirth)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,7 @@ WORKDIR /app
|
||||
EXPOSE 5072
|
||||
|
||||
ENV ASPNETCORE_URLS=http://+:5072
|
||||
|
||||
# Disable .NET Core welcome and telemetry messages
|
||||
ENV DOTNET_NOLOGO=true
|
||||
|
||||
# Disable .NET Core SDK telemetry
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||
|
||||
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||
|
||||
Reference in New Issue
Block a user