import { IResilientEntity } from 'app/resilient/resilient-base/resilient-base.model';
import { SecurityPermission } from './../security-permission.model';
import { ISecurityResource } from './../security-resource/security-resource.model';
import { ISecurityGroup } from './security-group.model';

export interface ISecurityGroupPermission extends IResilientEntity {
  securityGroup?: Pick<ISecurityGroup, 'id' | 'name'> | null;
  securityResource?: Pick<ISecurityResource, 'id' | 'code' | 'name'> | null;
  createPermission?: SecurityPermission | null;
  readPermission?: SecurityPermission | null;
  updatePermission?: SecurityPermission | null;
  deletePermission?: SecurityPermission | null;
}

export type NewSecurityGroupPermission = Omit<ISecurityGroupPermission, 'id'> & { id: null };
