import { DbModel, DbModelWithHistory } from 'src/app/model/entities/db-model';
import { User } from 'src/app/model/auth/user';

export interface Role extends DbModelWithHistory {
  name?: string;
  description?: string;
  permissions?: Permission[];
  users?: User[];
}

export interface RoleCreateInput {
  name?: string;
  description?: string;
  permissions?: Permission[];
}

export interface RoleUpdateInput {
  id: number;
  name?: string;
  description?: string;
  permissions: Permission[];
}

export interface Permission extends DbModel {
  name: string;
  description: string;
}
