/**
 * User Model
 * Represents a user in the system
 */
export interface User {
  id: string;
  email: string;
  password: string;
  first_name: string;
  last_name: string;
  phone?: string;
  roles: string[];
  permissions?: string[];
  active: boolean;
  last_login_at?: Date;
  created_at: Date;
  updated_at: Date;
}

/**
 * User Creation DTO
 * Data transfer object for creating a new user
 */
export interface CreateUserDto {
  email: string;
  password: string;
  first_name: string;
  last_name: string;
  phone?: string;
  roles?: string[];
  permissions?: string[];
  active?: boolean;
}

/**
 * User Update DTO
 * Data transfer object for updating an existing user
 */
export interface UpdateUserDto {
  email?: string;
  password?: string;
  first_name?: string;
  last_name?: string;
  phone?: string;
  roles?: string[];
  permissions?: string[];
  active?: boolean;
}

/**
 * User Response DTO
 * Safe user object for API responses (without password)
 */
export interface UserResponseDto {
  id: string;
  email: string;
  first_name: string;
  last_name: string;
  phone?: string;
  roles: string[];
  permissions?: string[];
  active: boolean;
  last_login_at?: Date;
  created_at: Date;
  updated_at: Date;
}

/**
 * User with Token Response
 * Response including user information and authentication tokens
 */
export interface UserWithTokenResponse {
  user: UserResponseDto;
  accessToken: string;
  refreshToken?: string;
  expiresIn: number;
}

/**
 * Password Reset Request
 * Request to initiate password reset
 */
export interface PasswordResetRequest {
  email: string;
}

/**
 * Password Reset Token
 * Token for password reset
 */
export interface PasswordResetToken {
  id: string;
  user_id: string;
  token: string;
  expires_at: Date;
  created_at: Date;
}

/**
 * Password Reset Confirmation
 * Data for confirming a password reset
 */
export interface PasswordResetConfirmation {
  token: string;
  password: string;
}
