mirrored_repositories/ToktikApp/lib/infrastructure
import 'package:toktik/domain/entities/video_post.dart';

class LocalVideoModel {
  final String name;
  final String videoUrl;
  final int likes;
  final int views;

  LocalVideoModel(
      {required this.name,
      required this.videoUrl,
      required this.likes,
      required this.views});

  factory LocalVideoModel.fromJsonMap(Map<String, dynamic> json) => LocalVideoModel(
      name: json["name"],
      videoUrl: json["videoUrl"],
      likes: json["likes"],
      views: json["views"]);

  VideoPost toVideoPosts() =>
      VideoPost(caption: name, videoUrl: videoUrl, likes: likes, views: views);
}
