Initial commit

This commit is contained in:
Kazimierz Ciołek
2026-02-19 02:49:29 +01:00
commit 782986a632
148 changed files with 29230 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'analysis_session.freezed.dart';
@freezed
class AnalysisSessionEntity with _$AnalysisSessionEntity {
const factory AnalysisSessionEntity({
required String id,
required String name,
required String date,
String? videoPath,
}) = _AnalysisSessionEntity;
}

View File

@@ -0,0 +1,219 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'analysis_session.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$AnalysisSessionEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get date => throw _privateConstructorUsedError;
String? get videoPath => throw _privateConstructorUsedError;
/// Create a copy of AnalysisSessionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$AnalysisSessionEntityCopyWith<AnalysisSessionEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AnalysisSessionEntityCopyWith<$Res> {
factory $AnalysisSessionEntityCopyWith(
AnalysisSessionEntity value,
$Res Function(AnalysisSessionEntity) then,
) = _$AnalysisSessionEntityCopyWithImpl<$Res, AnalysisSessionEntity>;
@useResult
$Res call({String id, String name, String date, String? videoPath});
}
/// @nodoc
class _$AnalysisSessionEntityCopyWithImpl<
$Res,
$Val extends AnalysisSessionEntity
>
implements $AnalysisSessionEntityCopyWith<$Res> {
_$AnalysisSessionEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AnalysisSessionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? date = null,
Object? videoPath = freezed,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
videoPath: freezed == videoPath
? _value.videoPath
: videoPath // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$AnalysisSessionEntityImplCopyWith<$Res>
implements $AnalysisSessionEntityCopyWith<$Res> {
factory _$$AnalysisSessionEntityImplCopyWith(
_$AnalysisSessionEntityImpl value,
$Res Function(_$AnalysisSessionEntityImpl) then,
) = __$$AnalysisSessionEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String name, String date, String? videoPath});
}
/// @nodoc
class __$$AnalysisSessionEntityImplCopyWithImpl<$Res>
extends
_$AnalysisSessionEntityCopyWithImpl<$Res, _$AnalysisSessionEntityImpl>
implements _$$AnalysisSessionEntityImplCopyWith<$Res> {
__$$AnalysisSessionEntityImplCopyWithImpl(
_$AnalysisSessionEntityImpl _value,
$Res Function(_$AnalysisSessionEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of AnalysisSessionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? date = null,
Object? videoPath = freezed,
}) {
return _then(
_$AnalysisSessionEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
videoPath: freezed == videoPath
? _value.videoPath
: videoPath // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
class _$AnalysisSessionEntityImpl implements _AnalysisSessionEntity {
const _$AnalysisSessionEntityImpl({
required this.id,
required this.name,
required this.date,
this.videoPath,
});
@override
final String id;
@override
final String name;
@override
final String date;
@override
final String? videoPath;
@override
String toString() {
return 'AnalysisSessionEntity(id: $id, name: $name, date: $date, videoPath: $videoPath)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AnalysisSessionEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.date, date) || other.date == date) &&
(identical(other.videoPath, videoPath) ||
other.videoPath == videoPath));
}
@override
int get hashCode => Object.hash(runtimeType, id, name, date, videoPath);
/// Create a copy of AnalysisSessionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AnalysisSessionEntityImplCopyWith<_$AnalysisSessionEntityImpl>
get copyWith =>
__$$AnalysisSessionEntityImplCopyWithImpl<_$AnalysisSessionEntityImpl>(
this,
_$identity,
);
}
abstract class _AnalysisSessionEntity implements AnalysisSessionEntity {
const factory _AnalysisSessionEntity({
required final String id,
required final String name,
required final String date,
final String? videoPath,
}) = _$AnalysisSessionEntityImpl;
@override
String get id;
@override
String get name;
@override
String get date;
@override
String? get videoPath;
/// Create a copy of AnalysisSessionEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AnalysisSessionEntityImplCopyWith<_$AnalysisSessionEntityImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'annotation.freezed.dart';
@freezed
class AnnotationEntity with _$AnnotationEntity {
const factory AnnotationEntity({
required String id,
required String sessionId,
required double startTime,
required double endTime,
String? name,
String? description,
String? color,
}) = _AnnotationEntity;
}

View File

@@ -0,0 +1,295 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'annotation.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$AnnotationEntity {
String get id => throw _privateConstructorUsedError;
String get sessionId => throw _privateConstructorUsedError;
double get startTime => throw _privateConstructorUsedError;
double get endTime => throw _privateConstructorUsedError;
String? get name => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
String? get color => throw _privateConstructorUsedError;
/// Create a copy of AnnotationEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$AnnotationEntityCopyWith<AnnotationEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AnnotationEntityCopyWith<$Res> {
factory $AnnotationEntityCopyWith(
AnnotationEntity value,
$Res Function(AnnotationEntity) then,
) = _$AnnotationEntityCopyWithImpl<$Res, AnnotationEntity>;
@useResult
$Res call({
String id,
String sessionId,
double startTime,
double endTime,
String? name,
String? description,
String? color,
});
}
/// @nodoc
class _$AnnotationEntityCopyWithImpl<$Res, $Val extends AnnotationEntity>
implements $AnnotationEntityCopyWith<$Res> {
_$AnnotationEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AnnotationEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? sessionId = null,
Object? startTime = null,
Object? endTime = null,
Object? name = freezed,
Object? description = freezed,
Object? color = freezed,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
sessionId: null == sessionId
? _value.sessionId
: sessionId // ignore: cast_nullable_to_non_nullable
as String,
startTime: null == startTime
? _value.startTime
: startTime // ignore: cast_nullable_to_non_nullable
as double,
endTime: null == endTime
? _value.endTime
: endTime // ignore: cast_nullable_to_non_nullable
as double,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
color: freezed == color
? _value.color
: color // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$AnnotationEntityImplCopyWith<$Res>
implements $AnnotationEntityCopyWith<$Res> {
factory _$$AnnotationEntityImplCopyWith(
_$AnnotationEntityImpl value,
$Res Function(_$AnnotationEntityImpl) then,
) = __$$AnnotationEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String sessionId,
double startTime,
double endTime,
String? name,
String? description,
String? color,
});
}
/// @nodoc
class __$$AnnotationEntityImplCopyWithImpl<$Res>
extends _$AnnotationEntityCopyWithImpl<$Res, _$AnnotationEntityImpl>
implements _$$AnnotationEntityImplCopyWith<$Res> {
__$$AnnotationEntityImplCopyWithImpl(
_$AnnotationEntityImpl _value,
$Res Function(_$AnnotationEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of AnnotationEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? sessionId = null,
Object? startTime = null,
Object? endTime = null,
Object? name = freezed,
Object? description = freezed,
Object? color = freezed,
}) {
return _then(
_$AnnotationEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
sessionId: null == sessionId
? _value.sessionId
: sessionId // ignore: cast_nullable_to_non_nullable
as String,
startTime: null == startTime
? _value.startTime
: startTime // ignore: cast_nullable_to_non_nullable
as double,
endTime: null == endTime
? _value.endTime
: endTime // ignore: cast_nullable_to_non_nullable
as double,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
color: freezed == color
? _value.color
: color // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
class _$AnnotationEntityImpl implements _AnnotationEntity {
const _$AnnotationEntityImpl({
required this.id,
required this.sessionId,
required this.startTime,
required this.endTime,
this.name,
this.description,
this.color,
});
@override
final String id;
@override
final String sessionId;
@override
final double startTime;
@override
final double endTime;
@override
final String? name;
@override
final String? description;
@override
final String? color;
@override
String toString() {
return 'AnnotationEntity(id: $id, sessionId: $sessionId, startTime: $startTime, endTime: $endTime, name: $name, description: $description, color: $color)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AnnotationEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.sessionId, sessionId) ||
other.sessionId == sessionId) &&
(identical(other.startTime, startTime) ||
other.startTime == startTime) &&
(identical(other.endTime, endTime) || other.endTime == endTime) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.color, color) || other.color == color));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
sessionId,
startTime,
endTime,
name,
description,
color,
);
/// Create a copy of AnnotationEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AnnotationEntityImplCopyWith<_$AnnotationEntityImpl> get copyWith =>
__$$AnnotationEntityImplCopyWithImpl<_$AnnotationEntityImpl>(
this,
_$identity,
);
}
abstract class _AnnotationEntity implements AnnotationEntity {
const factory _AnnotationEntity({
required final String id,
required final String sessionId,
required final double startTime,
required final double endTime,
final String? name,
final String? description,
final String? color,
}) = _$AnnotationEntityImpl;
@override
String get id;
@override
String get sessionId;
@override
double get startTime;
@override
double get endTime;
@override
String? get name;
@override
String? get description;
@override
String? get color;
/// Create a copy of AnnotationEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AnnotationEntityImplCopyWith<_$AnnotationEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,19 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_message.freezed.dart';
@freezed
class ChatMessageEntity with _$ChatMessageEntity {
const factory ChatMessageEntity({
required String id,
required String sessionId,
required String role,
required String content,
required String createdAt,
}) = _ChatMessageEntity;
const ChatMessageEntity._();
bool get isUser => role == 'user';
bool get isAssistant => role == 'assistant';
}

View File

@@ -0,0 +1,247 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'chat_message.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ChatMessageEntity {
String get id => throw _privateConstructorUsedError;
String get sessionId => throw _privateConstructorUsedError;
String get role => throw _privateConstructorUsedError;
String get content => throw _privateConstructorUsedError;
String get createdAt => throw _privateConstructorUsedError;
/// Create a copy of ChatMessageEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatMessageEntityCopyWith<ChatMessageEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatMessageEntityCopyWith<$Res> {
factory $ChatMessageEntityCopyWith(
ChatMessageEntity value,
$Res Function(ChatMessageEntity) then,
) = _$ChatMessageEntityCopyWithImpl<$Res, ChatMessageEntity>;
@useResult
$Res call({
String id,
String sessionId,
String role,
String content,
String createdAt,
});
}
/// @nodoc
class _$ChatMessageEntityCopyWithImpl<$Res, $Val extends ChatMessageEntity>
implements $ChatMessageEntityCopyWith<$Res> {
_$ChatMessageEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChatMessageEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? sessionId = null,
Object? role = null,
Object? content = null,
Object? createdAt = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
sessionId: null == sessionId
? _value.sessionId
: sessionId // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
content: null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ChatMessageEntityImplCopyWith<$Res>
implements $ChatMessageEntityCopyWith<$Res> {
factory _$$ChatMessageEntityImplCopyWith(
_$ChatMessageEntityImpl value,
$Res Function(_$ChatMessageEntityImpl) then,
) = __$$ChatMessageEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String sessionId,
String role,
String content,
String createdAt,
});
}
/// @nodoc
class __$$ChatMessageEntityImplCopyWithImpl<$Res>
extends _$ChatMessageEntityCopyWithImpl<$Res, _$ChatMessageEntityImpl>
implements _$$ChatMessageEntityImplCopyWith<$Res> {
__$$ChatMessageEntityImplCopyWithImpl(
_$ChatMessageEntityImpl _value,
$Res Function(_$ChatMessageEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ChatMessageEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? sessionId = null,
Object? role = null,
Object? content = null,
Object? createdAt = null,
}) {
return _then(
_$ChatMessageEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
sessionId: null == sessionId
? _value.sessionId
: sessionId // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
content: null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$ChatMessageEntityImpl extends _ChatMessageEntity {
const _$ChatMessageEntityImpl({
required this.id,
required this.sessionId,
required this.role,
required this.content,
required this.createdAt,
}) : super._();
@override
final String id;
@override
final String sessionId;
@override
final String role;
@override
final String content;
@override
final String createdAt;
@override
String toString() {
return 'ChatMessageEntity(id: $id, sessionId: $sessionId, role: $role, content: $content, createdAt: $createdAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatMessageEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.sessionId, sessionId) ||
other.sessionId == sessionId) &&
(identical(other.role, role) || other.role == role) &&
(identical(other.content, content) || other.content == content) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt));
}
@override
int get hashCode =>
Object.hash(runtimeType, id, sessionId, role, content, createdAt);
/// Create a copy of ChatMessageEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatMessageEntityImplCopyWith<_$ChatMessageEntityImpl> get copyWith =>
__$$ChatMessageEntityImplCopyWithImpl<_$ChatMessageEntityImpl>(
this,
_$identity,
);
}
abstract class _ChatMessageEntity extends ChatMessageEntity {
const factory _ChatMessageEntity({
required final String id,
required final String sessionId,
required final String role,
required final String content,
required final String createdAt,
}) = _$ChatMessageEntityImpl;
const _ChatMessageEntity._() : super._();
@override
String get id;
@override
String get sessionId;
@override
String get role;
@override
String get content;
@override
String get createdAt;
/// Create a copy of ChatMessageEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMessageEntityImplCopyWith<_$ChatMessageEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_session.freezed.dart';
@freezed
class ChatSessionEntity with _$ChatSessionEntity {
const factory ChatSessionEntity({
required String id,
String? title,
required String createdAt,
required String updatedAt,
}) = _ChatSessionEntity;
}

View File

@@ -0,0 +1,215 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'chat_session.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ChatSessionEntity {
String get id => throw _privateConstructorUsedError;
String? get title => throw _privateConstructorUsedError;
String get createdAt => throw _privateConstructorUsedError;
String get updatedAt => throw _privateConstructorUsedError;
/// Create a copy of ChatSessionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatSessionEntityCopyWith<ChatSessionEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatSessionEntityCopyWith<$Res> {
factory $ChatSessionEntityCopyWith(
ChatSessionEntity value,
$Res Function(ChatSessionEntity) then,
) = _$ChatSessionEntityCopyWithImpl<$Res, ChatSessionEntity>;
@useResult
$Res call({String id, String? title, String createdAt, String updatedAt});
}
/// @nodoc
class _$ChatSessionEntityCopyWithImpl<$Res, $Val extends ChatSessionEntity>
implements $ChatSessionEntityCopyWith<$Res> {
_$ChatSessionEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChatSessionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = freezed,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ChatSessionEntityImplCopyWith<$Res>
implements $ChatSessionEntityCopyWith<$Res> {
factory _$$ChatSessionEntityImplCopyWith(
_$ChatSessionEntityImpl value,
$Res Function(_$ChatSessionEntityImpl) then,
) = __$$ChatSessionEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String? title, String createdAt, String updatedAt});
}
/// @nodoc
class __$$ChatSessionEntityImplCopyWithImpl<$Res>
extends _$ChatSessionEntityCopyWithImpl<$Res, _$ChatSessionEntityImpl>
implements _$$ChatSessionEntityImplCopyWith<$Res> {
__$$ChatSessionEntityImplCopyWithImpl(
_$ChatSessionEntityImpl _value,
$Res Function(_$ChatSessionEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ChatSessionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = freezed,
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_$ChatSessionEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$ChatSessionEntityImpl implements _ChatSessionEntity {
const _$ChatSessionEntityImpl({
required this.id,
this.title,
required this.createdAt,
required this.updatedAt,
});
@override
final String id;
@override
final String? title;
@override
final String createdAt;
@override
final String updatedAt;
@override
String toString() {
return 'ChatSessionEntity(id: $id, title: $title, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatSessionEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@override
int get hashCode => Object.hash(runtimeType, id, title, createdAt, updatedAt);
/// Create a copy of ChatSessionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatSessionEntityImplCopyWith<_$ChatSessionEntityImpl> get copyWith =>
__$$ChatSessionEntityImplCopyWithImpl<_$ChatSessionEntityImpl>(
this,
_$identity,
);
}
abstract class _ChatSessionEntity implements ChatSessionEntity {
const factory _ChatSessionEntity({
required final String id,
final String? title,
required final String createdAt,
required final String updatedAt,
}) = _$ChatSessionEntityImpl;
@override
String get id;
@override
String? get title;
@override
String get createdAt;
@override
String get updatedAt;
/// Create a copy of ChatSessionEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatSessionEntityImplCopyWith<_$ChatSessionEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'exercise.freezed.dart';
@freezed
class ExerciseEntity with _$ExerciseEntity {
const factory ExerciseEntity({
required String id,
required String name,
String? instructions,
String? enrichment,
String? tags,
String? videoUrl,
String? muscleGroup,
}) = _ExerciseEntity;
}

View File

@@ -0,0 +1,296 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'exercise.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ExerciseEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String? get instructions => throw _privateConstructorUsedError;
String? get enrichment => throw _privateConstructorUsedError;
String? get tags => throw _privateConstructorUsedError;
String? get videoUrl => throw _privateConstructorUsedError;
String? get muscleGroup => throw _privateConstructorUsedError;
/// Create a copy of ExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ExerciseEntityCopyWith<ExerciseEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ExerciseEntityCopyWith<$Res> {
factory $ExerciseEntityCopyWith(
ExerciseEntity value,
$Res Function(ExerciseEntity) then,
) = _$ExerciseEntityCopyWithImpl<$Res, ExerciseEntity>;
@useResult
$Res call({
String id,
String name,
String? instructions,
String? enrichment,
String? tags,
String? videoUrl,
String? muscleGroup,
});
}
/// @nodoc
class _$ExerciseEntityCopyWithImpl<$Res, $Val extends ExerciseEntity>
implements $ExerciseEntityCopyWith<$Res> {
_$ExerciseEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? instructions = freezed,
Object? enrichment = freezed,
Object? tags = freezed,
Object? videoUrl = freezed,
Object? muscleGroup = freezed,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
instructions: freezed == instructions
? _value.instructions
: instructions // ignore: cast_nullable_to_non_nullable
as String?,
enrichment: freezed == enrichment
? _value.enrichment
: enrichment // ignore: cast_nullable_to_non_nullable
as String?,
tags: freezed == tags
? _value.tags
: tags // ignore: cast_nullable_to_non_nullable
as String?,
videoUrl: freezed == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String?,
muscleGroup: freezed == muscleGroup
? _value.muscleGroup
: muscleGroup // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ExerciseEntityImplCopyWith<$Res>
implements $ExerciseEntityCopyWith<$Res> {
factory _$$ExerciseEntityImplCopyWith(
_$ExerciseEntityImpl value,
$Res Function(_$ExerciseEntityImpl) then,
) = __$$ExerciseEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String name,
String? instructions,
String? enrichment,
String? tags,
String? videoUrl,
String? muscleGroup,
});
}
/// @nodoc
class __$$ExerciseEntityImplCopyWithImpl<$Res>
extends _$ExerciseEntityCopyWithImpl<$Res, _$ExerciseEntityImpl>
implements _$$ExerciseEntityImplCopyWith<$Res> {
__$$ExerciseEntityImplCopyWithImpl(
_$ExerciseEntityImpl _value,
$Res Function(_$ExerciseEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? instructions = freezed,
Object? enrichment = freezed,
Object? tags = freezed,
Object? videoUrl = freezed,
Object? muscleGroup = freezed,
}) {
return _then(
_$ExerciseEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
instructions: freezed == instructions
? _value.instructions
: instructions // ignore: cast_nullable_to_non_nullable
as String?,
enrichment: freezed == enrichment
? _value.enrichment
: enrichment // ignore: cast_nullable_to_non_nullable
as String?,
tags: freezed == tags
? _value.tags
: tags // ignore: cast_nullable_to_non_nullable
as String?,
videoUrl: freezed == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String?,
muscleGroup: freezed == muscleGroup
? _value.muscleGroup
: muscleGroup // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
class _$ExerciseEntityImpl implements _ExerciseEntity {
const _$ExerciseEntityImpl({
required this.id,
required this.name,
this.instructions,
this.enrichment,
this.tags,
this.videoUrl,
this.muscleGroup,
});
@override
final String id;
@override
final String name;
@override
final String? instructions;
@override
final String? enrichment;
@override
final String? tags;
@override
final String? videoUrl;
@override
final String? muscleGroup;
@override
String toString() {
return 'ExerciseEntity(id: $id, name: $name, instructions: $instructions, enrichment: $enrichment, tags: $tags, videoUrl: $videoUrl, muscleGroup: $muscleGroup)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ExerciseEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.instructions, instructions) ||
other.instructions == instructions) &&
(identical(other.enrichment, enrichment) ||
other.enrichment == enrichment) &&
(identical(other.tags, tags) || other.tags == tags) &&
(identical(other.videoUrl, videoUrl) ||
other.videoUrl == videoUrl) &&
(identical(other.muscleGroup, muscleGroup) ||
other.muscleGroup == muscleGroup));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
instructions,
enrichment,
tags,
videoUrl,
muscleGroup,
);
/// Create a copy of ExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ExerciseEntityImplCopyWith<_$ExerciseEntityImpl> get copyWith =>
__$$ExerciseEntityImplCopyWithImpl<_$ExerciseEntityImpl>(
this,
_$identity,
);
}
abstract class _ExerciseEntity implements ExerciseEntity {
const factory _ExerciseEntity({
required final String id,
required final String name,
final String? instructions,
final String? enrichment,
final String? tags,
final String? videoUrl,
final String? muscleGroup,
}) = _$ExerciseEntityImpl;
@override
String get id;
@override
String get name;
@override
String? get instructions;
@override
String? get enrichment;
@override
String? get tags;
@override
String? get videoUrl;
@override
String? get muscleGroup;
/// Create a copy of ExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ExerciseEntityImplCopyWith<_$ExerciseEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,12 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'program.freezed.dart';
@freezed
class ProgramEntity with _$ProgramEntity {
const factory ProgramEntity({
required String id,
required String name,
required String createdAt,
}) = _ProgramEntity;
}

View File

@@ -0,0 +1,193 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'program.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ProgramEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get createdAt => throw _privateConstructorUsedError;
/// Create a copy of ProgramEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProgramEntityCopyWith<ProgramEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProgramEntityCopyWith<$Res> {
factory $ProgramEntityCopyWith(
ProgramEntity value,
$Res Function(ProgramEntity) then,
) = _$ProgramEntityCopyWithImpl<$Res, ProgramEntity>;
@useResult
$Res call({String id, String name, String createdAt});
}
/// @nodoc
class _$ProgramEntityCopyWithImpl<$Res, $Val extends ProgramEntity>
implements $ProgramEntityCopyWith<$Res> {
_$ProgramEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProgramEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? createdAt = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProgramEntityImplCopyWith<$Res>
implements $ProgramEntityCopyWith<$Res> {
factory _$$ProgramEntityImplCopyWith(
_$ProgramEntityImpl value,
$Res Function(_$ProgramEntityImpl) then,
) = __$$ProgramEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String name, String createdAt});
}
/// @nodoc
class __$$ProgramEntityImplCopyWithImpl<$Res>
extends _$ProgramEntityCopyWithImpl<$Res, _$ProgramEntityImpl>
implements _$$ProgramEntityImplCopyWith<$Res> {
__$$ProgramEntityImplCopyWithImpl(
_$ProgramEntityImpl _value,
$Res Function(_$ProgramEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ProgramEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? createdAt = null,
}) {
return _then(
_$ProgramEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$ProgramEntityImpl implements _ProgramEntity {
const _$ProgramEntityImpl({
required this.id,
required this.name,
required this.createdAt,
});
@override
final String id;
@override
final String name;
@override
final String createdAt;
@override
String toString() {
return 'ProgramEntity(id: $id, name: $name, createdAt: $createdAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProgramEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt));
}
@override
int get hashCode => Object.hash(runtimeType, id, name, createdAt);
/// Create a copy of ProgramEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProgramEntityImplCopyWith<_$ProgramEntityImpl> get copyWith =>
__$$ProgramEntityImplCopyWithImpl<_$ProgramEntityImpl>(this, _$identity);
}
abstract class _ProgramEntity implements ProgramEntity {
const factory _ProgramEntity({
required final String id,
required final String name,
required final String createdAt,
}) = _$ProgramEntityImpl;
@override
String get id;
@override
String get name;
@override
String get createdAt;
/// Create a copy of ProgramEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProgramEntityImplCopyWith<_$ProgramEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'program_week.freezed.dart';
@freezed
class ProgramWeekEntity with _$ProgramWeekEntity {
const factory ProgramWeekEntity({
required String id,
required String programId,
required int position,
String? notes,
}) = _ProgramWeekEntity;
}

View File

@@ -0,0 +1,215 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'program_week.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ProgramWeekEntity {
String get id => throw _privateConstructorUsedError;
String get programId => throw _privateConstructorUsedError;
int get position => throw _privateConstructorUsedError;
String? get notes => throw _privateConstructorUsedError;
/// Create a copy of ProgramWeekEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProgramWeekEntityCopyWith<ProgramWeekEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProgramWeekEntityCopyWith<$Res> {
factory $ProgramWeekEntityCopyWith(
ProgramWeekEntity value,
$Res Function(ProgramWeekEntity) then,
) = _$ProgramWeekEntityCopyWithImpl<$Res, ProgramWeekEntity>;
@useResult
$Res call({String id, String programId, int position, String? notes});
}
/// @nodoc
class _$ProgramWeekEntityCopyWithImpl<$Res, $Val extends ProgramWeekEntity>
implements $ProgramWeekEntityCopyWith<$Res> {
_$ProgramWeekEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProgramWeekEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? programId = null,
Object? position = null,
Object? notes = freezed,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
programId: null == programId
? _value.programId
: programId // ignore: cast_nullable_to_non_nullable
as String,
position: null == position
? _value.position
: position // ignore: cast_nullable_to_non_nullable
as int,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProgramWeekEntityImplCopyWith<$Res>
implements $ProgramWeekEntityCopyWith<$Res> {
factory _$$ProgramWeekEntityImplCopyWith(
_$ProgramWeekEntityImpl value,
$Res Function(_$ProgramWeekEntityImpl) then,
) = __$$ProgramWeekEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String programId, int position, String? notes});
}
/// @nodoc
class __$$ProgramWeekEntityImplCopyWithImpl<$Res>
extends _$ProgramWeekEntityCopyWithImpl<$Res, _$ProgramWeekEntityImpl>
implements _$$ProgramWeekEntityImplCopyWith<$Res> {
__$$ProgramWeekEntityImplCopyWithImpl(
_$ProgramWeekEntityImpl _value,
$Res Function(_$ProgramWeekEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ProgramWeekEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? programId = null,
Object? position = null,
Object? notes = freezed,
}) {
return _then(
_$ProgramWeekEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
programId: null == programId
? _value.programId
: programId // ignore: cast_nullable_to_non_nullable
as String,
position: null == position
? _value.position
: position // ignore: cast_nullable_to_non_nullable
as int,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
class _$ProgramWeekEntityImpl implements _ProgramWeekEntity {
const _$ProgramWeekEntityImpl({
required this.id,
required this.programId,
required this.position,
this.notes,
});
@override
final String id;
@override
final String programId;
@override
final int position;
@override
final String? notes;
@override
String toString() {
return 'ProgramWeekEntity(id: $id, programId: $programId, position: $position, notes: $notes)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProgramWeekEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.programId, programId) ||
other.programId == programId) &&
(identical(other.position, position) ||
other.position == position) &&
(identical(other.notes, notes) || other.notes == notes));
}
@override
int get hashCode => Object.hash(runtimeType, id, programId, position, notes);
/// Create a copy of ProgramWeekEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProgramWeekEntityImplCopyWith<_$ProgramWeekEntityImpl> get copyWith =>
__$$ProgramWeekEntityImplCopyWithImpl<_$ProgramWeekEntityImpl>(
this,
_$identity,
);
}
abstract class _ProgramWeekEntity implements ProgramWeekEntity {
const factory _ProgramWeekEntity({
required final String id,
required final String programId,
required final int position,
final String? notes,
}) = _$ProgramWeekEntityImpl;
@override
String get id;
@override
String get programId;
@override
int get position;
@override
String? get notes;
/// Create a copy of ProgramWeekEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProgramWeekEntityImplCopyWith<_$ProgramWeekEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,18 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'program_workout.freezed.dart';
@freezed
class ProgramWorkoutEntity with _$ProgramWorkoutEntity {
const factory ProgramWorkoutEntity({
required String id,
required String weekId,
required String programId,
required String day,
required String type,
String? refId,
String? name,
String? description,
@Default(false) bool completed,
}) = _ProgramWorkoutEntity;
}

View File

@@ -0,0 +1,342 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'program_workout.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$ProgramWorkoutEntity {
String get id => throw _privateConstructorUsedError;
String get weekId => throw _privateConstructorUsedError;
String get programId => throw _privateConstructorUsedError;
String get day => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
String? get refId => throw _privateConstructorUsedError;
String? get name => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
bool get completed => throw _privateConstructorUsedError;
/// Create a copy of ProgramWorkoutEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProgramWorkoutEntityCopyWith<ProgramWorkoutEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProgramWorkoutEntityCopyWith<$Res> {
factory $ProgramWorkoutEntityCopyWith(
ProgramWorkoutEntity value,
$Res Function(ProgramWorkoutEntity) then,
) = _$ProgramWorkoutEntityCopyWithImpl<$Res, ProgramWorkoutEntity>;
@useResult
$Res call({
String id,
String weekId,
String programId,
String day,
String type,
String? refId,
String? name,
String? description,
bool completed,
});
}
/// @nodoc
class _$ProgramWorkoutEntityCopyWithImpl<
$Res,
$Val extends ProgramWorkoutEntity
>
implements $ProgramWorkoutEntityCopyWith<$Res> {
_$ProgramWorkoutEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProgramWorkoutEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? weekId = null,
Object? programId = null,
Object? day = null,
Object? type = null,
Object? refId = freezed,
Object? name = freezed,
Object? description = freezed,
Object? completed = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
weekId: null == weekId
? _value.weekId
: weekId // ignore: cast_nullable_to_non_nullable
as String,
programId: null == programId
? _value.programId
: programId // ignore: cast_nullable_to_non_nullable
as String,
day: null == day
? _value.day
: day // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
refId: freezed == refId
? _value.refId
: refId // ignore: cast_nullable_to_non_nullable
as String?,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
completed: null == completed
? _value.completed
: completed // ignore: cast_nullable_to_non_nullable
as bool,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProgramWorkoutEntityImplCopyWith<$Res>
implements $ProgramWorkoutEntityCopyWith<$Res> {
factory _$$ProgramWorkoutEntityImplCopyWith(
_$ProgramWorkoutEntityImpl value,
$Res Function(_$ProgramWorkoutEntityImpl) then,
) = __$$ProgramWorkoutEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String weekId,
String programId,
String day,
String type,
String? refId,
String? name,
String? description,
bool completed,
});
}
/// @nodoc
class __$$ProgramWorkoutEntityImplCopyWithImpl<$Res>
extends _$ProgramWorkoutEntityCopyWithImpl<$Res, _$ProgramWorkoutEntityImpl>
implements _$$ProgramWorkoutEntityImplCopyWith<$Res> {
__$$ProgramWorkoutEntityImplCopyWithImpl(
_$ProgramWorkoutEntityImpl _value,
$Res Function(_$ProgramWorkoutEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of ProgramWorkoutEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? weekId = null,
Object? programId = null,
Object? day = null,
Object? type = null,
Object? refId = freezed,
Object? name = freezed,
Object? description = freezed,
Object? completed = null,
}) {
return _then(
_$ProgramWorkoutEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
weekId: null == weekId
? _value.weekId
: weekId // ignore: cast_nullable_to_non_nullable
as String,
programId: null == programId
? _value.programId
: programId // ignore: cast_nullable_to_non_nullable
as String,
day: null == day
? _value.day
: day // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
refId: freezed == refId
? _value.refId
: refId // ignore: cast_nullable_to_non_nullable
as String?,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
completed: null == completed
? _value.completed
: completed // ignore: cast_nullable_to_non_nullable
as bool,
),
);
}
}
/// @nodoc
class _$ProgramWorkoutEntityImpl implements _ProgramWorkoutEntity {
const _$ProgramWorkoutEntityImpl({
required this.id,
required this.weekId,
required this.programId,
required this.day,
required this.type,
this.refId,
this.name,
this.description,
this.completed = false,
});
@override
final String id;
@override
final String weekId;
@override
final String programId;
@override
final String day;
@override
final String type;
@override
final String? refId;
@override
final String? name;
@override
final String? description;
@override
@JsonKey()
final bool completed;
@override
String toString() {
return 'ProgramWorkoutEntity(id: $id, weekId: $weekId, programId: $programId, day: $day, type: $type, refId: $refId, name: $name, description: $description, completed: $completed)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProgramWorkoutEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.weekId, weekId) || other.weekId == weekId) &&
(identical(other.programId, programId) ||
other.programId == programId) &&
(identical(other.day, day) || other.day == day) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.refId, refId) || other.refId == refId) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.completed, completed) ||
other.completed == completed));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
weekId,
programId,
day,
type,
refId,
name,
description,
completed,
);
/// Create a copy of ProgramWorkoutEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProgramWorkoutEntityImplCopyWith<_$ProgramWorkoutEntityImpl>
get copyWith =>
__$$ProgramWorkoutEntityImplCopyWithImpl<_$ProgramWorkoutEntityImpl>(
this,
_$identity,
);
}
abstract class _ProgramWorkoutEntity implements ProgramWorkoutEntity {
const factory _ProgramWorkoutEntity({
required final String id,
required final String weekId,
required final String programId,
required final String day,
required final String type,
final String? refId,
final String? name,
final String? description,
final bool completed,
}) = _$ProgramWorkoutEntityImpl;
@override
String get id;
@override
String get weekId;
@override
String get programId;
@override
String get day;
@override
String get type;
@override
String? get refId;
@override
String? get name;
@override
String? get description;
@override
bool get completed;
/// Create a copy of ProgramWorkoutEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProgramWorkoutEntityImplCopyWith<_$ProgramWorkoutEntityImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'training_exercise.freezed.dart';
@freezed
class TrainingExerciseEntity with _$TrainingExerciseEntity {
const factory TrainingExerciseEntity({
required String instanceId,
required String exerciseId,
required String name,
@Default(3) int sets,
@Default(10) int value,
@Default(false) bool isTime,
@Default(60) int rest,
}) = _TrainingExerciseEntity;
}

View File

@@ -0,0 +1,303 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'training_exercise.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$TrainingExerciseEntity {
String get instanceId => throw _privateConstructorUsedError;
String get exerciseId => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
int get sets => throw _privateConstructorUsedError;
int get value => throw _privateConstructorUsedError;
bool get isTime => throw _privateConstructorUsedError;
int get rest => throw _privateConstructorUsedError;
/// Create a copy of TrainingExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TrainingExerciseEntityCopyWith<TrainingExerciseEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrainingExerciseEntityCopyWith<$Res> {
factory $TrainingExerciseEntityCopyWith(
TrainingExerciseEntity value,
$Res Function(TrainingExerciseEntity) then,
) = _$TrainingExerciseEntityCopyWithImpl<$Res, TrainingExerciseEntity>;
@useResult
$Res call({
String instanceId,
String exerciseId,
String name,
int sets,
int value,
bool isTime,
int rest,
});
}
/// @nodoc
class _$TrainingExerciseEntityCopyWithImpl<
$Res,
$Val extends TrainingExerciseEntity
>
implements $TrainingExerciseEntityCopyWith<$Res> {
_$TrainingExerciseEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of TrainingExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? instanceId = null,
Object? exerciseId = null,
Object? name = null,
Object? sets = null,
Object? value = null,
Object? isTime = null,
Object? rest = null,
}) {
return _then(
_value.copyWith(
instanceId: null == instanceId
? _value.instanceId
: instanceId // ignore: cast_nullable_to_non_nullable
as String,
exerciseId: null == exerciseId
? _value.exerciseId
: exerciseId // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
sets: null == sets
? _value.sets
: sets // ignore: cast_nullable_to_non_nullable
as int,
value: null == value
? _value.value
: value // ignore: cast_nullable_to_non_nullable
as int,
isTime: null == isTime
? _value.isTime
: isTime // ignore: cast_nullable_to_non_nullable
as bool,
rest: null == rest
? _value.rest
: rest // ignore: cast_nullable_to_non_nullable
as int,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$TrainingExerciseEntityImplCopyWith<$Res>
implements $TrainingExerciseEntityCopyWith<$Res> {
factory _$$TrainingExerciseEntityImplCopyWith(
_$TrainingExerciseEntityImpl value,
$Res Function(_$TrainingExerciseEntityImpl) then,
) = __$$TrainingExerciseEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String instanceId,
String exerciseId,
String name,
int sets,
int value,
bool isTime,
int rest,
});
}
/// @nodoc
class __$$TrainingExerciseEntityImplCopyWithImpl<$Res>
extends
_$TrainingExerciseEntityCopyWithImpl<$Res, _$TrainingExerciseEntityImpl>
implements _$$TrainingExerciseEntityImplCopyWith<$Res> {
__$$TrainingExerciseEntityImplCopyWithImpl(
_$TrainingExerciseEntityImpl _value,
$Res Function(_$TrainingExerciseEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of TrainingExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? instanceId = null,
Object? exerciseId = null,
Object? name = null,
Object? sets = null,
Object? value = null,
Object? isTime = null,
Object? rest = null,
}) {
return _then(
_$TrainingExerciseEntityImpl(
instanceId: null == instanceId
? _value.instanceId
: instanceId // ignore: cast_nullable_to_non_nullable
as String,
exerciseId: null == exerciseId
? _value.exerciseId
: exerciseId // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
sets: null == sets
? _value.sets
: sets // ignore: cast_nullable_to_non_nullable
as int,
value: null == value
? _value.value
: value // ignore: cast_nullable_to_non_nullable
as int,
isTime: null == isTime
? _value.isTime
: isTime // ignore: cast_nullable_to_non_nullable
as bool,
rest: null == rest
? _value.rest
: rest // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// @nodoc
class _$TrainingExerciseEntityImpl implements _TrainingExerciseEntity {
const _$TrainingExerciseEntityImpl({
required this.instanceId,
required this.exerciseId,
required this.name,
this.sets = 3,
this.value = 10,
this.isTime = false,
this.rest = 60,
});
@override
final String instanceId;
@override
final String exerciseId;
@override
final String name;
@override
@JsonKey()
final int sets;
@override
@JsonKey()
final int value;
@override
@JsonKey()
final bool isTime;
@override
@JsonKey()
final int rest;
@override
String toString() {
return 'TrainingExerciseEntity(instanceId: $instanceId, exerciseId: $exerciseId, name: $name, sets: $sets, value: $value, isTime: $isTime, rest: $rest)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TrainingExerciseEntityImpl &&
(identical(other.instanceId, instanceId) ||
other.instanceId == instanceId) &&
(identical(other.exerciseId, exerciseId) ||
other.exerciseId == exerciseId) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.sets, sets) || other.sets == sets) &&
(identical(other.value, value) || other.value == value) &&
(identical(other.isTime, isTime) || other.isTime == isTime) &&
(identical(other.rest, rest) || other.rest == rest));
}
@override
int get hashCode => Object.hash(
runtimeType,
instanceId,
exerciseId,
name,
sets,
value,
isTime,
rest,
);
/// Create a copy of TrainingExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TrainingExerciseEntityImplCopyWith<_$TrainingExerciseEntityImpl>
get copyWith =>
__$$TrainingExerciseEntityImplCopyWithImpl<_$TrainingExerciseEntityImpl>(
this,
_$identity,
);
}
abstract class _TrainingExerciseEntity implements TrainingExerciseEntity {
const factory _TrainingExerciseEntity({
required final String instanceId,
required final String exerciseId,
required final String name,
final int sets,
final int value,
final bool isTime,
final int rest,
}) = _$TrainingExerciseEntityImpl;
@override
String get instanceId;
@override
String get exerciseId;
@override
String get name;
@override
int get sets;
@override
int get value;
@override
bool get isTime;
@override
int get rest;
/// Create a copy of TrainingExerciseEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TrainingExerciseEntityImplCopyWith<_$TrainingExerciseEntityImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,18 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:trainhub_flutter/domain/entities/training_section.dart';
part 'training_plan.freezed.dart';
@freezed
class TrainingPlanEntity with _$TrainingPlanEntity {
const factory TrainingPlanEntity({
required String id,
required String name,
@Default([]) List<TrainingSectionEntity> sections,
}) = _TrainingPlanEntity;
const TrainingPlanEntity._();
int get totalExercises =>
sections.fold(0, (sum, s) => sum + s.exercises.length);
}

View File

@@ -0,0 +1,201 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'training_plan.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$TrainingPlanEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
List<TrainingSectionEntity> get sections =>
throw _privateConstructorUsedError;
/// Create a copy of TrainingPlanEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TrainingPlanEntityCopyWith<TrainingPlanEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrainingPlanEntityCopyWith<$Res> {
factory $TrainingPlanEntityCopyWith(
TrainingPlanEntity value,
$Res Function(TrainingPlanEntity) then,
) = _$TrainingPlanEntityCopyWithImpl<$Res, TrainingPlanEntity>;
@useResult
$Res call({String id, String name, List<TrainingSectionEntity> sections});
}
/// @nodoc
class _$TrainingPlanEntityCopyWithImpl<$Res, $Val extends TrainingPlanEntity>
implements $TrainingPlanEntityCopyWith<$Res> {
_$TrainingPlanEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of TrainingPlanEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? id = null, Object? name = null, Object? sections = null}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
sections: null == sections
? _value.sections
: sections // ignore: cast_nullable_to_non_nullable
as List<TrainingSectionEntity>,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$TrainingPlanEntityImplCopyWith<$Res>
implements $TrainingPlanEntityCopyWith<$Res> {
factory _$$TrainingPlanEntityImplCopyWith(
_$TrainingPlanEntityImpl value,
$Res Function(_$TrainingPlanEntityImpl) then,
) = __$$TrainingPlanEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String name, List<TrainingSectionEntity> sections});
}
/// @nodoc
class __$$TrainingPlanEntityImplCopyWithImpl<$Res>
extends _$TrainingPlanEntityCopyWithImpl<$Res, _$TrainingPlanEntityImpl>
implements _$$TrainingPlanEntityImplCopyWith<$Res> {
__$$TrainingPlanEntityImplCopyWithImpl(
_$TrainingPlanEntityImpl _value,
$Res Function(_$TrainingPlanEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of TrainingPlanEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? id = null, Object? name = null, Object? sections = null}) {
return _then(
_$TrainingPlanEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
sections: null == sections
? _value._sections
: sections // ignore: cast_nullable_to_non_nullable
as List<TrainingSectionEntity>,
),
);
}
}
/// @nodoc
class _$TrainingPlanEntityImpl extends _TrainingPlanEntity {
const _$TrainingPlanEntityImpl({
required this.id,
required this.name,
final List<TrainingSectionEntity> sections = const [],
}) : _sections = sections,
super._();
@override
final String id;
@override
final String name;
final List<TrainingSectionEntity> _sections;
@override
@JsonKey()
List<TrainingSectionEntity> get sections {
if (_sections is EqualUnmodifiableListView) return _sections;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_sections);
}
@override
String toString() {
return 'TrainingPlanEntity(id: $id, name: $name, sections: $sections)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TrainingPlanEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
const DeepCollectionEquality().equals(other._sections, _sections));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
const DeepCollectionEquality().hash(_sections),
);
/// Create a copy of TrainingPlanEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TrainingPlanEntityImplCopyWith<_$TrainingPlanEntityImpl> get copyWith =>
__$$TrainingPlanEntityImplCopyWithImpl<_$TrainingPlanEntityImpl>(
this,
_$identity,
);
}
abstract class _TrainingPlanEntity extends TrainingPlanEntity {
const factory _TrainingPlanEntity({
required final String id,
required final String name,
final List<TrainingSectionEntity> sections,
}) = _$TrainingPlanEntityImpl;
const _TrainingPlanEntity._() : super._();
@override
String get id;
@override
String get name;
@override
List<TrainingSectionEntity> get sections;
/// Create a copy of TrainingPlanEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TrainingPlanEntityImplCopyWith<_$TrainingPlanEntityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:trainhub_flutter/domain/entities/training_exercise.dart';
part 'training_section.freezed.dart';
@freezed
class TrainingSectionEntity with _$TrainingSectionEntity {
const factory TrainingSectionEntity({
required String id,
required String name,
@Default([]) List<TrainingExerciseEntity> exercises,
}) = _TrainingSectionEntity;
}

View File

@@ -0,0 +1,215 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'training_section.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$TrainingSectionEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
List<TrainingExerciseEntity> get exercises =>
throw _privateConstructorUsedError;
/// Create a copy of TrainingSectionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TrainingSectionEntityCopyWith<TrainingSectionEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrainingSectionEntityCopyWith<$Res> {
factory $TrainingSectionEntityCopyWith(
TrainingSectionEntity value,
$Res Function(TrainingSectionEntity) then,
) = _$TrainingSectionEntityCopyWithImpl<$Res, TrainingSectionEntity>;
@useResult
$Res call({String id, String name, List<TrainingExerciseEntity> exercises});
}
/// @nodoc
class _$TrainingSectionEntityCopyWithImpl<
$Res,
$Val extends TrainingSectionEntity
>
implements $TrainingSectionEntityCopyWith<$Res> {
_$TrainingSectionEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of TrainingSectionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? exercises = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
exercises: null == exercises
? _value.exercises
: exercises // ignore: cast_nullable_to_non_nullable
as List<TrainingExerciseEntity>,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$TrainingSectionEntityImplCopyWith<$Res>
implements $TrainingSectionEntityCopyWith<$Res> {
factory _$$TrainingSectionEntityImplCopyWith(
_$TrainingSectionEntityImpl value,
$Res Function(_$TrainingSectionEntityImpl) then,
) = __$$TrainingSectionEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String id, String name, List<TrainingExerciseEntity> exercises});
}
/// @nodoc
class __$$TrainingSectionEntityImplCopyWithImpl<$Res>
extends
_$TrainingSectionEntityCopyWithImpl<$Res, _$TrainingSectionEntityImpl>
implements _$$TrainingSectionEntityImplCopyWith<$Res> {
__$$TrainingSectionEntityImplCopyWithImpl(
_$TrainingSectionEntityImpl _value,
$Res Function(_$TrainingSectionEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of TrainingSectionEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? exercises = null,
}) {
return _then(
_$TrainingSectionEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
exercises: null == exercises
? _value._exercises
: exercises // ignore: cast_nullable_to_non_nullable
as List<TrainingExerciseEntity>,
),
);
}
}
/// @nodoc
class _$TrainingSectionEntityImpl implements _TrainingSectionEntity {
const _$TrainingSectionEntityImpl({
required this.id,
required this.name,
final List<TrainingExerciseEntity> exercises = const [],
}) : _exercises = exercises;
@override
final String id;
@override
final String name;
final List<TrainingExerciseEntity> _exercises;
@override
@JsonKey()
List<TrainingExerciseEntity> get exercises {
if (_exercises is EqualUnmodifiableListView) return _exercises;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_exercises);
}
@override
String toString() {
return 'TrainingSectionEntity(id: $id, name: $name, exercises: $exercises)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TrainingSectionEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
const DeepCollectionEquality().equals(
other._exercises,
_exercises,
));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
const DeepCollectionEquality().hash(_exercises),
);
/// Create a copy of TrainingSectionEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TrainingSectionEntityImplCopyWith<_$TrainingSectionEntityImpl>
get copyWith =>
__$$TrainingSectionEntityImplCopyWithImpl<_$TrainingSectionEntityImpl>(
this,
_$identity,
);
}
abstract class _TrainingSectionEntity implements TrainingSectionEntity {
const factory _TrainingSectionEntity({
required final String id,
required final String name,
final List<TrainingExerciseEntity> exercises,
}) = _$TrainingSectionEntityImpl;
@override
String get id;
@override
String get name;
@override
List<TrainingExerciseEntity> get exercises;
/// Create a copy of TrainingSectionEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TrainingSectionEntityImplCopyWith<_$TrainingSectionEntityImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,24 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:trainhub_flutter/domain/entities/training_exercise.dart';
part 'workout_activity.freezed.dart';
@freezed
class WorkoutActivityEntity with _$WorkoutActivityEntity {
const factory WorkoutActivityEntity({
required String id,
required String name,
required String type,
required int duration,
TrainingExerciseEntity? originalExercise,
String? sectionName,
int? setIndex,
int? totalSets,
}) = _WorkoutActivityEntity;
const WorkoutActivityEntity._();
bool get isRest => type == 'rest';
bool get isWork => type == 'work';
bool get isTimeBased => duration > 0;
}

View File

@@ -0,0 +1,346 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'workout_activity.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
/// @nodoc
mixin _$WorkoutActivityEntity {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
int get duration => throw _privateConstructorUsedError;
TrainingExerciseEntity? get originalExercise =>
throw _privateConstructorUsedError;
String? get sectionName => throw _privateConstructorUsedError;
int? get setIndex => throw _privateConstructorUsedError;
int? get totalSets => throw _privateConstructorUsedError;
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$WorkoutActivityEntityCopyWith<WorkoutActivityEntity> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $WorkoutActivityEntityCopyWith<$Res> {
factory $WorkoutActivityEntityCopyWith(
WorkoutActivityEntity value,
$Res Function(WorkoutActivityEntity) then,
) = _$WorkoutActivityEntityCopyWithImpl<$Res, WorkoutActivityEntity>;
@useResult
$Res call({
String id,
String name,
String type,
int duration,
TrainingExerciseEntity? originalExercise,
String? sectionName,
int? setIndex,
int? totalSets,
});
$TrainingExerciseEntityCopyWith<$Res>? get originalExercise;
}
/// @nodoc
class _$WorkoutActivityEntityCopyWithImpl<
$Res,
$Val extends WorkoutActivityEntity
>
implements $WorkoutActivityEntityCopyWith<$Res> {
_$WorkoutActivityEntityCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? type = null,
Object? duration = null,
Object? originalExercise = freezed,
Object? sectionName = freezed,
Object? setIndex = freezed,
Object? totalSets = freezed,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
duration: null == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int,
originalExercise: freezed == originalExercise
? _value.originalExercise
: originalExercise // ignore: cast_nullable_to_non_nullable
as TrainingExerciseEntity?,
sectionName: freezed == sectionName
? _value.sectionName
: sectionName // ignore: cast_nullable_to_non_nullable
as String?,
setIndex: freezed == setIndex
? _value.setIndex
: setIndex // ignore: cast_nullable_to_non_nullable
as int?,
totalSets: freezed == totalSets
? _value.totalSets
: totalSets // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$TrainingExerciseEntityCopyWith<$Res>? get originalExercise {
if (_value.originalExercise == null) {
return null;
}
return $TrainingExerciseEntityCopyWith<$Res>(_value.originalExercise!, (
value,
) {
return _then(_value.copyWith(originalExercise: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$WorkoutActivityEntityImplCopyWith<$Res>
implements $WorkoutActivityEntityCopyWith<$Res> {
factory _$$WorkoutActivityEntityImplCopyWith(
_$WorkoutActivityEntityImpl value,
$Res Function(_$WorkoutActivityEntityImpl) then,
) = __$$WorkoutActivityEntityImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String name,
String type,
int duration,
TrainingExerciseEntity? originalExercise,
String? sectionName,
int? setIndex,
int? totalSets,
});
@override
$TrainingExerciseEntityCopyWith<$Res>? get originalExercise;
}
/// @nodoc
class __$$WorkoutActivityEntityImplCopyWithImpl<$Res>
extends
_$WorkoutActivityEntityCopyWithImpl<$Res, _$WorkoutActivityEntityImpl>
implements _$$WorkoutActivityEntityImplCopyWith<$Res> {
__$$WorkoutActivityEntityImplCopyWithImpl(
_$WorkoutActivityEntityImpl _value,
$Res Function(_$WorkoutActivityEntityImpl) _then,
) : super(_value, _then);
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? type = null,
Object? duration = null,
Object? originalExercise = freezed,
Object? sectionName = freezed,
Object? setIndex = freezed,
Object? totalSets = freezed,
}) {
return _then(
_$WorkoutActivityEntityImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
duration: null == duration
? _value.duration
: duration // ignore: cast_nullable_to_non_nullable
as int,
originalExercise: freezed == originalExercise
? _value.originalExercise
: originalExercise // ignore: cast_nullable_to_non_nullable
as TrainingExerciseEntity?,
sectionName: freezed == sectionName
? _value.sectionName
: sectionName // ignore: cast_nullable_to_non_nullable
as String?,
setIndex: freezed == setIndex
? _value.setIndex
: setIndex // ignore: cast_nullable_to_non_nullable
as int?,
totalSets: freezed == totalSets
? _value.totalSets
: totalSets // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
class _$WorkoutActivityEntityImpl extends _WorkoutActivityEntity {
const _$WorkoutActivityEntityImpl({
required this.id,
required this.name,
required this.type,
required this.duration,
this.originalExercise,
this.sectionName,
this.setIndex,
this.totalSets,
}) : super._();
@override
final String id;
@override
final String name;
@override
final String type;
@override
final int duration;
@override
final TrainingExerciseEntity? originalExercise;
@override
final String? sectionName;
@override
final int? setIndex;
@override
final int? totalSets;
@override
String toString() {
return 'WorkoutActivityEntity(id: $id, name: $name, type: $type, duration: $duration, originalExercise: $originalExercise, sectionName: $sectionName, setIndex: $setIndex, totalSets: $totalSets)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$WorkoutActivityEntityImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.duration, duration) ||
other.duration == duration) &&
(identical(other.originalExercise, originalExercise) ||
other.originalExercise == originalExercise) &&
(identical(other.sectionName, sectionName) ||
other.sectionName == sectionName) &&
(identical(other.setIndex, setIndex) ||
other.setIndex == setIndex) &&
(identical(other.totalSets, totalSets) ||
other.totalSets == totalSets));
}
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
type,
duration,
originalExercise,
sectionName,
setIndex,
totalSets,
);
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$WorkoutActivityEntityImplCopyWith<_$WorkoutActivityEntityImpl>
get copyWith =>
__$$WorkoutActivityEntityImplCopyWithImpl<_$WorkoutActivityEntityImpl>(
this,
_$identity,
);
}
abstract class _WorkoutActivityEntity extends WorkoutActivityEntity {
const factory _WorkoutActivityEntity({
required final String id,
required final String name,
required final String type,
required final int duration,
final TrainingExerciseEntity? originalExercise,
final String? sectionName,
final int? setIndex,
final int? totalSets,
}) = _$WorkoutActivityEntityImpl;
const _WorkoutActivityEntity._() : super._();
@override
String get id;
@override
String get name;
@override
String get type;
@override
int get duration;
@override
TrainingExerciseEntity? get originalExercise;
@override
String? get sectionName;
@override
int? get setIndex;
@override
int? get totalSets;
/// Create a copy of WorkoutActivityEntity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$WorkoutActivityEntityImplCopyWith<_$WorkoutActivityEntityImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,19 @@
import 'package:trainhub_flutter/domain/entities/analysis_session.dart';
import 'package:trainhub_flutter/domain/entities/annotation.dart';
abstract class AnalysisRepository {
Future<List<AnalysisSessionEntity>> getAllSessions();
Future<AnalysisSessionEntity?> getSession(String id);
Future<AnalysisSessionEntity> createSession(String name, String videoPath);
Future<void> deleteSession(String id);
Future<List<AnnotationEntity>> getAnnotations(String sessionId);
Future<AnnotationEntity> addAnnotation({
required String sessionId,
required String name,
required String description,
required double startTime,
required double endTime,
required String color,
});
Future<void> deleteAnnotation(String id);
}

View File

@@ -0,0 +1,16 @@
import 'package:trainhub_flutter/domain/entities/chat_session.dart';
import 'package:trainhub_flutter/domain/entities/chat_message.dart';
abstract class ChatRepository {
Future<List<ChatSessionEntity>> getAllSessions();
Future<ChatSessionEntity?> getSession(String id);
Future<ChatSessionEntity> createSession();
Future<void> deleteSession(String id);
Future<List<ChatMessageEntity>> getMessages(String sessionId);
Future<ChatMessageEntity> addMessage({
required String sessionId,
required String role,
required String content,
});
Future<void> updateSessionTitle(String sessionId, String title);
}

View File

@@ -0,0 +1,13 @@
import 'package:trainhub_flutter/domain/entities/exercise.dart';
abstract class ExerciseRepository {
Future<List<ExerciseEntity>> getAll();
Future<ExerciseEntity> create({
required String name,
String? instructions,
String? tags,
String? videoUrl,
});
Future<void> update(ExerciseEntity exercise);
Future<void> delete(String id);
}

View File

@@ -0,0 +1,20 @@
import 'package:trainhub_flutter/domain/entities/program.dart';
import 'package:trainhub_flutter/domain/entities/program_week.dart';
import 'package:trainhub_flutter/domain/entities/program_workout.dart';
abstract class ProgramRepository {
Future<List<ProgramEntity>> getAllPrograms();
Future<ProgramEntity?> getProgram(String id);
Future<List<ProgramWeekEntity>> getWeeks(String programId);
Future<List<ProgramWorkoutEntity>> getWorkouts(String programId);
Future<ProgramEntity> createProgram(String name);
Future<void> deleteProgram(String id);
Future<void> duplicateProgram(String sourceId);
Future<ProgramWeekEntity> addWeek(String programId, int position);
Future<void> deleteWeek(String id);
Future<void> updateWeekNote(String weekId, String note);
Future<ProgramWorkoutEntity> addWorkout(ProgramWorkoutEntity workout);
Future<void> updateWorkout(ProgramWorkoutEntity workout);
Future<void> deleteWorkout(String id);
Future<void> toggleWorkoutComplete(String id, bool currentStatus);
}

View File

@@ -0,0 +1,9 @@
import 'package:trainhub_flutter/domain/entities/training_plan.dart';
abstract class TrainingPlanRepository {
Future<List<TrainingPlanEntity>> getAll();
Future<TrainingPlanEntity> getById(String id);
Future<TrainingPlanEntity> create(String name);
Future<void> update(TrainingPlanEntity plan);
Future<void> delete(String id);
}