LCOV - code coverage report
Current view: top level - lib/data/models/mobility - calendar_model.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 13 13 100.0 %
Date: 2020-06-26 11:36:11 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:app_pym/domain/entities/mobility/calendar.dart';
       2             : import 'package:freezed_annotation/freezed_annotation.dart';
       3             : 
       4             : part 'calendar_model.freezed.dart';
       5             : 
       6             : @freezed
       7             : abstract class CalendarModel with _$CalendarModel {
       8             :   const factory CalendarModel({
       9             :     String service_id,
      10             :     bool monday,
      11             :     bool tuesday,
      12             :     bool wednesday,
      13             :     bool thursday,
      14             :     bool friday,
      15             :     bool saturday,
      16             :     bool sunday,
      17             :     String start_date,
      18             :     String end_date,
      19             :   }) = _CalendarModel;
      20             : }
      21             : 
      22             : extension CalendarModelX on CalendarModel {
      23           3 :   Calendar toEntity() {
      24           3 :     return Calendar(
      25           3 :       service_id: this.service_id,
      26           3 :       weekdays: [
      27           3 :         this.monday,
      28           3 :         this.tuesday,
      29           3 :         this.wednesday,
      30           3 :         this.thursday,
      31           3 :         this.friday,
      32           3 :         this.saturday,
      33           3 :         this.sunday
      34             :       ],
      35           3 :       start_date: this.start_date,
      36           3 :       end_date: this.end_date,
      37             :     );
      38             :   }
      39             : }

Generated by: LCOV version 1.13