
class BoardTokenDto {
  BoardTokenDto({
    required this.expiresAt,
    required this.whiteboardAppid,
    required this.whiteboardUuid,
    required this.expiresIn,
    required this.whiteboardToken,
  });

  DateTime expiresAt;
  String whiteboardAppid;
  String whiteboardUuid;
  int expiresIn;
  String whiteboardToken;

  factory BoardTokenDto.fromJson(Map<dynamic, dynamic> json) => BoardTokenDto(
    expiresAt: DateTime.parse(json["expires_at"]),
    whiteboardAppid: json["whiteboard_appid"],
    whiteboardUuid: json["whiteboard_uuid"],
    expiresIn: json["expires_in"],
    whiteboardToken: json["whiteboard_token"],
  );

  Map<dynamic, dynamic> toJson() => {
    "expires_at": expiresAt.toIso8601String(),
    "whiteboard_appid": whiteboardAppid,
    "whiteboard_uuid": whiteboardUuid,
    "expires_in": expiresIn,
    "whiteboard_token": whiteboardToken,
  };
}
