Skip to content
Snippets Groups Projects
duel.model.ts 498 B
Newer Older
  • Learn to ignore specific revisions
  • import { FluidType, UserDuelState } from 'enums'
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
    import { DateTime, Duration } from 'luxon'
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    export interface DuelEntity {
    
      id: string
      title: string
      description: string
      duration: Duration
    }
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    export interface UserDuelEntity extends DuelEntity {
    
      duration: Duration
      threshold: number
    
    Yoan VALLET's avatar
    Yoan VALLET committed
      state: UserDuelState
    
      startDate: string | null
      fluidTypes: FluidType[]
      userConsumption: number
    }
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    export interface UserDuel extends Omit<UserDuelEntity, 'startDate'> {
    
      startDate: DateTime | null
    }