class SupportTicketModel {
  final int ridersupportid;
  final int userid;
  final String category;
  final String priority;
  final String subject;
  final String issue;
  final String? image;
  final DateTime created;
  final DateTime updated;

  SupportTicketModel({
    required this.ridersupportid,
    required this.userid,
    required this.category,
    required this.priority,
    required this.subject,
    required this.issue,
    this.image,
    required this.created,
    required this.updated,
  });

  factory SupportTicketModel.fromJson(Map<String, dynamic> json) {
    return SupportTicketModel(
      ridersupportid: json['ridersupportid'] as int,
      userid: json['userid'] as int,
      category: json['category'] as String,
      priority: json['priority'] as String,
      subject: json['subject'] as String,
      issue: json['issue'] as String,
      image: json['image'] as String?,
      created: DateTime.parse(json['created'] as String),
      updated: DateTime.parse(json['updated'] as String),
    );
  }
}