Files
Goa-gel-fullstack/backend/src/database/models/wallet.model.ts
Mahi 80566bf0a2 feat: Goa GEL Blockchain e-Licensing Platform - Full Stack Implementation
Complete implementation of the Goa Government e-Licensing platform with:

Backend:
- NestJS API with JWT authentication
- PostgreSQL database with Knex ORM
- Redis caching and session management
- MinIO document storage
- Hyperledger Besu blockchain integration
- Multi-department workflow system
- Comprehensive API tests (266/282 passing)

Frontend:
- Angular 21 with standalone components
- Angular Material + TailwindCSS UI
- Visual workflow builder
- Document upload with progress tracking
- Blockchain explorer integration
- Role-based dashboards (Admin, Department, Citizen)
- E2E tests with Playwright (37 tests)

Infrastructure:
- Docker Compose orchestration
- Blockscout blockchain explorer
- Development and production configurations
2026-02-07 10:23:29 -04:00

33 lines
1005 B
TypeScript

import { Model, RelationMappings, RelationMappingsThunk } from 'objection';
import { BaseModel } from './base.model';
export class Wallet extends BaseModel {
static tableName = 'wallets';
id!: string;
address!: string;
encryptedPrivateKey!: string;
ownerType!: 'USER' | 'DEPARTMENT';
ownerId!: string;
isActive!: boolean;
createdAt!: Date;
updatedAt!: Date;
static get jsonSchema() {
return {
type: 'object',
required: ['address', 'encryptedPrivateKey', 'ownerType', 'ownerId'],
properties: {
id: { type: 'string', format: 'uuid' },
address: { type: 'string', maxLength: 42 },
encryptedPrivateKey: { type: 'string' },
ownerType: { type: 'string', enum: ['USER', 'DEPARTMENT'] },
ownerId: { type: 'string', format: 'uuid' },
isActive: { type: 'boolean', default: true },
createdAt: { type: 'string', format: 'date-time' },
updatedAt: { type: 'string', format: 'date-time' },
},
};
}
}