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

import { IPeriod } from 'app/entities/period/period.model';
import { PeriodVersionStatus } from 'app/entities/enumerations/period-version-status.model';

export interface IPeriodVersion extends IResilientEntity {
  name?: string | null;
  description?: string | null;
  periodVersion?: number | null;
  state?: keyof typeof PeriodVersionStatus | null;
  creationDate?: dayjs.Dayjs | null;
  creationUsername?: string | null;
  period?: Pick<IPeriod, 'id' | 'name'> | null;
}

export type NewPeriodVersion = Omit<IPeriodVersion, 'id'> & { id: null };
