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

import { PeriodStatus } from 'app/entities/enumerations/period-status.model';
import { IPeriodVersion } from 'app/entities/period-version/period-version.model';
import { IActivityDomain } from 'app/entities/activity/activity.model';

export interface IPeriod extends IActivityDomain {
  name?: string | null;
  description?: string | null;
  beginDate?: dayjs.Dayjs | null;
  endDate?: dayjs.Dayjs | null;
  state?: keyof typeof PeriodStatus | null;
  creationDate?: dayjs.Dayjs | null;
  creationUsername?: string | null;
  periodVersions?: IPeriodVersion[] | null;
}

export type NewPeriod = Omit<IPeriod, 'id'> & { id: null };
