feat(verify): phone

This commit is contained in:
mso7nueh
2025-05-21 17:42:43 +03:00
parent cb9fff9327
commit 067e0929ed
98 changed files with 821 additions and 760 deletions

View File

@@ -4,7 +4,7 @@ part 'consultant_comment_model.freezed.dart';
part 'consultant_comment_model.g.dart';
@freezed
class ConsultantCommentModel with _$ConsultantCommentModel {
abstract class ConsultantCommentModel with _$ConsultantCommentModel {
factory ConsultantCommentModel({
String? comment,
@Default({}) @JsonKey(name: 'meals') Map<String, MealCommentModel> mealsComments,
@@ -15,7 +15,7 @@ class ConsultantCommentModel with _$ConsultantCommentModel {
}
@freezed
class PortionCommentModel with _$PortionCommentModel {
abstract class PortionCommentModel with _$PortionCommentModel {
factory PortionCommentModel({
required String comment,
required int id,
@@ -25,7 +25,7 @@ class PortionCommentModel with _$PortionCommentModel {
}
@freezed
class MealCommentModel with _$MealCommentModel {
abstract class MealCommentModel with _$MealCommentModel {
factory MealCommentModel({
required String comment,

View File

@@ -4,7 +4,7 @@ part 'consultant_review_model.freezed.dart';
part 'consultant_review_model.g.dart';
@freezed
class ConsultantReviewModel with _$ConsultantReviewModel {
abstract class ConsultantReviewModel with _$ConsultantReviewModel {
factory ConsultantReviewModel({
required String planName,
@@ -18,7 +18,7 @@ class ConsultantReviewModel with _$ConsultantReviewModel {
@freezed
class ConsultantComments with _$ConsultantComments {
abstract class ConsultantComments with _$ConsultantComments {
factory ConsultantComments({
required String? dayComment,
@@ -32,7 +32,7 @@ class ConsultantComments with _$ConsultantComments {
@freezed
class MealComment with _$MealComment {
abstract class MealComment with _$MealComment {
factory MealComment({
required String comment,
@@ -43,7 +43,7 @@ class MealComment with _$MealComment {
}
@freezed
class PortionComment with _$PortionComment {
abstract class PortionComment with _$PortionComment {
factory PortionComment({
@JsonKey(name: 'id') required int portionId,

File diff suppressed because it is too large Load Diff

View File

@@ -6,9 +6,9 @@ part of 'consultant_review_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ConsultantReviewModelImpl _$$ConsultantReviewModelImplFromJson(
_ConsultantReviewModel _$ConsultantReviewModelFromJson(
Map<String, dynamic> json) =>
_$ConsultantReviewModelImpl(
_ConsultantReviewModel(
planName: json['planName'] as String,
planDuration: (json['planDuration'] as num).toInt(),
currentPlanDay: (json['currentPlanDay'] as num).toInt(),
@@ -16,8 +16,8 @@ _$ConsultantReviewModelImpl _$$ConsultantReviewModelImplFromJson(
json['consultantComments'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$ConsultantReviewModelImplToJson(
_$ConsultantReviewModelImpl instance) =>
Map<String, dynamic> _$ConsultantReviewModelToJson(
_ConsultantReviewModel instance) =>
<String, dynamic>{
'planName': instance.planName,
'planDuration': instance.planDuration,
@@ -25,9 +25,8 @@ Map<String, dynamic> _$$ConsultantReviewModelImplToJson(
'consultantComments': instance.consultantComments,
};
_$ConsultantCommentsImpl _$$ConsultantCommentsImplFromJson(
Map<String, dynamic> json) =>
_$ConsultantCommentsImpl(
_ConsultantComments _$ConsultantCommentsFromJson(Map<String, dynamic> json) =>
_ConsultantComments(
dayComment: json['dayComment'] as String?,
mealsComments: (json['mealsComments'] as List<dynamic>)
.map((e) => MealComment.fromJson(e as Map<String, dynamic>))
@@ -37,34 +36,31 @@ _$ConsultantCommentsImpl _$$ConsultantCommentsImplFromJson(
.toList(),
);
Map<String, dynamic> _$$ConsultantCommentsImplToJson(
_$ConsultantCommentsImpl instance) =>
Map<String, dynamic> _$ConsultantCommentsToJson(_ConsultantComments instance) =>
<String, dynamic>{
'dayComment': instance.dayComment,
'mealsComments': instance.mealsComments,
'portionsComments': instance.portionsComments,
};
_$MealCommentImpl _$$MealCommentImplFromJson(Map<String, dynamic> json) =>
_$MealCommentImpl(
_MealComment _$MealCommentFromJson(Map<String, dynamic> json) => _MealComment(
comment: json['comment'] as String,
typeNo: (json['typeNo'] as num).toInt(),
);
Map<String, dynamic> _$$MealCommentImplToJson(_$MealCommentImpl instance) =>
Map<String, dynamic> _$MealCommentToJson(_MealComment instance) =>
<String, dynamic>{
'comment': instance.comment,
'typeNo': instance.typeNo,
};
_$PortionCommentImpl _$$PortionCommentImplFromJson(Map<String, dynamic> json) =>
_$PortionCommentImpl(
_PortionComment _$PortionCommentFromJson(Map<String, dynamic> json) =>
_PortionComment(
portionId: (json['id'] as num).toInt(),
comment: json['comment'] as String,
);
Map<String, dynamic> _$$PortionCommentImplToJson(
_$PortionCommentImpl instance) =>
Map<String, dynamic> _$PortionCommentToJson(_PortionComment instance) =>
<String, dynamic>{
'id': instance.portionId,
'comment': instance.comment,

View File

@@ -21,7 +21,7 @@ enum PortionState {
}
@freezed
class DiaryDayWrapperModel with _$DiaryDayWrapperModel {
abstract class DiaryDayWrapperModel with _$DiaryDayWrapperModel {
const factory DiaryDayWrapperModel({
@JsonKey(
name: "diary",
@@ -33,7 +33,7 @@ class DiaryDayWrapperModel with _$DiaryDayWrapperModel {
}
@freezed
class DiaryDayModel with _$DiaryDayModel {
abstract class DiaryDayModel with _$DiaryDayModel {
const factory DiaryDayModel({
@JsonKey(name: "id") required int id,
@JsonKey(name: "date") required String date,
@@ -50,7 +50,7 @@ class DiaryDayModel with _$DiaryDayModel {
}
@freezed
class MealModel with _$MealModel {
abstract class MealModel with _$MealModel {
const factory MealModel({
@JsonKey(name: "id") required int id,
@JsonKey(name: "time") required String time,
@@ -65,7 +65,7 @@ class MealModel with _$MealModel {
}
@freezed
class DiaryPhotoModel with _$DiaryPhotoModel {
abstract class DiaryPhotoModel with _$DiaryPhotoModel {
const factory DiaryPhotoModel({
@JsonKey(name: "id") required int id,
@JsonKey(name: "original_name") required String originalName,
@@ -77,7 +77,7 @@ class DiaryPhotoModel with _$DiaryPhotoModel {
}
@freezed
class PortionModel with _$PortionModel {
abstract class PortionModel with _$PortionModel {
const factory PortionModel({
@JsonKey(name: "id") required int id,
@JsonKey(name: "product_nutritional_value_id") int? productNutritionalValueId,
@@ -92,7 +92,7 @@ class PortionModel with _$PortionModel {
}
@freezed
class TypeOfDiaryModel with _$TypeOfDiaryModel {
abstract class TypeOfDiaryModel with _$TypeOfDiaryModel {
const factory TypeOfDiaryModel({
@JsonKey(name: "has_chosen_diet") required bool hasChosenDiet,
@JsonKey(name: "has_chosen_plan") required bool hasChosenPlan,
@@ -103,7 +103,7 @@ class TypeOfDiaryModel with _$TypeOfDiaryModel {
}
@freezed
class ProductInMeal with _$ProductInMeal {
abstract class ProductInMeal with _$ProductInMeal {
const factory ProductInMeal({
@JsonKey(name: 'product_name') required String productName,
@JsonKey(name: 'portion') required String portion,

View File

@@ -5,7 +5,7 @@ part 'diary_index_model.freezed.dart';
part 'diary_index_model.g.dart';
@freezed
class DiaryIndexModel with _$DiaryIndexModel {
abstract class DiaryIndexModel with _$DiaryIndexModel {
const factory DiaryIndexModel({
required int id,
}) = _DiaryIndexModel;

View File

@@ -5,7 +5,7 @@ part 'finish_diary_day_model.freezed.dart';
part 'finish_diary_day_model.g.dart';
@Freezed()
class FinishDiaryDayModel with _$FinishDiaryDayModel {
abstract class FinishDiaryDayModel with _$FinishDiaryDayModel {
const factory FinishDiaryDayModel({required String wakeUp, required String retire, @JsonKey(includeIfNull: false) String? comment}) = _FinishDiaryDayModel;
factory FinishDiaryDayModel.fromJson(Map<String, dynamic> json) => _$FinishDiaryDayModelFromJson(json);

View File

@@ -5,7 +5,7 @@ part 'nutrition_model.freezed.dart';
part 'nutrition_model.g.dart';
@freezed
class NutritionDataModel with _$NutritionDataModel {
abstract class NutritionDataModel with _$NutritionDataModel {
const factory NutritionDataModel({
required NutritionModel dailyNutritionIntake,
required NutritionModel dailyNutritionRecommendation,
@@ -15,7 +15,7 @@ class NutritionDataModel with _$NutritionDataModel {
}
@freezed
class NutritionModel with _$NutritionModel {
abstract class NutritionModel with _$NutritionModel {
const factory NutritionModel({
required double energy,
required double proteins,

View File

@@ -4,7 +4,7 @@ part 'product_moderation_model.freezed.dart';
part 'product_moderation_model.g.dart';
@freezed
class ProductModerationModel with _$ProductModerationModel {
abstract class ProductModerationModel with _$ProductModerationModel {
const factory ProductModerationModel({
required String name,
@JsonKey(name: 'energy_on_100gr')