95680c9960
Email-canonical get-or-create, peppered-hash one-time codes with 10-min TTL, single-use, 5-attempt cap, and 60s resend cooldown; uniform new-or-known (no enumeration, §6.6). All identity rules in the domain layer once (INV-6); scenario + invariant tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
272 B
Python
13 lines
272 B
Python
"""accounts — domain models (SD-0001 §6.3)."""
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class Account:
|
|
"""A person's identity on the platform. Email is the canonical key (INV-2)."""
|
|
|
|
id: int
|
|
email: str
|