//每一次的屏幕事件
//startTime 解锁屏幕时间
//endTime 锁屏时间，可能为0 ，0 说明当前在使用没有锁屏
class Event {
  int startTime;
  int endTime;

  Event({required this.startTime, required this.endTime});


  @override
  String toString() {
    return 'Event{startTime: $startTime, endTime: $endTime}';
  }

  Map<String, dynamic> toJson() {
    return {
      'startTime': startTime,
      'endTime': endTime,
    };
  }

  factory Event.fromJson(Map<String, dynamic> json) {
    return Event(
      startTime: json['startTime'] as int,
      endTime: json['endTime'] as int,
    );
  }
}
