File

src/app/models/TestChamber.ts

Index

Properties

Properties

_id
_id: string
Type : string
Optional
about
about: string
Type : string
Optional
accessType
accessType: "admin" | "write" | "read"
Type : "admin" | "write" | "read"
Optional
apiKey
apiKey: string
Type : string
Optional
assignedUsers
assignedUsers: _UserLight[]
Type : _UserLight[]
Optional
controller
controller: string
Type : string
Optional
createdOn
createdOn: Date
Type : Date
Optional
isConnected
isConnected: Boolean
Type : Boolean
Optional
lastSeen
lastSeen: Date
Type : Date
Optional
location
location: string
Type : string
Optional
maxNoOfChannels
maxNoOfChannels: number
Type : number
Optional
maxTemp
maxTemp: number
Type : number
Optional
minTemp
minTemp: number
Type : number
Optional
name
name: string
Type : string
Optional
testPerformed
testPerformed: literal type[]
Type : literal type[]
Optional
version
version: string
Type : string
Optional
import { _UserLight } from './../services/user.service';

//what you get from the back end
export interface _TestChamber {
  _id?: string; //ObjectId from mongodb gets parsed as string
  name?: string;
  controller?: string;
  version?: string;
  about?: string;
  maxTemp?: number; //in °C
  minTemp?: number; //in °C
  location?: string;
  assignedUsers?: _UserLight[]; //could be present if the user is admin to this chamber, otherwise this won't be present
  testPerformed?: { testId: string }[];
  createdOn?: Date;
  maxNoOfChannels?: number;
  isConnected?: Boolean;
  lastSeen?: Date;
  accessType?: 'admin' | 'write' | 'read'; //only specific to front end
  apiKey?:string;
}

//what you need to send while creating a new chamber
export class TestChamber {
  constructor(
    public _id?: string,
    public name?: string,
    public controller?: string,
    public version?: string,
    public about?: string,
    public maxTemp?: number,
    public minTemp?: number,
    public location?: string,
    public assignedUsers?: any,
    public maxNoOfChannels?: number
  ) {
    this.maxNoOfChannels = 1;
  }
}

results matching ""

    No results matching ""