Skip to content

Commit 1dcc0b8

Browse files
upd: v2.3.0
1 parent 6cfbeb3 commit 1dcc0b8

33 files changed

+123
-133
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 snglrtycrvtureofspce
3+
Copyright (c) 2026 snglrtycrvtureofspce
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
3-
namespace snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
1+
namespace snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
42

53
/// <summary>
64
/// Represents an auditable entity with user tracking.
@@ -11,5 +9,5 @@ public interface IAuditable : IEntity
119
Guid CreatedBy { get; set; }
1210

1311
/// <summary>Identifier of the user who last modified the entity.</summary>
14-
Guid ModifiedBy { get; set; }
12+
Guid? ModifiedBy { get; set; }
1513
}

src/snglrtycrvtureofspce.Core.Contracts/Base/Infrastructure/IDomainEvent.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,22 @@ System.Threading.Tasks.Task DispatchAsync<TEvent>(TEvent domainEvent, System.Thr
5959
/// </summary>
6060
public abstract class AggregateRoot : IEntity
6161
{
62-
private readonly System.Collections.Generic.List<IDomainEvent> _domainEvents = new();
62+
private readonly List<IDomainEvent> _domainEvents = new();
63+
64+
#region IEntity
6365

64-
/// <inheritdoc />
6566
public Guid Id { get; set; }
6667

67-
/// <inheritdoc />
68-
public DateTime CreatedDate { get; set; }
68+
public DateTimeOffset CreatedAt { get; set; }
69+
70+
public DateTimeOffset? UpdatedAt { get; set; }
6971

70-
/// <inheritdoc />
71-
public DateTime ModificationDate { get; set; }
72+
#endregion
7273

7374
/// <summary>
7475
/// Gets the domain events that have been raised.
7576
/// </summary>
76-
public System.Collections.Generic.IReadOnlyCollection<IDomainEvent> DomainEvents => _domainEvents.AsReadOnly();
77+
public IReadOnlyCollection<IDomainEvent> DomainEvents => _domainEvents.AsReadOnly();
7778

7879
/// <summary>
7980
/// Adds a domain event to be published.
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
3-
namespace snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
1+
namespace snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
42

53
/// <summary>
64
/// Represents the base entity with audit timestamps.
@@ -11,8 +9,8 @@ public interface IEntity
119
Guid Id { get; set; }
1210

1311
/// <summary>Date when the entity was created (UTC).</summary>
14-
DateTime CreatedDate { get; set; }
12+
DateTimeOffset CreatedAt { get; set; }
1513

1614
/// <summary>Date when the entity was last modified (UTC).</summary>
17-
DateTime ModificationDate { get; set; }
15+
DateTimeOffset? UpdatedAt { get; set; }
1816
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
3-
namespace snglrtycrvtureofspce.Core.Base.ComplexTypes;
1+
namespace snglrtycrvtureofspce.Core.Base.ComplexTypes;
42

53
public class SystemUsersEnumeration(string value, Guid id) : TypeEnumeration(value)
64
{
@@ -10,4 +8,4 @@ public class SystemUsersEnumeration(string value, Guid id) : TypeEnumeration(val
108
private Guid Identifier { get; set; } = id;
119

1210
public override bool Equals(object obj) => Identifier.Equals(((SystemUsersEnumeration)obj)!.Identifier);
13-
}
11+
}

src/snglrtycrvtureofspce.Core/Base/ComplexTypes/TypeEnumeration.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Reflection;
1+
using System.Reflection;
52

63
namespace snglrtycrvtureofspce.Core.Base.ComplexTypes;
74

src/snglrtycrvtureofspce.Core/Base/Responses/DeleteResponse.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
1+
using snglrtycrvtureofspce.Core.Contracts.Base.Infrastructure;
32

43
namespace snglrtycrvtureofspce.Core.Base.Responses;
54

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
using System.Collections.Generic;
2-
using FluentValidation.Results;
1+
using FluentValidation.Results;
32

43
namespace snglrtycrvtureofspce.Core.Errors;
54

65
public static class AuthorizationError
76
{
87
public static IEnumerable<ValidationFailure> UnableToGetAuthorizationToken() => new List<ValidationFailure>
98
{ new("AuthorizationToken", "Unable to get authorization token") };
10-
}
9+
}

src/snglrtycrvtureofspce.Core/Errors/UserErrors.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using FluentValidation.Results;
1+
using FluentValidation.Results;
42

53
namespace snglrtycrvtureofspce.Core.Errors;
64

@@ -26,4 +24,4 @@ public static class UserErrors
2624

2725
public static IEnumerable<ValidationFailure> UsernameIsAlreadyInUse() => new List<ValidationFailure>
2826
{ new(nameof(Nullable), "Username is already in use.") };
29-
}
27+
}

src/snglrtycrvtureofspce.Core/Errors/ValidationErrorFactory.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using FluentValidation.Results;
1+
using FluentValidation.Results;
42

53
namespace snglrtycrvtureofspce.Core.Errors;
64

0 commit comments

Comments
 (0)