GerbilStatus: Active→Breeding, add Pet; Deceased/GivenAway are now DERIVED. GerbilStatusService.Derive(): central precedence: DateOfDeath→Deceased (1), ReceiverContactId→GivenAway (2), age>7y→Deceased presumed (3), user choice (4). All write paths (gerbil CRUD, contracts, importers) call GerbilStatusService.Apply(). Startup sweep flips >7y gerbils to Deceased at next app restart. Migration StatusModel: Active→Breeding rename + backfill derived statuses. 10 new tests; 200/200 green; has-pending=No. Enum string values: Breeding (was Active), Pet (new), Deceased, GivenAway, ForSale. FE contract: status field values updated (see Done-Report).
18 lines
707 B
C#
18 lines
707 B
C#
namespace GerbilManagerWebAPI.Models
|
|
{
|
|
/// <summary>Lifecycle status of a gerbil. Serialised as the string name on the wire.
|
|
/// Deceased and GivenAway are DERIVED (set by GerbilStatusService, not free-form input).
|
|
/// Breeding/Pet/ForSale are the user-selectable live states.</summary>
|
|
public enum GerbilStatus
|
|
{
|
|
/// <summary>Aktiv in der Zucht (vormals "Active").</summary>
|
|
Breeding = 0,
|
|
Deceased = 1,
|
|
GivenAway = 2,
|
|
/// <summary>Alive, at home, offered for Abgabe ("Abzugeben"). Drives FEAT-12 sale listing.</summary>
|
|
ForSale = 3,
|
|
/// <summary>Lebendes Heimtier, nicht in Zucht ("Liebhaber").</summary>
|
|
Pet = 4,
|
|
}
|
|
}
|