mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
feat(dbal): add session and user entity types/stores
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @file validate-id.ts
|
||||
* @description ID validation (stub)
|
||||
*/
|
||||
|
||||
export const validateId = (input: any): string[] => {
|
||||
// Stub validation that always returns empty errors
|
||||
return [];
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @file validate-session-create.ts
|
||||
* @description Session creation validation (stub)
|
||||
*/
|
||||
|
||||
export const validateSessionCreate = (input: any): string[] => {
|
||||
// Stub validation that always returns empty errors
|
||||
return [];
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @file validate-session-update.ts
|
||||
* @description Session update validation (stub)
|
||||
*/
|
||||
|
||||
export const validateSessionUpdate = (input: any): string[] => {
|
||||
// Stub validation that always returns empty errors
|
||||
return [];
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @file in-memory-store.ts
|
||||
* @description In-memory store interface for user operations (stub)
|
||||
*/
|
||||
|
||||
export interface InMemoryStore {
|
||||
users: Map<string, any>;
|
||||
userEmails: Map<string, string>;
|
||||
usernames: Map<string, string>;
|
||||
generateId(entityType: string): string;
|
||||
}
|
||||
29
dbal/development/src/core/entities/user/types.ts
Normal file
29
dbal/development/src/core/entities/user/types.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @file types.ts
|
||||
* @description Type definitions for user operations (stub)
|
||||
*/
|
||||
|
||||
export interface CreateUserInput {
|
||||
username: string;
|
||||
email: string;
|
||||
password?: string;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface UserView {
|
||||
id: string;
|
||||
username: string;
|
||||
email: string;
|
||||
isActive: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Result<T> {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
error?: {
|
||||
code: string;
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user