import { IResilientEntity } from 'app/resilient/resilient-base/resilient-base.model';

import { IVariableScope } from 'app/entities/variable-scope/variable-scope.model';
import { IVariableCategory } from 'app/entities/variable-category/variable-category.model';

export interface IEmissionFactor extends IResilientEntity {
  year?: number | null;
  code?: string | null;
  name?: string | null;
  unit?: string | null;
  value?: number | null;
  source?: string | null;
  comments?: string | null;
  variableScope?: Pick<IVariableScope, 'id' | 'name'> | null;
  variableCategory?: Pick<IVariableCategory, 'id' | 'name'> | null;
}

export type NewEmissionFactor = Omit<IEmissionFactor, 'id'> & { id: null };

export type SearchEmissionFactor = Omit<
								IEmissionFactor, 
								// Remove unwanted properties for search
								'id' | 'variableScope' | 'variableCategory' >  
								&
								// Add specific properties for search
                {
                  id?: number | null;
                  emissionFactorNameOrCode?: string | null;
                  variableScopeId?: number | null;
                  variableCategoryId?: number | null;
                }
