Skip to content

Validation/Event Model & Persistence#94

Open
Adedayo-Data wants to merge 6 commits intoDisciplr-Org:mainfrom
Adedayo-Data:feat/validation
Open

Validation/Event Model & Persistence#94
Adedayo-Data wants to merge 6 commits intoDisciplr-Org:mainfrom
Adedayo-Data:feat/validation

Conversation

@Adedayo-Data
Copy link
Contributor

@Adedayo-Data Adedayo-Data commented Feb 26, 2026

Closes #3


Overview

This PR implements the data model and repository layer for validation events. These events are necessary to record milestone validation actions and vault lifecycle transitions.

Changes Made Include:

Database Migrations

  1. Created the validations table with the following schema:
  • id: (Primary Key, varchar 64)
  • vault_id: (Foreign Key referencing vaults)
  • milestone_id: (Nullable Foreign Key referencing milestones)
  • validator_user_id: (Varchar/UUID)
  • action: (Enum: validated, failed, cancelled, extended)
  • metadata: (JSONB)
  • tx_hash: (varchar 128)
  • created_at: (Timestamp)
  1. Types & Entities
    Established TypeScript interfaces for ValidationEvent and CreateValidationEventDto alongside the ValidationAction union type.

  2. Repository Layer
    Implemented ValidationRepository with basic CRUD support utilizing Dependency Injection for the Knex instance.

Testing

  • Added unit tests verifying persistence and queries through dependency-injected mock chaining.
  • All unit tests are currently passing (npm run test).

@1nonlypiece
Copy link
Contributor

@Adedayo-Data Can you resolve the conflicts?

@Adedayo-Data
Copy link
Contributor Author

Would work on it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation/Event Model & Persistence

2 participants