made end time optional on time entry
This commit is contained in:
@@ -8,7 +8,7 @@ class TimeEntry with _$TimeEntry {
|
||||
const factory TimeEntry({
|
||||
required String id,
|
||||
required DateTime startTime,
|
||||
required DateTime endTime,
|
||||
required DateTime? endTime,
|
||||
String? description,
|
||||
required String userId,
|
||||
required String projectId,
|
||||
@@ -25,7 +25,7 @@ class TimeEntryCreate with _$TimeEntryCreate {
|
||||
const factory TimeEntryCreate({
|
||||
String? id,
|
||||
required DateTime startTime,
|
||||
required DateTime endTime,
|
||||
DateTime? endTime,
|
||||
String? description,
|
||||
required String userId,
|
||||
required String projectId,
|
||||
|
||||
@@ -22,7 +22,7 @@ TimeEntry _$TimeEntryFromJson(Map<String, dynamic> json) {
|
||||
mixin _$TimeEntry {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
DateTime get startTime => throw _privateConstructorUsedError;
|
||||
DateTime get endTime => throw _privateConstructorUsedError;
|
||||
DateTime? get endTime => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
String get userId => throw _privateConstructorUsedError;
|
||||
String get projectId => throw _privateConstructorUsedError;
|
||||
@@ -47,7 +47,7 @@ abstract class $TimeEntryCopyWith<$Res> {
|
||||
$Res call(
|
||||
{String id,
|
||||
DateTime startTime,
|
||||
DateTime endTime,
|
||||
DateTime? endTime,
|
||||
String? description,
|
||||
String userId,
|
||||
String projectId,
|
||||
@@ -72,7 +72,7 @@ class _$TimeEntryCopyWithImpl<$Res, $Val extends TimeEntry>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? startTime = null,
|
||||
Object? endTime = null,
|
||||
Object? endTime = freezed,
|
||||
Object? description = freezed,
|
||||
Object? userId = null,
|
||||
Object? projectId = null,
|
||||
@@ -88,10 +88,10 @@ class _$TimeEntryCopyWithImpl<$Res, $Val extends TimeEntry>
|
||||
? _value.startTime
|
||||
: startTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endTime: null == endTime
|
||||
endTime: freezed == endTime
|
||||
? _value.endTime
|
||||
: endTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -127,7 +127,7 @@ abstract class _$$TimeEntryImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{String id,
|
||||
DateTime startTime,
|
||||
DateTime endTime,
|
||||
DateTime? endTime,
|
||||
String? description,
|
||||
String userId,
|
||||
String projectId,
|
||||
@@ -150,7 +150,7 @@ class __$$TimeEntryImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? startTime = null,
|
||||
Object? endTime = null,
|
||||
Object? endTime = freezed,
|
||||
Object? description = freezed,
|
||||
Object? userId = null,
|
||||
Object? projectId = null,
|
||||
@@ -166,10 +166,10 @@ class __$$TimeEntryImplCopyWithImpl<$Res>
|
||||
? _value.startTime
|
||||
: startTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endTime: null == endTime
|
||||
endTime: freezed == endTime
|
||||
? _value.endTime
|
||||
: endTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -215,7 +215,7 @@ class _$TimeEntryImpl implements _TimeEntry {
|
||||
@override
|
||||
final DateTime startTime;
|
||||
@override
|
||||
final DateTime endTime;
|
||||
final DateTime? endTime;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
@@ -277,7 +277,7 @@ abstract class _TimeEntry implements TimeEntry {
|
||||
const factory _TimeEntry(
|
||||
{required final String id,
|
||||
required final DateTime startTime,
|
||||
required final DateTime endTime,
|
||||
required final DateTime? endTime,
|
||||
final String? description,
|
||||
required final String userId,
|
||||
required final String projectId,
|
||||
@@ -292,7 +292,7 @@ abstract class _TimeEntry implements TimeEntry {
|
||||
@override
|
||||
DateTime get startTime;
|
||||
@override
|
||||
DateTime get endTime;
|
||||
DateTime? get endTime;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
@@ -320,7 +320,7 @@ TimeEntryCreate _$TimeEntryCreateFromJson(Map<String, dynamic> json) {
|
||||
mixin _$TimeEntryCreate {
|
||||
String? get id => throw _privateConstructorUsedError;
|
||||
DateTime get startTime => throw _privateConstructorUsedError;
|
||||
DateTime get endTime => throw _privateConstructorUsedError;
|
||||
DateTime? get endTime => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
String get userId => throw _privateConstructorUsedError;
|
||||
String get projectId => throw _privateConstructorUsedError;
|
||||
@@ -344,7 +344,7 @@ abstract class $TimeEntryCreateCopyWith<$Res> {
|
||||
$Res call(
|
||||
{String? id,
|
||||
DateTime startTime,
|
||||
DateTime endTime,
|
||||
DateTime? endTime,
|
||||
String? description,
|
||||
String userId,
|
||||
String projectId});
|
||||
@@ -367,7 +367,7 @@ class _$TimeEntryCreateCopyWithImpl<$Res, $Val extends TimeEntryCreate>
|
||||
$Res call({
|
||||
Object? id = freezed,
|
||||
Object? startTime = null,
|
||||
Object? endTime = null,
|
||||
Object? endTime = freezed,
|
||||
Object? description = freezed,
|
||||
Object? userId = null,
|
||||
Object? projectId = null,
|
||||
@@ -381,10 +381,10 @@ class _$TimeEntryCreateCopyWithImpl<$Res, $Val extends TimeEntryCreate>
|
||||
? _value.startTime
|
||||
: startTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endTime: null == endTime
|
||||
endTime: freezed == endTime
|
||||
? _value.endTime
|
||||
: endTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -412,7 +412,7 @@ abstract class _$$TimeEntryCreateImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{String? id,
|
||||
DateTime startTime,
|
||||
DateTime endTime,
|
||||
DateTime? endTime,
|
||||
String? description,
|
||||
String userId,
|
||||
String projectId});
|
||||
@@ -433,7 +433,7 @@ class __$$TimeEntryCreateImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? id = freezed,
|
||||
Object? startTime = null,
|
||||
Object? endTime = null,
|
||||
Object? endTime = freezed,
|
||||
Object? description = freezed,
|
||||
Object? userId = null,
|
||||
Object? projectId = null,
|
||||
@@ -447,10 +447,10 @@ class __$$TimeEntryCreateImplCopyWithImpl<$Res>
|
||||
? _value.startTime
|
||||
: startTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
endTime: null == endTime
|
||||
endTime: freezed == endTime
|
||||
? _value.endTime
|
||||
: endTime // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -473,7 +473,7 @@ class _$TimeEntryCreateImpl implements _TimeEntryCreate {
|
||||
const _$TimeEntryCreateImpl(
|
||||
{this.id,
|
||||
required this.startTime,
|
||||
required this.endTime,
|
||||
this.endTime,
|
||||
this.description,
|
||||
required this.userId,
|
||||
required this.projectId});
|
||||
@@ -486,7 +486,7 @@ class _$TimeEntryCreateImpl implements _TimeEntryCreate {
|
||||
@override
|
||||
final DateTime startTime;
|
||||
@override
|
||||
final DateTime endTime;
|
||||
final DateTime? endTime;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
@@ -541,7 +541,7 @@ abstract class _TimeEntryCreate implements TimeEntryCreate {
|
||||
const factory _TimeEntryCreate(
|
||||
{final String? id,
|
||||
required final DateTime startTime,
|
||||
required final DateTime endTime,
|
||||
final DateTime? endTime,
|
||||
final String? description,
|
||||
required final String userId,
|
||||
required final String projectId}) = _$TimeEntryCreateImpl;
|
||||
@@ -554,7 +554,7 @@ abstract class _TimeEntryCreate implements TimeEntryCreate {
|
||||
@override
|
||||
DateTime get startTime;
|
||||
@override
|
||||
DateTime get endTime;
|
||||
DateTime? get endTime;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
|
||||
@@ -10,7 +10,9 @@ _$TimeEntryImpl _$$TimeEntryImplFromJson(Map<String, dynamic> json) =>
|
||||
_$TimeEntryImpl(
|
||||
id: json['id'] as String,
|
||||
startTime: DateTime.parse(json['startTime'] as String),
|
||||
endTime: DateTime.parse(json['endTime'] as String),
|
||||
endTime: json['endTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json['endTime'] as String),
|
||||
description: json['description'] as String?,
|
||||
userId: json['userId'] as String,
|
||||
projectId: json['projectId'] as String,
|
||||
@@ -22,7 +24,7 @@ Map<String, dynamic> _$$TimeEntryImplToJson(_$TimeEntryImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'startTime': instance.startTime.toIso8601String(),
|
||||
'endTime': instance.endTime.toIso8601String(),
|
||||
'endTime': instance.endTime?.toIso8601String(),
|
||||
'description': instance.description,
|
||||
'userId': instance.userId,
|
||||
'projectId': instance.projectId,
|
||||
@@ -35,7 +37,9 @@ _$TimeEntryCreateImpl _$$TimeEntryCreateImplFromJson(
|
||||
_$TimeEntryCreateImpl(
|
||||
id: json['id'] as String?,
|
||||
startTime: DateTime.parse(json['startTime'] as String),
|
||||
endTime: DateTime.parse(json['endTime'] as String),
|
||||
endTime: json['endTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json['endTime'] as String),
|
||||
description: json['description'] as String?,
|
||||
userId: json['userId'] as String,
|
||||
projectId: json['projectId'] as String,
|
||||
@@ -46,7 +50,7 @@ Map<String, dynamic> _$$TimeEntryCreateImplToJson(
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'startTime': instance.startTime.toIso8601String(),
|
||||
'endTime': instance.endTime.toIso8601String(),
|
||||
'endTime': instance.endTime?.toIso8601String(),
|
||||
'description': instance.description,
|
||||
'userId': instance.userId,
|
||||
'projectId': instance.projectId,
|
||||
|
||||
Reference in New Issue
Block a user