@replyke/express
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
35 lines (34 loc) • 1.15 kB
TypeScript
import { Model, Sequelize, CreationOptional } from "sequelize";
import { IUserAttributes, IUserCreationAttributes } from "../interfaces/IUser";
import { ISuspension } from "../interfaces/ISuspension";
export default class User extends Model<IUserAttributes, IUserCreationAttributes> implements IUserAttributes {
id: string;
projectId: string;
role: "admin" | "editor" | "visitor";
referenceId: string | null;
foreignId: string | null;
hash: string | null;
salt: string | null;
email: string;
name: string | null;
username: string | null;
avatar: string | null;
bio: string | null;
birthdate: Date | null;
location: any | null;
isVerified: boolean;
isActive: boolean;
lastActive: Date;
suspension: ISuspension;
reputation: number;
metadata: Record<string, any>;
secureMetadata: Record<string, any>;
createdAt: CreationOptional<Date>;
updatedAt: CreationOptional<Date>;
deletedAt: CreationOptional<Date> | null;
static initModel(sequelize: Sequelize): void;
/**
* Define associations to other models
*/
static associate(): void;
}