// src/interfaces/user.ts
// Copyright (C) 2026 Rob Colbert <rob.colbert@openplatform.us>
// Licensed under the Apache License, Version 2.0

import { HydratedDocument } from "mongoose";
import { GadgetId } from "../lib/gadget-id.ts";

export interface IUserFlags {
  isEmailVerified: boolean;
  isAdmin: boolean;
  isTest: boolean;
  isBanned: boolean;
}

export interface IUser {
  _id: GadgetId;
  email: string;
  email_lc: string;
  passwordSalt?: string;
  password?: string;
  displayName: string;
  flags: IUserFlags;
  persona?: string;
}

export type UserDocument = HydratedDocument<IUser>;
