mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
- Introduced new BeerPost entity and updated BreweryPost and BreweryPostLocation entities to use 'RowVersion' for concurrency. - Modified UserAccount, UserCredential, UserVerification, City, StateProvince, and Country entities to use 'RowVersion' instead of 'Timer'. - Updated tests and command handlers to reflect changes in concurrency token from 'Timer' to 'RowVersion'. - Adjusted BreweryDto and BreweryDtoMapper to include 'RowVersion' and updated mapping logic accordingly. - Ensured all repository methods and interfaces are aligned with the new concurrency handling approach.
28 lines
831 B
C#
28 lines
831 B
C#
namespace Domain.Entities;
|
|
|
|
public sealed class BeerPost
|
|
{
|
|
// PK
|
|
public Guid BeerPostId { get; set; } = Guid.Empty;
|
|
|
|
// FK References
|
|
public Guid PostedById { get; set; } = Guid.Empty;
|
|
public Guid BeerStyleId { get; set; } = Guid.Empty;
|
|
public Guid BrewedById { get; set; } = Guid.Empty;
|
|
|
|
// Attributes
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Description { get; set; } = string.Empty;
|
|
public decimal ABV { get; set; }
|
|
public int IBU { get; set; }
|
|
|
|
// Audit Fields
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
public byte[]? RowVersion { get; set; }
|
|
|
|
// Navigation Properties
|
|
public UserAccount? PostedBy { get; set; }
|
|
public BreweryPost? BrewedBy { get; set; }
|
|
}
|