import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/data/dto/permissions/data/permission.dart';
import 'package:pshared/data/dto/permissions/data/policy.dart';
import 'package:pshared/data/dto/permissions/data/role.dart';

part 'permissions.g.dart';


@JsonSerializable()
class PermissionsDataDTO {
  final List<RoleDTO> roles;
  final List<PolicyDTO> policies;
  final List<PermissionDTO> permissions;

  const PermissionsDataDTO({
    required this.roles,
    required this.policies,
    required this.permissions,
  });

  factory PermissionsDataDTO.fromJson(Map<String, dynamic> json) => _$PermissionsDataDTOFromJson(json);
  Map<String, dynamic> toJson() => _$PermissionsDataDTOToJson(this);  
}
