import 'package:equatable/equatable.dart';

class FileMeta extends Equatable {
  final DateTime lastModified;
  final String lastModifiedBy;
  final int versionCount;

  const FileMeta({
    required this.lastModified,
    required this.lastModifiedBy,
    required this.versionCount,
  });

  @override
  List<Object?> get props => [lastModified, lastModifiedBy, versionCount];

  factory FileMeta.fromJson(Map<String, dynamic> json) {
    return FileMeta(
      lastModified: DateTime.parse(json['lastModified']),
      lastModifiedBy: json['lastModifiedBy'],
      versionCount: json['versionCount'],
    );
  }
}
