
/// Data Transfer Object
/// - 只負責資料傳輸 / 解析
/// - 結構可變
/// - 可以依賴 JSON / platform
class ProtocolSdkPermissionStatusDto {
  final bool granted;
  final bool permanentlyDenied;
  final String? grantedAt; // 通常是 raw string

  ProtocolSdkPermissionStatusDto({
    required this.granted,
    required this.permanentlyDenied,
    this.grantedAt,
  });

  factory ProtocolSdkPermissionStatusDto.fromJson(
    Map<String, dynamic> json,
  ) {
    return ProtocolSdkPermissionStatusDto(
      granted: json['granted'] as bool,
      permanentlyDenied: json['permanentlyDenied'] as bool,
      grantedAt: json['grantedAt'] as String?,
    );
  }
}
