import 'package:ambito/src/domain/entity/file/thumbnails.dart';
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';

part 'file_part.g.dart';

@JsonSerializable(explicitToJson: true)
@embedded
class FilePart {
  FilePart();

  String? url;
  Thumbnails? thumbnails;
  String? visible_name;
  String? name;
  int? size;
  String? mime_type;
  bool? is_image;
  int? image_width;
  int? image_height;
  String? uploaded_at;

  factory FilePart.fromJson(Map<String, dynamic> json) =>
      _$FilePartFromJson(json);

  Map<String, dynamic> toJson() => _$FilePartToJson(this);
}
