import 'package:json_annotation/json_annotation.dart';

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

part 'description.g.dart';


@JsonSerializable()
class PermissionsDescriptionDTO {
  final List<RoleDescriptionDTO> roles;
  final List<PolicyDescriptionDTO> policies;

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

  factory PermissionsDescriptionDTO.fromJson(Map<String, dynamic> json) => _$PermissionsDescriptionDTOFromJson(json);
  Map<String, dynamic> toJson() => _$PermissionsDescriptionDTOToJson(this);  
}