Class AccountBetaCodeEntity
The permanent record that an account redeemed a beta code.
public class AccountBetaCodeEntity
- Inheritance
-
AccountBetaCodeEntity
- Inherited Members
Remarks
A row is written once, in the same transaction that takes a use from the code, and is never updated or deleted. Whether the account still has access is decided at read time from the code it points at: a revoked code ends it, an expired one does not.
No foreign keys, deliberately. The link is evidence of who was admitted to which program, and it has to outlive anything that might happen to either side. Codes are revoked, never deleted, and accounts are never deleted in this system, so a cascade could never fire in normal operation — its only possible effect would be to erase the evidence when somebody removed a row by hand, which is precisely the case the record exists for.
Code and Program are copied from the code at redemption. Neither ever changes after a code is minted, so the copies cannot drift, and a staff lookup of "who is in closed beta" reads one table. Access checks still join to the code, because revocation lives there.
Properties
AccountName
The account, matching accounts.name, stored lowercase.
public string AccountName { get; set; }
Property Value
BetaCodeID
The redeemed code's id.
public long BetaCodeID { get; set; }
Property Value
Code
The redeemed code, copied at redemption.
public string Code { get; set; }
Property Value
ID
Surrogate key.
public long ID { get; set; }
Property Value
Program
The code's program, copied at redemption.
public string Program { get; set; }
Property Value
RedeemedUtc
When the account redeemed it.
public DateTime RedeemedUtc { get; set; }