Skip to content

T007: [P] Create Certificate domain entity with validation #44

@Hemavathi15sg

Description

@Hemavathi15sg

Phase 2: Foundational

Task: T007
Status: Not Started
Story: Foundational (blocking all user stories)
Parallelizable: Yes - independent from T008-T010

Description

Create Certificate domain entity with all 17 properties, validation rules, state machine, and soft delete support.

Acceptance Criteria

  • File created: api/CourseRegistration.Domain/Entities/Certificate.cs
  • All 17 properties implemented with proper types and constraints (see data-model.md table)
  • CertificateId: Guid (NEWID default, immutable, PK)
  • SerialNumber: string (UNIQUE constraint enforced at DB level)
  • HolderName: string with validation (Unicode NFC, length 1-120, no control chars)
  • Status: enum property with computed logic (Active/Revoked/Expired)
  • State transitions documented: Active → Revoked/Expired (terminal states)
  • Soft delete flag implemented: IsDeleted bit
  • All REQUIRED properties validated in constructor or property setters
  • XML documentation on public members

Effort Estimate

4 hours

References

  • data-model.md: Certificate Entity section (17 properties listed)
  • certificat.instructions.md: Validation Rules
  • constitution.md: Principle V (Security, Validation)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions