Skip to content

Customer and employee ID format validation and uniqueness #13

@NikosPoly

Description

@NikosPoly

Currently customerId and employeeId accept any string value with no format enforcement
or uniqueness guarantee. Gender also accepts any string value.

Tasks

  • Convert gender field in Customer to a Gender enum (MALE, FEMALE, OTHER)
  • Add @pattern validation on customerId — format CUST\d{4} e.g. CUST0001
  • Add @pattern validation on employeeId — format EMP\d{4} e.g. EMP0001
  • Add @indexed(unique = true) on:
    • customerId and email in Customer
    • employeeId in Employee
    • isbn in Book

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions