backup: 사용하지 않는 파일 삭제 전 복구 지점

- 전체 371개 파일 중 82개 미사용 파일 식별
- Phase 1: 33개 파일 삭제 예정 (100% 안전)
- Phase 2: 30개 파일 삭제 검토 예정
- Phase 3: 19개 파일 수동 검토 예정

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-09-02 19:51:40 +09:00
parent 650cd4be55
commit c419f8f458
149 changed files with 12934 additions and 3644 deletions

View File

@@ -0,0 +1,52 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'model_dto.freezed.dart';
part 'model_dto.g.dart';
@freezed
class ModelDto with _$ModelDto {
const factory ModelDto({
required int id,
@JsonKey(name: 'vendors_id') required int vendorsId,
@JsonKey(name: 'vendor_name') String? vendorName, // JOIN 필드
required String name,
@JsonKey(name: 'is_deleted') required bool isDeleted,
@JsonKey(name: 'registered_at') required DateTime registeredAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt,
}) = _ModelDto;
factory ModelDto.fromJson(Map<String, dynamic> json) => _$ModelDtoFromJson(json);
}
@freezed
class ModelListDto with _$ModelListDto {
const factory ModelListDto({
@JsonKey(name: 'data') required List<ModelDto> items,
required int total,
required int page,
@JsonKey(name: 'page_size') required int perPage,
@JsonKey(name: 'total_pages') required int totalPages,
}) = _ModelListDto;
factory ModelListDto.fromJson(Map<String, dynamic> json) => _$ModelListDtoFromJson(json);
}
@freezed
class CreateModelRequest with _$CreateModelRequest {
const factory CreateModelRequest({
@JsonKey(name: 'vendors_id') required int vendorsId,
required String name,
}) = _CreateModelRequest;
factory CreateModelRequest.fromJson(Map<String, dynamic> json) => _$CreateModelRequestFromJson(json);
}
@freezed
class UpdateModelRequest with _$UpdateModelRequest {
const factory UpdateModelRequest({
@JsonKey(name: 'vendors_id') int? vendorsId,
String? name,
}) = _UpdateModelRequest;
factory UpdateModelRequest.fromJson(Map<String, dynamic> json) => _$UpdateModelRequestFromJson(json);
}

View File

@@ -0,0 +1,913 @@
// 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 'model_dto.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');
ModelDto _$ModelDtoFromJson(Map<String, dynamic> json) {
return _ModelDto.fromJson(json);
}
/// @nodoc
mixin _$ModelDto {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'vendors_id')
int get vendorsId => throw _privateConstructorUsedError;
@JsonKey(name: 'vendor_name')
String? get vendorName => throw _privateConstructorUsedError; // JOIN 필드
String get name => throw _privateConstructorUsedError;
@JsonKey(name: 'is_deleted')
bool get isDeleted => throw _privateConstructorUsedError;
@JsonKey(name: 'registered_at')
DateTime get registeredAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime? get updatedAt => throw _privateConstructorUsedError;
/// Serializes this ModelDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ModelDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ModelDtoCopyWith<ModelDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ModelDtoCopyWith<$Res> {
factory $ModelDtoCopyWith(ModelDto value, $Res Function(ModelDto) then) =
_$ModelDtoCopyWithImpl<$Res, ModelDto>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'vendors_id') int vendorsId,
@JsonKey(name: 'vendor_name') String? vendorName,
String name,
@JsonKey(name: 'is_deleted') bool isDeleted,
@JsonKey(name: 'registered_at') DateTime registeredAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
/// @nodoc
class _$ModelDtoCopyWithImpl<$Res, $Val extends ModelDto>
implements $ModelDtoCopyWith<$Res> {
_$ModelDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ModelDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? vendorsId = null,
Object? vendorName = freezed,
Object? name = null,
Object? isDeleted = null,
Object? registeredAt = null,
Object? updatedAt = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
vendorsId: null == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int,
vendorName: freezed == vendorName
? _value.vendorName
: vendorName // ignore: cast_nullable_to_non_nullable
as String?,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
isDeleted: null == isDeleted
? _value.isDeleted
: isDeleted // ignore: cast_nullable_to_non_nullable
as bool,
registeredAt: null == registeredAt
? _value.registeredAt
: registeredAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$ModelDtoImplCopyWith<$Res>
implements $ModelDtoCopyWith<$Res> {
factory _$$ModelDtoImplCopyWith(
_$ModelDtoImpl value, $Res Function(_$ModelDtoImpl) then) =
__$$ModelDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'vendors_id') int vendorsId,
@JsonKey(name: 'vendor_name') String? vendorName,
String name,
@JsonKey(name: 'is_deleted') bool isDeleted,
@JsonKey(name: 'registered_at') DateTime registeredAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
/// @nodoc
class __$$ModelDtoImplCopyWithImpl<$Res>
extends _$ModelDtoCopyWithImpl<$Res, _$ModelDtoImpl>
implements _$$ModelDtoImplCopyWith<$Res> {
__$$ModelDtoImplCopyWithImpl(
_$ModelDtoImpl _value, $Res Function(_$ModelDtoImpl) _then)
: super(_value, _then);
/// Create a copy of ModelDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? vendorsId = null,
Object? vendorName = freezed,
Object? name = null,
Object? isDeleted = null,
Object? registeredAt = null,
Object? updatedAt = freezed,
}) {
return _then(_$ModelDtoImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
vendorsId: null == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int,
vendorName: freezed == vendorName
? _value.vendorName
: vendorName // ignore: cast_nullable_to_non_nullable
as String?,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
isDeleted: null == isDeleted
? _value.isDeleted
: isDeleted // ignore: cast_nullable_to_non_nullable
as bool,
registeredAt: null == registeredAt
? _value.registeredAt
: registeredAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ModelDtoImpl implements _ModelDto {
const _$ModelDtoImpl(
{required this.id,
@JsonKey(name: 'vendors_id') required this.vendorsId,
@JsonKey(name: 'vendor_name') this.vendorName,
required this.name,
@JsonKey(name: 'is_deleted') required this.isDeleted,
@JsonKey(name: 'registered_at') required this.registeredAt,
@JsonKey(name: 'updated_at') this.updatedAt});
factory _$ModelDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ModelDtoImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'vendors_id')
final int vendorsId;
@override
@JsonKey(name: 'vendor_name')
final String? vendorName;
// JOIN 필드
@override
final String name;
@override
@JsonKey(name: 'is_deleted')
final bool isDeleted;
@override
@JsonKey(name: 'registered_at')
final DateTime registeredAt;
@override
@JsonKey(name: 'updated_at')
final DateTime? updatedAt;
@override
String toString() {
return 'ModelDto(id: $id, vendorsId: $vendorsId, vendorName: $vendorName, name: $name, isDeleted: $isDeleted, registeredAt: $registeredAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ModelDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.vendorsId, vendorsId) ||
other.vendorsId == vendorsId) &&
(identical(other.vendorName, vendorName) ||
other.vendorName == vendorName) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.isDeleted, isDeleted) ||
other.isDeleted == isDeleted) &&
(identical(other.registeredAt, registeredAt) ||
other.registeredAt == registeredAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, vendorsId, vendorName, name,
isDeleted, registeredAt, updatedAt);
/// Create a copy of ModelDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ModelDtoImplCopyWith<_$ModelDtoImpl> get copyWith =>
__$$ModelDtoImplCopyWithImpl<_$ModelDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ModelDtoImplToJson(
this,
);
}
}
abstract class _ModelDto implements ModelDto {
const factory _ModelDto(
{required final int id,
@JsonKey(name: 'vendors_id') required final int vendorsId,
@JsonKey(name: 'vendor_name') final String? vendorName,
required final String name,
@JsonKey(name: 'is_deleted') required final bool isDeleted,
@JsonKey(name: 'registered_at') required final DateTime registeredAt,
@JsonKey(name: 'updated_at') final DateTime? updatedAt}) = _$ModelDtoImpl;
factory _ModelDto.fromJson(Map<String, dynamic> json) =
_$ModelDtoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'vendors_id')
int get vendorsId;
@override
@JsonKey(name: 'vendor_name')
String? get vendorName; // JOIN 필드
@override
String get name;
@override
@JsonKey(name: 'is_deleted')
bool get isDeleted;
@override
@JsonKey(name: 'registered_at')
DateTime get registeredAt;
@override
@JsonKey(name: 'updated_at')
DateTime? get updatedAt;
/// Create a copy of ModelDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ModelDtoImplCopyWith<_$ModelDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
ModelListDto _$ModelListDtoFromJson(Map<String, dynamic> json) {
return _ModelListDto.fromJson(json);
}
/// @nodoc
mixin _$ModelListDto {
@JsonKey(name: 'data')
List<ModelDto> get items => throw _privateConstructorUsedError;
int get total => throw _privateConstructorUsedError;
int get page => throw _privateConstructorUsedError;
@JsonKey(name: 'page_size')
int get perPage => throw _privateConstructorUsedError;
@JsonKey(name: 'total_pages')
int get totalPages => throw _privateConstructorUsedError;
/// Serializes this ModelListDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ModelListDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ModelListDtoCopyWith<ModelListDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ModelListDtoCopyWith<$Res> {
factory $ModelListDtoCopyWith(
ModelListDto value, $Res Function(ModelListDto) then) =
_$ModelListDtoCopyWithImpl<$Res, ModelListDto>;
@useResult
$Res call(
{@JsonKey(name: 'data') List<ModelDto> items,
int total,
int page,
@JsonKey(name: 'page_size') int perPage,
@JsonKey(name: 'total_pages') int totalPages});
}
/// @nodoc
class _$ModelListDtoCopyWithImpl<$Res, $Val extends ModelListDto>
implements $ModelListDtoCopyWith<$Res> {
_$ModelListDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ModelListDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? items = null,
Object? total = null,
Object? page = null,
Object? perPage = null,
Object? totalPages = null,
}) {
return _then(_value.copyWith(
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as List<ModelDto>,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
page: null == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
totalPages: null == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int,
) as $Val);
}
}
/// @nodoc
abstract class _$$ModelListDtoImplCopyWith<$Res>
implements $ModelListDtoCopyWith<$Res> {
factory _$$ModelListDtoImplCopyWith(
_$ModelListDtoImpl value, $Res Function(_$ModelListDtoImpl) then) =
__$$ModelListDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'data') List<ModelDto> items,
int total,
int page,
@JsonKey(name: 'page_size') int perPage,
@JsonKey(name: 'total_pages') int totalPages});
}
/// @nodoc
class __$$ModelListDtoImplCopyWithImpl<$Res>
extends _$ModelListDtoCopyWithImpl<$Res, _$ModelListDtoImpl>
implements _$$ModelListDtoImplCopyWith<$Res> {
__$$ModelListDtoImplCopyWithImpl(
_$ModelListDtoImpl _value, $Res Function(_$ModelListDtoImpl) _then)
: super(_value, _then);
/// Create a copy of ModelListDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? items = null,
Object? total = null,
Object? page = null,
Object? perPage = null,
Object? totalPages = null,
}) {
return _then(_$ModelListDtoImpl(
items: null == items
? _value._items
: items // ignore: cast_nullable_to_non_nullable
as List<ModelDto>,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
page: null == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
totalPages: null == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ModelListDtoImpl implements _ModelListDto {
const _$ModelListDtoImpl(
{@JsonKey(name: 'data') required final List<ModelDto> items,
required this.total,
required this.page,
@JsonKey(name: 'page_size') required this.perPage,
@JsonKey(name: 'total_pages') required this.totalPages})
: _items = items;
factory _$ModelListDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ModelListDtoImplFromJson(json);
final List<ModelDto> _items;
@override
@JsonKey(name: 'data')
List<ModelDto> get items {
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_items);
}
@override
final int total;
@override
final int page;
@override
@JsonKey(name: 'page_size')
final int perPage;
@override
@JsonKey(name: 'total_pages')
final int totalPages;
@override
String toString() {
return 'ModelListDto(items: $items, total: $total, page: $page, perPage: $perPage, totalPages: $totalPages)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ModelListDtoImpl &&
const DeepCollectionEquality().equals(other._items, _items) &&
(identical(other.total, total) || other.total == total) &&
(identical(other.page, page) || other.page == page) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
(identical(other.totalPages, totalPages) ||
other.totalPages == totalPages));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_items),
total,
page,
perPage,
totalPages);
/// Create a copy of ModelListDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ModelListDtoImplCopyWith<_$ModelListDtoImpl> get copyWith =>
__$$ModelListDtoImplCopyWithImpl<_$ModelListDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ModelListDtoImplToJson(
this,
);
}
}
abstract class _ModelListDto implements ModelListDto {
const factory _ModelListDto(
{@JsonKey(name: 'data') required final List<ModelDto> items,
required final int total,
required final int page,
@JsonKey(name: 'page_size') required final int perPage,
@JsonKey(name: 'total_pages') required final int totalPages}) =
_$ModelListDtoImpl;
factory _ModelListDto.fromJson(Map<String, dynamic> json) =
_$ModelListDtoImpl.fromJson;
@override
@JsonKey(name: 'data')
List<ModelDto> get items;
@override
int get total;
@override
int get page;
@override
@JsonKey(name: 'page_size')
int get perPage;
@override
@JsonKey(name: 'total_pages')
int get totalPages;
/// Create a copy of ModelListDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ModelListDtoImplCopyWith<_$ModelListDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
CreateModelRequest _$CreateModelRequestFromJson(Map<String, dynamic> json) {
return _CreateModelRequest.fromJson(json);
}
/// @nodoc
mixin _$CreateModelRequest {
@JsonKey(name: 'vendors_id')
int get vendorsId => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
/// Serializes this CreateModelRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CreateModelRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CreateModelRequestCopyWith<CreateModelRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CreateModelRequestCopyWith<$Res> {
factory $CreateModelRequestCopyWith(
CreateModelRequest value, $Res Function(CreateModelRequest) then) =
_$CreateModelRequestCopyWithImpl<$Res, CreateModelRequest>;
@useResult
$Res call({@JsonKey(name: 'vendors_id') int vendorsId, String name});
}
/// @nodoc
class _$CreateModelRequestCopyWithImpl<$Res, $Val extends CreateModelRequest>
implements $CreateModelRequestCopyWith<$Res> {
_$CreateModelRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CreateModelRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? vendorsId = null,
Object? name = null,
}) {
return _then(_value.copyWith(
vendorsId: null == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$CreateModelRequestImplCopyWith<$Res>
implements $CreateModelRequestCopyWith<$Res> {
factory _$$CreateModelRequestImplCopyWith(_$CreateModelRequestImpl value,
$Res Function(_$CreateModelRequestImpl) then) =
__$$CreateModelRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'vendors_id') int vendorsId, String name});
}
/// @nodoc
class __$$CreateModelRequestImplCopyWithImpl<$Res>
extends _$CreateModelRequestCopyWithImpl<$Res, _$CreateModelRequestImpl>
implements _$$CreateModelRequestImplCopyWith<$Res> {
__$$CreateModelRequestImplCopyWithImpl(_$CreateModelRequestImpl _value,
$Res Function(_$CreateModelRequestImpl) _then)
: super(_value, _then);
/// Create a copy of CreateModelRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? vendorsId = null,
Object? name = null,
}) {
return _then(_$CreateModelRequestImpl(
vendorsId: null == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CreateModelRequestImpl implements _CreateModelRequest {
const _$CreateModelRequestImpl(
{@JsonKey(name: 'vendors_id') required this.vendorsId,
required this.name});
factory _$CreateModelRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$CreateModelRequestImplFromJson(json);
@override
@JsonKey(name: 'vendors_id')
final int vendorsId;
@override
final String name;
@override
String toString() {
return 'CreateModelRequest(vendorsId: $vendorsId, name: $name)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateModelRequestImpl &&
(identical(other.vendorsId, vendorsId) ||
other.vendorsId == vendorsId) &&
(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, vendorsId, name);
/// Create a copy of CreateModelRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CreateModelRequestImplCopyWith<_$CreateModelRequestImpl> get copyWith =>
__$$CreateModelRequestImplCopyWithImpl<_$CreateModelRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CreateModelRequestImplToJson(
this,
);
}
}
abstract class _CreateModelRequest implements CreateModelRequest {
const factory _CreateModelRequest(
{@JsonKey(name: 'vendors_id') required final int vendorsId,
required final String name}) = _$CreateModelRequestImpl;
factory _CreateModelRequest.fromJson(Map<String, dynamic> json) =
_$CreateModelRequestImpl.fromJson;
@override
@JsonKey(name: 'vendors_id')
int get vendorsId;
@override
String get name;
/// Create a copy of CreateModelRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CreateModelRequestImplCopyWith<_$CreateModelRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}
UpdateModelRequest _$UpdateModelRequestFromJson(Map<String, dynamic> json) {
return _UpdateModelRequest.fromJson(json);
}
/// @nodoc
mixin _$UpdateModelRequest {
@JsonKey(name: 'vendors_id')
int? get vendorsId => throw _privateConstructorUsedError;
String? get name => throw _privateConstructorUsedError;
/// Serializes this UpdateModelRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of UpdateModelRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$UpdateModelRequestCopyWith<UpdateModelRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $UpdateModelRequestCopyWith<$Res> {
factory $UpdateModelRequestCopyWith(
UpdateModelRequest value, $Res Function(UpdateModelRequest) then) =
_$UpdateModelRequestCopyWithImpl<$Res, UpdateModelRequest>;
@useResult
$Res call({@JsonKey(name: 'vendors_id') int? vendorsId, String? name});
}
/// @nodoc
class _$UpdateModelRequestCopyWithImpl<$Res, $Val extends UpdateModelRequest>
implements $UpdateModelRequestCopyWith<$Res> {
_$UpdateModelRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of UpdateModelRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? vendorsId = freezed,
Object? name = freezed,
}) {
return _then(_value.copyWith(
vendorsId: freezed == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int?,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$UpdateModelRequestImplCopyWith<$Res>
implements $UpdateModelRequestCopyWith<$Res> {
factory _$$UpdateModelRequestImplCopyWith(_$UpdateModelRequestImpl value,
$Res Function(_$UpdateModelRequestImpl) then) =
__$$UpdateModelRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'vendors_id') int? vendorsId, String? name});
}
/// @nodoc
class __$$UpdateModelRequestImplCopyWithImpl<$Res>
extends _$UpdateModelRequestCopyWithImpl<$Res, _$UpdateModelRequestImpl>
implements _$$UpdateModelRequestImplCopyWith<$Res> {
__$$UpdateModelRequestImplCopyWithImpl(_$UpdateModelRequestImpl _value,
$Res Function(_$UpdateModelRequestImpl) _then)
: super(_value, _then);
/// Create a copy of UpdateModelRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? vendorsId = freezed,
Object? name = freezed,
}) {
return _then(_$UpdateModelRequestImpl(
vendorsId: freezed == vendorsId
? _value.vendorsId
: vendorsId // ignore: cast_nullable_to_non_nullable
as int?,
name: freezed == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$UpdateModelRequestImpl implements _UpdateModelRequest {
const _$UpdateModelRequestImpl(
{@JsonKey(name: 'vendors_id') this.vendorsId, this.name});
factory _$UpdateModelRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$UpdateModelRequestImplFromJson(json);
@override
@JsonKey(name: 'vendors_id')
final int? vendorsId;
@override
final String? name;
@override
String toString() {
return 'UpdateModelRequest(vendorsId: $vendorsId, name: $name)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UpdateModelRequestImpl &&
(identical(other.vendorsId, vendorsId) ||
other.vendorsId == vendorsId) &&
(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, vendorsId, name);
/// Create a copy of UpdateModelRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UpdateModelRequestImplCopyWith<_$UpdateModelRequestImpl> get copyWith =>
__$$UpdateModelRequestImplCopyWithImpl<_$UpdateModelRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$UpdateModelRequestImplToJson(
this,
);
}
}
abstract class _UpdateModelRequest implements UpdateModelRequest {
const factory _UpdateModelRequest(
{@JsonKey(name: 'vendors_id') final int? vendorsId,
final String? name}) = _$UpdateModelRequestImpl;
factory _UpdateModelRequest.fromJson(Map<String, dynamic> json) =
_$UpdateModelRequestImpl.fromJson;
@override
@JsonKey(name: 'vendors_id')
int? get vendorsId;
@override
String? get name;
/// Create a copy of UpdateModelRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UpdateModelRequestImplCopyWith<_$UpdateModelRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -0,0 +1,79 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'model_dto.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$ModelDtoImpl _$$ModelDtoImplFromJson(Map<String, dynamic> json) =>
_$ModelDtoImpl(
id: (json['id'] as num).toInt(),
vendorsId: (json['vendors_id'] as num).toInt(),
vendorName: json['vendor_name'] as String?,
name: json['name'] as String,
isDeleted: json['is_deleted'] as bool,
registeredAt: DateTime.parse(json['registered_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$ModelDtoImplToJson(_$ModelDtoImpl instance) =>
<String, dynamic>{
'id': instance.id,
'vendors_id': instance.vendorsId,
'vendor_name': instance.vendorName,
'name': instance.name,
'is_deleted': instance.isDeleted,
'registered_at': instance.registeredAt.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
};
_$ModelListDtoImpl _$$ModelListDtoImplFromJson(Map<String, dynamic> json) =>
_$ModelListDtoImpl(
items: (json['data'] as List<dynamic>)
.map((e) => ModelDto.fromJson(e as Map<String, dynamic>))
.toList(),
total: (json['total'] as num).toInt(),
page: (json['page'] as num).toInt(),
perPage: (json['page_size'] as num).toInt(),
totalPages: (json['total_pages'] as num).toInt(),
);
Map<String, dynamic> _$$ModelListDtoImplToJson(_$ModelListDtoImpl instance) =>
<String, dynamic>{
'data': instance.items,
'total': instance.total,
'page': instance.page,
'page_size': instance.perPage,
'total_pages': instance.totalPages,
};
_$CreateModelRequestImpl _$$CreateModelRequestImplFromJson(
Map<String, dynamic> json) =>
_$CreateModelRequestImpl(
vendorsId: (json['vendors_id'] as num).toInt(),
name: json['name'] as String,
);
Map<String, dynamic> _$$CreateModelRequestImplToJson(
_$CreateModelRequestImpl instance) =>
<String, dynamic>{
'vendors_id': instance.vendorsId,
'name': instance.name,
};
_$UpdateModelRequestImpl _$$UpdateModelRequestImplFromJson(
Map<String, dynamic> json) =>
_$UpdateModelRequestImpl(
vendorsId: (json['vendors_id'] as num?)?.toInt(),
name: json['name'] as String?,
);
Map<String, dynamic> _$$UpdateModelRequestImplToJson(
_$UpdateModelRequestImpl instance) =>
<String, dynamic>{
'vendors_id': instance.vendorsId,
'name': instance.name,
};