| 1234567891011121314151617181920212223242526 |
- export type UserRole = 'admin' | 'user' | 'viewer';
- export interface User {
- id: string;
- username: string;
- password: string;
- email?: string;
- role: UserRole;
- created_at: Date;
- updated_at: Date;
- }
- export interface UserCreateParams {
- username: string;
- password: string;
- role?: UserRole;
- email?: string;
- }
- export declare class UserModel {
- static create(params: UserCreateParams): Promise<User>;
- static getById(id: any): Promise<User | null>;
- static getByUsername(username: string): Promise<User | null>;
- static update(id: any, updates: Partial<Omit<User, 'id' | 'created_at' | 'password'>>): Promise<User | null>;
- static updatePassword(id: any, newPassword: string): Promise<void>;
- static delete(id: number): Promise<boolean>;
- static getAll(limit?: number, offset?: number): Promise<User[]>;
- }
- //# sourceMappingURL=user.d.ts.map
|