import { Injectable } from '@angular/core'; import { Action } from '@ngrx/store'; import { Part } from './part.model'; export const ADD_PART = '[PART] Add'; export const REMOVE_PART = '[PART] Remove'; export const RESTORE_PART = '[PART] Restore'; export class AddPart implements Action { readonly type = ADD_PART; constructor(public payload: Part) {} } export class RemovePart implements Action { readonly type = REMOVE_PART; constructor(public payload: number) {} } export class RestorePart implements Action { readonly type = RESTORE_PART; constructor(public payload: number) {} } export type Actions = AddPart | RemovePart | RestorePart;