mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
🔖 Checkpoint: Edit /workspaces/claude-code-flow/user-service/src/types/user.types.ts
This commit is contained in:
1 parent
dd0fbbd39f
commit
31a62742af
2 files changed
+88
No files matched your search
@@ -0,0 +1 @@
|
||||
{"checkpoint": "task-20250806-135842", "task": "the list doesn't seem to work. @ruvnet ➜ /workspaces/claude-code-flow (alpha-88) $ swarm-bench rea", "timestamp": "2025-08-06T13:58:43Z", "commit": "0d434b5e9dd25b8968839d99e7dbff0584729f7a", "github_release": "true"}
|
||||
@@ -0,0 +1,87 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
username: string;
|
||||
password: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
avatar?: string;
|
||||
role: UserRole;
|
||||
status: UserStatus;
|
||||
emailVerified: boolean;
|
||||
lastLogin?: Date;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export enum UserRole {
|
||||
ADMIN = 'admin',
|
||||
USER = 'user',
|
||||
MODERATOR = 'moderator',
|
||||
GUEST = 'guest'
|
||||
}
|
||||
|
||||
export enum UserStatus {
|
||||
ACTIVE = 'active',
|
||||
INACTIVE = 'inactive',
|
||||
SUSPENDED = 'suspended',
|
||||
DELETED = 'deleted'
|
||||
}
|
||||
|
||||
export interface CreateUserDTO {
|
||||
email: string;
|
||||
username: string;
|
||||
password: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
role?: UserRole;
|
||||
}
|
||||
|
||||
export interface UpdateUserDTO {
|
||||
email?: string;
|
||||
username?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
avatar?: string;
|
||||
role?: UserRole;
|
||||
status?: UserStatus;
|
||||
}
|
||||
|
||||
export interface LoginDTO {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface TokenPayload {
|
||||
userId: string;
|
||||
email: string;
|
||||
role: UserRole;
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
user: Omit<User, 'password'>;
|
||||
token: string;
|
||||
refreshToken?: string;
|
||||
}
|
||||
|
||||
export interface PaginationOptions {
|
||||
page: number;
|
||||
limit: number;
|
||||
sortBy?: string;
|
||||
sortOrder?: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
export interface PaginatedResult<T> {
|
||||
data: T[];
|
||||
total: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
totalPages: number;
|
||||
}
|
||||
|
||||
export interface UserFilter {
|
||||
role?: UserRole;
|
||||
status?: UserStatus;
|
||||
emailVerified?: boolean;
|
||||
search?: string;
|
||||
}
|
||||
Reference in new issue
Block a user