Skip to content
Snippets Groups Projects
dataload.model.ts 808 B
Newer Older
  • Learn to ignore specific revisions
  • import { DataloadState } from 'enums'
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    import { DateTime } from 'luxon'
    
    
    export interface DataloadValueDetail {
      value: number
      state: DataloadState
    }
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    export interface Dataload {
      date: DateTime
      value: number
    
      state: DataloadState
      valueDetail: DataloadValueDetail[] | null
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    }
    
    
    export interface DataloadEntity {
      id: string
      _id?: string
      _type?: string
      _rev?: string
    
      /** load (in kWh or L) */
    
      load: number
    
      /** minute of the date, set to 0 except for minute series */
    
      minute: number
    
      /** hour of the date, set to 0 except for minute and hour series */
      hour: number
      /** day of the date, set to 1 for month and year series */
      day: number
      /** month of the date, set to 1 for year series */
    
      month: number
    
      /** year of the date */
    
      year: number