import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/data/dto/permissions/action_effect.dart';

part 'policy.g.dart';


@JsonSerializable()
class PolicyDTO {
  final String roleDescriptionRef;
  final String organizationRef;
  final String descriptionRef;
  final String? objectRef;
  final ActionEffectDTO effect;

  const PolicyDTO({
    required this.roleDescriptionRef,
    required this.organizationRef,
    required this.descriptionRef,
    required this.objectRef,
    required this.effect,
  });

  factory PolicyDTO.fromJson(Map<String, dynamic> json) => _$PolicyDTOFromJson(json);
  Map<String, dynamic> toJson() => _$PolicyDTOToJson(this);  
}