File

src/models/user/entities/user.entity.ts

Description

Describes the properties of an User in the database

Implements

Index

Properties

Properties

Optional address
Type : string

User address

Optional createdAt
Type : string | Date

User createdAt dateString

email
Type : string

User email

Optional id
Type : string

User ID as UUID

Optional name
Type : string

User name

password
Type : string

User password

Optional role
Type : Role

User's Role. Can be "USER" or "ADMIN". Admin users can handle products

Defaults to "USER"

Optional updatedAt
Type : string | Date

User updatedAt dateString

import { Prisma, Role } from '@prisma/client';

/** Describes the properties of an User in the database */
export class User implements Prisma.UserUncheckedCreateInput {
  /**
   * User ID as UUID
   * @example "d31fc56c-7aed-441e-9f7f-151be8d85634"
   */
  id?: string;

  /**
   * User's Role.
   * Can be "USER" or "ADMIN".
   * Admin users can handle products
   *
   * Defaults to "USER"
   * @example "USER"
   */
  role?: Role;

  /**
   * User email
   * @example "user@example.com"
   */
  email: string;

  /**
   * User password
   * @example "$2b$10$1XpzUYu8FuvuaBb3SC0xzuR9DX7KakbMLt0vLNoZ.UnLntDMFc4LK"
   */
  password: string;

  /**
   * User name
   * @example "John Doe"
   */
  name?: string;

  /**
   * User address
   * @example "World Street 0"
   */
  address?: string;

  /**
   * User createdAt dateString
   * @example "2022-03-26T15:41:28.527Z"
   */
  createdAt?: string | Date;

  /**
   * User updatedAt dateString
   * @example "2022-03-26T15:41:28.527Z"
   */
  updatedAt?: string | Date;
}

results matching ""

    No results matching ""