Moved all Mongoose model interfaces to @gadget/api to commonize the data structures being passed around the system as JSON objects via HTTP and Socket.IO.
23 lines
501 B
TypeScript
23 lines
501 B
TypeScript
// src/interfaces/user.ts
|
|
// Copyright (C) 2026 Rob Colbert <rob.colbert@openplatform.us>
|
|
// Licensed under the Apache License, Version 2.0
|
|
|
|
export interface IUserFlags {
|
|
isEmailVerified: boolean;
|
|
isAdmin: boolean;
|
|
isTest: boolean;
|
|
isBanned: boolean;
|
|
}
|
|
|
|
import { Document, Types } from "mongoose";
|
|
|
|
export interface IUser extends Document {
|
|
_id: Types.ObjectId;
|
|
email: string;
|
|
email_lc: string;
|
|
passwordSalt?: string;
|
|
password?: string;
|
|
displayName: string;
|
|
flags: IUserFlags;
|
|
}
|