File

src/project/entities/project.entity.ts

Index

Properties
Methods

Constructor

constructor(partial: Partial<Project>)
Parameters :
Name Type Optional
partial Partial<Project> No

Properties

Optional budget
Type : number
Decorators :
@ApiProperty()
Optional businessObjective
Type : string
Decorators :
@ApiProperty()
businessUnit
Type : string
Decorators :
@ApiProperty()
Optional createdAt
Type : Date
Decorators :
@Exclude()
description
Type : string
Decorators :
@ApiProperty()
Optional estimatedRevenue
Type : number
Decorators :
@ApiProperty()
Optional hasPendingAccessRequest
Type : boolean
id
Type : number
Decorators :
@ApiProperty()
Optional impactNotes
Type : string
Decorators :
@ApiProperty()
Optional isProjectUser
Type : boolean
Optional isPublic
Type : boolean
Decorators :
@ApiProperty()
Optional keyResults
Type : string
Decorators :
@ApiProperty()
Optional kpis
Type : string
Decorators :
@ApiProperty()
Optional metrics
Type : any
name
Type : string
Decorators :
@ApiProperty()
Optional owner
Type : any
slug
Type : string
Decorators :
@ApiProperty()
Optional stage
Type : string
Decorators :
@ApiProperty()
Optional targetVariable
Type : string
Decorators :
@ApiProperty()
Optional teamMembers
Type : string
Decorators :
@ApiProperty()
Optional updatedAt
Type : Date
Decorators :
@Exclude()
Optional useCaseType
Type : string
Decorators :
@ApiProperty()

Methods

getProjectServiceUsername
getProjectServiceUsername()
Returns : string
import { ApiProperty } from "@nestjs/swagger";
import { Exclude } from "class-transformer";

export class Project {
  @ApiProperty()
  id: number;

  @ApiProperty()
  name: string;

  @ApiProperty()
  isPublic?: boolean;

  @ApiProperty()
  description: string;

  @ApiProperty()
  businessObjective?: string;

  @ApiProperty()
  keyResults?: string;

  @ApiProperty()
  kpis?: string;

  @ApiProperty()
  estimatedRevenue?: number;

  @ApiProperty()
  impactNotes?: string;

  @ApiProperty()
  budget?: number;

  @ApiProperty()
  targetVariable?: string;

  @ApiProperty()
  teamMembers?: string;

  @ApiProperty()
  stage?: string;

  @ApiProperty()
  useCaseType?: string;

  @ApiProperty()
  slug: string;

  @ApiProperty()
  businessUnit: string;

  @Exclude()
  createdAt?: Date;

  @Exclude()
  updatedAt?: Date;

  isProjectUser?: boolean;
  hasPendingAccessRequest?: boolean;
  metrics?: any;
  owner?: any;

  constructor(partial: Partial<Project>) {
    Object.assign(this, partial);
  }

  getProjectServiceUsername() {
    return `${this.slug}-su`;
  }
}

export enum ProjectStages {
  ASSESS = "ASSESS",
  BUILD = "BUILD",
  PILOT = "PILOT",
  SCALE = "SCALE",
  ARCHIVED = "ARCHIVED",
  DELETED = "DELETED",
  APPROVAL = "APPROVAL",
  REJECTED = "REJECTED",
}

export enum ProjectUseCaseType {
  FRAUD_DETECTION = "FRAUD_DETECTION",
  RISK_ASSESSMENT = "RISK_ASSESSMENT",
  PERSONALISATION = "PERSONALISATION",
  RECOMMENDATION_ENGINE = "RECOMMENDATION_ENGINE",
  CROSS_SELL = "CROSS_SELL",
  OTHER = "OTHER",
}

export enum ProjectUseCaseModelName {
  FRAUD_DETECTION = "Number of flagged suspicious transactions",
  RISK_ASSESSMENT = "Number of missed payments",
  PERSONALISATION = "Open rate and click-through rate of personalized messages",
  RECOMMENDATION_ENGINE = "Number of accepted recommendations by end users",
  CROSS_SELL = "Number of cross-sell offers made, customer engagement with offers",
}

results matching ""

    No results matching ""