clean: Phase 1 - 26개 미사용 파일 삭제 완료
삭제된 파일: - 구식 Equipment 모델: 18개 파일 (6개 모델 × 3개씩) - 미사용 UseCase 컨테이너: 5개 파일 - 레거시 UI 컴포넌트: 5개 파일 - Import 오류 수정: custom_widgets.dart 정리 총 28개 변경사항 (삭제 26개 + 수정 1개 + 기타) Flutter analyze: ERROR 0개 ✅ Build test: 성공 ✅ 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'equipment_in_request.freezed.dart';
|
||||
part 'equipment_in_request.g.dart';
|
||||
|
||||
@freezed
|
||||
class EquipmentInRequest with _$EquipmentInRequest {
|
||||
const factory EquipmentInRequest({
|
||||
required int equipmentId,
|
||||
required int quantity,
|
||||
int? warehouseLocationId,
|
||||
String? notes,
|
||||
}) = _EquipmentInRequest;
|
||||
|
||||
factory EquipmentInRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentInRequestFromJson(json);
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
// 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 'equipment_in_request.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');
|
||||
|
||||
EquipmentInRequest _$EquipmentInRequestFromJson(Map<String, dynamic> json) {
|
||||
return _EquipmentInRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$EquipmentInRequest {
|
||||
int get equipmentId => throw _privateConstructorUsedError;
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
int? get warehouseLocationId => throw _privateConstructorUsedError;
|
||||
String? get notes => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this EquipmentInRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of EquipmentInRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$EquipmentInRequestCopyWith<EquipmentInRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $EquipmentInRequestCopyWith<$Res> {
|
||||
factory $EquipmentInRequestCopyWith(
|
||||
EquipmentInRequest value, $Res Function(EquipmentInRequest) then) =
|
||||
_$EquipmentInRequestCopyWithImpl<$Res, EquipmentInRequest>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int equipmentId, int quantity, int? warehouseLocationId, String? notes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$EquipmentInRequestCopyWithImpl<$Res, $Val extends EquipmentInRequest>
|
||||
implements $EquipmentInRequestCopyWith<$Res> {
|
||||
_$EquipmentInRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of EquipmentInRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // 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 _$$EquipmentInRequestImplCopyWith<$Res>
|
||||
implements $EquipmentInRequestCopyWith<$Res> {
|
||||
factory _$$EquipmentInRequestImplCopyWith(_$EquipmentInRequestImpl value,
|
||||
$Res Function(_$EquipmentInRequestImpl) then) =
|
||||
__$$EquipmentInRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int equipmentId, int quantity, int? warehouseLocationId, String? notes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$EquipmentInRequestImplCopyWithImpl<$Res>
|
||||
extends _$EquipmentInRequestCopyWithImpl<$Res, _$EquipmentInRequestImpl>
|
||||
implements _$$EquipmentInRequestImplCopyWith<$Res> {
|
||||
__$$EquipmentInRequestImplCopyWithImpl(_$EquipmentInRequestImpl _value,
|
||||
$Res Function(_$EquipmentInRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of EquipmentInRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(_$EquipmentInRequestImpl(
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$EquipmentInRequestImpl implements _EquipmentInRequest {
|
||||
const _$EquipmentInRequestImpl(
|
||||
{required this.equipmentId,
|
||||
required this.quantity,
|
||||
this.warehouseLocationId,
|
||||
this.notes});
|
||||
|
||||
factory _$EquipmentInRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$EquipmentInRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int equipmentId;
|
||||
@override
|
||||
final int quantity;
|
||||
@override
|
||||
final int? warehouseLocationId;
|
||||
@override
|
||||
final String? notes;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EquipmentInRequest(equipmentId: $equipmentId, quantity: $quantity, warehouseLocationId: $warehouseLocationId, notes: $notes)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$EquipmentInRequestImpl &&
|
||||
(identical(other.equipmentId, equipmentId) ||
|
||||
other.equipmentId == equipmentId) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.warehouseLocationId, warehouseLocationId) ||
|
||||
other.warehouseLocationId == warehouseLocationId) &&
|
||||
(identical(other.notes, notes) || other.notes == notes));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, equipmentId, quantity, warehouseLocationId, notes);
|
||||
|
||||
/// Create a copy of EquipmentInRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$EquipmentInRequestImplCopyWith<_$EquipmentInRequestImpl> get copyWith =>
|
||||
__$$EquipmentInRequestImplCopyWithImpl<_$EquipmentInRequestImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$EquipmentInRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _EquipmentInRequest implements EquipmentInRequest {
|
||||
const factory _EquipmentInRequest(
|
||||
{required final int equipmentId,
|
||||
required final int quantity,
|
||||
final int? warehouseLocationId,
|
||||
final String? notes}) = _$EquipmentInRequestImpl;
|
||||
|
||||
factory _EquipmentInRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$EquipmentInRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get equipmentId;
|
||||
@override
|
||||
int get quantity;
|
||||
@override
|
||||
int? get warehouseLocationId;
|
||||
@override
|
||||
String? get notes;
|
||||
|
||||
/// Create a copy of EquipmentInRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$EquipmentInRequestImplCopyWith<_$EquipmentInRequestImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_in_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentInRequestImpl _$$EquipmentInRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentInRequestImpl(
|
||||
equipmentId: (json['equipmentId'] as num).toInt(),
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
|
||||
notes: json['notes'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentInRequestImplToJson(
|
||||
_$EquipmentInRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'equipmentId': instance.equipmentId,
|
||||
'quantity': instance.quantity,
|
||||
'warehouseLocationId': instance.warehouseLocationId,
|
||||
'notes': instance.notes,
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'equipment_io_response.freezed.dart';
|
||||
part 'equipment_io_response.g.dart';
|
||||
|
||||
@freezed
|
||||
class EquipmentIoResponse with _$EquipmentIoResponse {
|
||||
const factory EquipmentIoResponse({
|
||||
required bool success,
|
||||
required String message,
|
||||
required int transactionId,
|
||||
required int equipmentId,
|
||||
required int quantity,
|
||||
required String transactionType,
|
||||
required DateTime transactionDate,
|
||||
}) = _EquipmentIoResponse;
|
||||
|
||||
factory EquipmentIoResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentIoResponseFromJson(json);
|
||||
}
|
||||
@@ -1,295 +0,0 @@
|
||||
// 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 'equipment_io_response.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');
|
||||
|
||||
EquipmentIoResponse _$EquipmentIoResponseFromJson(Map<String, dynamic> json) {
|
||||
return _EquipmentIoResponse.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$EquipmentIoResponse {
|
||||
bool get success => throw _privateConstructorUsedError;
|
||||
String get message => throw _privateConstructorUsedError;
|
||||
int get transactionId => throw _privateConstructorUsedError;
|
||||
int get equipmentId => throw _privateConstructorUsedError;
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
String get transactionType => throw _privateConstructorUsedError;
|
||||
DateTime get transactionDate => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this EquipmentIoResponse to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of EquipmentIoResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$EquipmentIoResponseCopyWith<EquipmentIoResponse> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $EquipmentIoResponseCopyWith<$Res> {
|
||||
factory $EquipmentIoResponseCopyWith(
|
||||
EquipmentIoResponse value, $Res Function(EquipmentIoResponse) then) =
|
||||
_$EquipmentIoResponseCopyWithImpl<$Res, EquipmentIoResponse>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool success,
|
||||
String message,
|
||||
int transactionId,
|
||||
int equipmentId,
|
||||
int quantity,
|
||||
String transactionType,
|
||||
DateTime transactionDate});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$EquipmentIoResponseCopyWithImpl<$Res, $Val extends EquipmentIoResponse>
|
||||
implements $EquipmentIoResponseCopyWith<$Res> {
|
||||
_$EquipmentIoResponseCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of EquipmentIoResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? success = null,
|
||||
Object? message = null,
|
||||
Object? transactionId = null,
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? transactionType = null,
|
||||
Object? transactionDate = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
success: null == success
|
||||
? _value.success
|
||||
: success // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
message: null == message
|
||||
? _value.message
|
||||
: message // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
transactionId: null == transactionId
|
||||
? _value.transactionId
|
||||
: transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
transactionType: null == transactionType
|
||||
? _value.transactionType
|
||||
: transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
transactionDate: null == transactionDate
|
||||
? _value.transactionDate
|
||||
: transactionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$EquipmentIoResponseImplCopyWith<$Res>
|
||||
implements $EquipmentIoResponseCopyWith<$Res> {
|
||||
factory _$$EquipmentIoResponseImplCopyWith(_$EquipmentIoResponseImpl value,
|
||||
$Res Function(_$EquipmentIoResponseImpl) then) =
|
||||
__$$EquipmentIoResponseImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool success,
|
||||
String message,
|
||||
int transactionId,
|
||||
int equipmentId,
|
||||
int quantity,
|
||||
String transactionType,
|
||||
DateTime transactionDate});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$EquipmentIoResponseImplCopyWithImpl<$Res>
|
||||
extends _$EquipmentIoResponseCopyWithImpl<$Res, _$EquipmentIoResponseImpl>
|
||||
implements _$$EquipmentIoResponseImplCopyWith<$Res> {
|
||||
__$$EquipmentIoResponseImplCopyWithImpl(_$EquipmentIoResponseImpl _value,
|
||||
$Res Function(_$EquipmentIoResponseImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of EquipmentIoResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? success = null,
|
||||
Object? message = null,
|
||||
Object? transactionId = null,
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? transactionType = null,
|
||||
Object? transactionDate = null,
|
||||
}) {
|
||||
return _then(_$EquipmentIoResponseImpl(
|
||||
success: null == success
|
||||
? _value.success
|
||||
: success // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
message: null == message
|
||||
? _value.message
|
||||
: message // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
transactionId: null == transactionId
|
||||
? _value.transactionId
|
||||
: transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
transactionType: null == transactionType
|
||||
? _value.transactionType
|
||||
: transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
transactionDate: null == transactionDate
|
||||
? _value.transactionDate
|
||||
: transactionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$EquipmentIoResponseImpl implements _EquipmentIoResponse {
|
||||
const _$EquipmentIoResponseImpl(
|
||||
{required this.success,
|
||||
required this.message,
|
||||
required this.transactionId,
|
||||
required this.equipmentId,
|
||||
required this.quantity,
|
||||
required this.transactionType,
|
||||
required this.transactionDate});
|
||||
|
||||
factory _$EquipmentIoResponseImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$EquipmentIoResponseImplFromJson(json);
|
||||
|
||||
@override
|
||||
final bool success;
|
||||
@override
|
||||
final String message;
|
||||
@override
|
||||
final int transactionId;
|
||||
@override
|
||||
final int equipmentId;
|
||||
@override
|
||||
final int quantity;
|
||||
@override
|
||||
final String transactionType;
|
||||
@override
|
||||
final DateTime transactionDate;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EquipmentIoResponse(success: $success, message: $message, transactionId: $transactionId, equipmentId: $equipmentId, quantity: $quantity, transactionType: $transactionType, transactionDate: $transactionDate)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$EquipmentIoResponseImpl &&
|
||||
(identical(other.success, success) || other.success == success) &&
|
||||
(identical(other.message, message) || other.message == message) &&
|
||||
(identical(other.transactionId, transactionId) ||
|
||||
other.transactionId == transactionId) &&
|
||||
(identical(other.equipmentId, equipmentId) ||
|
||||
other.equipmentId == equipmentId) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.transactionType, transactionType) ||
|
||||
other.transactionType == transactionType) &&
|
||||
(identical(other.transactionDate, transactionDate) ||
|
||||
other.transactionDate == transactionDate));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, success, message, transactionId,
|
||||
equipmentId, quantity, transactionType, transactionDate);
|
||||
|
||||
/// Create a copy of EquipmentIoResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$EquipmentIoResponseImplCopyWith<_$EquipmentIoResponseImpl> get copyWith =>
|
||||
__$$EquipmentIoResponseImplCopyWithImpl<_$EquipmentIoResponseImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$EquipmentIoResponseImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _EquipmentIoResponse implements EquipmentIoResponse {
|
||||
const factory _EquipmentIoResponse(
|
||||
{required final bool success,
|
||||
required final String message,
|
||||
required final int transactionId,
|
||||
required final int equipmentId,
|
||||
required final int quantity,
|
||||
required final String transactionType,
|
||||
required final DateTime transactionDate}) = _$EquipmentIoResponseImpl;
|
||||
|
||||
factory _EquipmentIoResponse.fromJson(Map<String, dynamic> json) =
|
||||
_$EquipmentIoResponseImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get success;
|
||||
@override
|
||||
String get message;
|
||||
@override
|
||||
int get transactionId;
|
||||
@override
|
||||
int get equipmentId;
|
||||
@override
|
||||
int get quantity;
|
||||
@override
|
||||
String get transactionType;
|
||||
@override
|
||||
DateTime get transactionDate;
|
||||
|
||||
/// Create a copy of EquipmentIoResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$EquipmentIoResponseImplCopyWith<_$EquipmentIoResponseImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_io_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentIoResponseImpl _$$EquipmentIoResponseImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentIoResponseImpl(
|
||||
success: json['success'] as bool,
|
||||
message: json['message'] as String,
|
||||
transactionId: (json['transactionId'] as num).toInt(),
|
||||
equipmentId: (json['equipmentId'] as num).toInt(),
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
transactionType: json['transactionType'] as String,
|
||||
transactionDate: DateTime.parse(json['transactionDate'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentIoResponseImplToJson(
|
||||
_$EquipmentIoResponseImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'success': instance.success,
|
||||
'message': instance.message,
|
||||
'transactionId': instance.transactionId,
|
||||
'equipmentId': instance.equipmentId,
|
||||
'quantity': instance.quantity,
|
||||
'transactionType': instance.transactionType,
|
||||
'transactionDate': instance.transactionDate.toIso8601String(),
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'equipment_out_request.freezed.dart';
|
||||
part 'equipment_out_request.g.dart';
|
||||
|
||||
@freezed
|
||||
class EquipmentOutRequest with _$EquipmentOutRequest {
|
||||
const factory EquipmentOutRequest({
|
||||
required int equipmentId,
|
||||
required int quantity,
|
||||
required int companyId,
|
||||
String? notes,
|
||||
}) = _EquipmentOutRequest;
|
||||
|
||||
factory EquipmentOutRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentOutRequestFromJson(json);
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
// 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 'equipment_out_request.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');
|
||||
|
||||
EquipmentOutRequest _$EquipmentOutRequestFromJson(Map<String, dynamic> json) {
|
||||
return _EquipmentOutRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$EquipmentOutRequest {
|
||||
int get equipmentId => throw _privateConstructorUsedError;
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
int get companyId => throw _privateConstructorUsedError;
|
||||
String? get notes => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this EquipmentOutRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of EquipmentOutRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$EquipmentOutRequestCopyWith<EquipmentOutRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $EquipmentOutRequestCopyWith<$Res> {
|
||||
factory $EquipmentOutRequestCopyWith(
|
||||
EquipmentOutRequest value, $Res Function(EquipmentOutRequest) then) =
|
||||
_$EquipmentOutRequestCopyWithImpl<$Res, EquipmentOutRequest>;
|
||||
@useResult
|
||||
$Res call({int equipmentId, int quantity, int companyId, String? notes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$EquipmentOutRequestCopyWithImpl<$Res, $Val extends EquipmentOutRequest>
|
||||
implements $EquipmentOutRequestCopyWith<$Res> {
|
||||
_$EquipmentOutRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of EquipmentOutRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? companyId = null,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
companyId: null == companyId
|
||||
? _value.companyId
|
||||
: companyId // 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 _$$EquipmentOutRequestImplCopyWith<$Res>
|
||||
implements $EquipmentOutRequestCopyWith<$Res> {
|
||||
factory _$$EquipmentOutRequestImplCopyWith(_$EquipmentOutRequestImpl value,
|
||||
$Res Function(_$EquipmentOutRequestImpl) then) =
|
||||
__$$EquipmentOutRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int equipmentId, int quantity, int companyId, String? notes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$EquipmentOutRequestImplCopyWithImpl<$Res>
|
||||
extends _$EquipmentOutRequestCopyWithImpl<$Res, _$EquipmentOutRequestImpl>
|
||||
implements _$$EquipmentOutRequestImplCopyWith<$Res> {
|
||||
__$$EquipmentOutRequestImplCopyWithImpl(_$EquipmentOutRequestImpl _value,
|
||||
$Res Function(_$EquipmentOutRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of EquipmentOutRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentId = null,
|
||||
Object? quantity = null,
|
||||
Object? companyId = null,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(_$EquipmentOutRequestImpl(
|
||||
equipmentId: null == equipmentId
|
||||
? _value.equipmentId
|
||||
: equipmentId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
companyId: null == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$EquipmentOutRequestImpl implements _EquipmentOutRequest {
|
||||
const _$EquipmentOutRequestImpl(
|
||||
{required this.equipmentId,
|
||||
required this.quantity,
|
||||
required this.companyId,
|
||||
this.notes});
|
||||
|
||||
factory _$EquipmentOutRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$EquipmentOutRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int equipmentId;
|
||||
@override
|
||||
final int quantity;
|
||||
@override
|
||||
final int companyId;
|
||||
@override
|
||||
final String? notes;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EquipmentOutRequest(equipmentId: $equipmentId, quantity: $quantity, companyId: $companyId, notes: $notes)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$EquipmentOutRequestImpl &&
|
||||
(identical(other.equipmentId, equipmentId) ||
|
||||
other.equipmentId == equipmentId) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.notes, notes) || other.notes == notes));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, equipmentId, quantity, companyId, notes);
|
||||
|
||||
/// Create a copy of EquipmentOutRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$EquipmentOutRequestImplCopyWith<_$EquipmentOutRequestImpl> get copyWith =>
|
||||
__$$EquipmentOutRequestImplCopyWithImpl<_$EquipmentOutRequestImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$EquipmentOutRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _EquipmentOutRequest implements EquipmentOutRequest {
|
||||
const factory _EquipmentOutRequest(
|
||||
{required final int equipmentId,
|
||||
required final int quantity,
|
||||
required final int companyId,
|
||||
final String? notes}) = _$EquipmentOutRequestImpl;
|
||||
|
||||
factory _EquipmentOutRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$EquipmentOutRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get equipmentId;
|
||||
@override
|
||||
int get quantity;
|
||||
@override
|
||||
int get companyId;
|
||||
@override
|
||||
String? get notes;
|
||||
|
||||
/// Create a copy of EquipmentOutRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$EquipmentOutRequestImplCopyWith<_$EquipmentOutRequestImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_out_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentOutRequestImpl _$$EquipmentOutRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentOutRequestImpl(
|
||||
equipmentId: (json['equipmentId'] as num).toInt(),
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
companyId: (json['companyId'] as num).toInt(),
|
||||
notes: json['notes'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentOutRequestImplToJson(
|
||||
_$EquipmentOutRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'equipmentId': instance.equipmentId,
|
||||
'quantity': instance.quantity,
|
||||
'companyId': instance.companyId,
|
||||
'notes': instance.notes,
|
||||
};
|
||||
@@ -1,81 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'equipment_request.freezed.dart';
|
||||
part 'equipment_request.g.dart';
|
||||
|
||||
/// NaiveDate 형식으로 변환하는 JsonConverter (날짜만, 시간 제외)
|
||||
class NaiveDateConverter implements JsonConverter<DateTime?, String?> {
|
||||
const NaiveDateConverter();
|
||||
|
||||
@override
|
||||
DateTime? fromJson(String? json) {
|
||||
return json != null ? DateTime.parse(json) : null;
|
||||
}
|
||||
|
||||
@override
|
||||
String? toJson(DateTime? object) {
|
||||
// NaiveDate 형식으로 변환: "YYYY-MM-DD"
|
||||
return object?.toIso8601String().split('T')[0];
|
||||
}
|
||||
}
|
||||
|
||||
/// Decimal 호환성을 위한 JsonConverter
|
||||
class DecimalConverter implements JsonConverter<double?, dynamic> {
|
||||
const DecimalConverter();
|
||||
|
||||
@override
|
||||
double? fromJson(dynamic json) {
|
||||
if (json == null) return null;
|
||||
if (json is num) return json.toDouble();
|
||||
if (json is String) return double.tryParse(json);
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
dynamic toJson(double? object) {
|
||||
// Rust Decimal과 호환을 위해 문자열로 전송
|
||||
return object?.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@freezed
|
||||
class CreateEquipmentRequest with _$CreateEquipmentRequest {
|
||||
const factory CreateEquipmentRequest({
|
||||
@JsonKey(name: 'equipment_number') required String equipmentNumber,
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date') @NaiveDateConverter() DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') @DecimalConverter() double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') @NaiveDateConverter() DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') @NaiveDateConverter() DateTime? nextInspectionDate,
|
||||
String? remark,
|
||||
}) = _CreateEquipmentRequest;
|
||||
|
||||
factory CreateEquipmentRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateEquipmentRequestFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class UpdateEquipmentRequest with _$UpdateEquipmentRequest {
|
||||
const factory UpdateEquipmentRequest({
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@JsonKey(name: 'models_id', includeIfNull: false) int? modelsId,
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false) String? serialNumber,
|
||||
@JsonKey(includeIfNull: false) String? barcode,
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false) @NaiveDateConverter() DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false) @DecimalConverter() double? purchasePrice,
|
||||
@JsonKey(includeIfNull: false) String? status,
|
||||
@JsonKey(name: 'company_id', includeIfNull: false) int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false) int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false) @NaiveDateConverter() DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false) @NaiveDateConverter() DateTime? nextInspectionDate,
|
||||
@JsonKey(includeIfNull: false) String? remark,
|
||||
}) = _UpdateEquipmentRequest;
|
||||
|
||||
factory UpdateEquipmentRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$UpdateEquipmentRequestFromJson(json);
|
||||
}
|
||||
@@ -1,932 +0,0 @@
|
||||
// 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 'equipment_request.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');
|
||||
|
||||
CreateEquipmentRequest _$CreateEquipmentRequestFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _CreateEquipmentRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CreateEquipmentRequest {
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String get equipmentNumber =>
|
||||
throw _privateConstructorUsedError; // Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@JsonKey(name: 'models_id')
|
||||
int? get modelsId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber => throw _privateConstructorUsedError;
|
||||
String? get barcode => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CreateEquipmentRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CreateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CreateEquipmentRequestCopyWith<CreateEquipmentRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CreateEquipmentRequestCopyWith<$Res> {
|
||||
factory $CreateEquipmentRequestCopyWith(CreateEquipmentRequest value,
|
||||
$Res Function(CreateEquipmentRequest) then) =
|
||||
_$CreateEquipmentRequestCopyWithImpl<$Res, CreateEquipmentRequest>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? nextInspectionDate,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CreateEquipmentRequestCopyWithImpl<$Res,
|
||||
$Val extends CreateEquipmentRequest>
|
||||
implements $CreateEquipmentRequestCopyWith<$Res> {
|
||||
_$CreateEquipmentRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CreateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentNumber = null,
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
equipmentNumber: null == equipmentNumber
|
||||
? _value.equipmentNumber
|
||||
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CreateEquipmentRequestImplCopyWith<$Res>
|
||||
implements $CreateEquipmentRequestCopyWith<$Res> {
|
||||
factory _$$CreateEquipmentRequestImplCopyWith(
|
||||
_$CreateEquipmentRequestImpl value,
|
||||
$Res Function(_$CreateEquipmentRequestImpl) then) =
|
||||
__$$CreateEquipmentRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? nextInspectionDate,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CreateEquipmentRequestImplCopyWithImpl<$Res>
|
||||
extends _$CreateEquipmentRequestCopyWithImpl<$Res,
|
||||
_$CreateEquipmentRequestImpl>
|
||||
implements _$$CreateEquipmentRequestImplCopyWith<$Res> {
|
||||
__$$CreateEquipmentRequestImplCopyWithImpl(
|
||||
_$CreateEquipmentRequestImpl _value,
|
||||
$Res Function(_$CreateEquipmentRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CreateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? equipmentNumber = null,
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_$CreateEquipmentRequestImpl(
|
||||
equipmentNumber: null == equipmentNumber
|
||||
? _value.equipmentNumber
|
||||
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
|
||||
const _$CreateEquipmentRequestImpl(
|
||||
{@JsonKey(name: 'equipment_number') required this.equipmentNumber,
|
||||
@JsonKey(name: 'models_id') this.modelsId,
|
||||
@JsonKey(name: 'serial_number') this.serialNumber,
|
||||
this.barcode,
|
||||
@JsonKey(name: 'purchase_date') @NaiveDateConverter() this.purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') @DecimalConverter() this.purchasePrice,
|
||||
@JsonKey(name: 'company_id') this.companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
this.lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
this.nextInspectionDate,
|
||||
this.remark});
|
||||
|
||||
factory _$CreateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CreateEquipmentRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
final String equipmentNumber;
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@override
|
||||
@JsonKey(name: 'models_id')
|
||||
final int? modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
final String? serialNumber;
|
||||
@override
|
||||
final String? barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
final int? companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
final int? warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? nextInspectionDate;
|
||||
@override
|
||||
final String? remark;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateEquipmentRequest(equipmentNumber: $equipmentNumber, modelsId: $modelsId, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, companyId: $companyId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CreateEquipmentRequestImpl &&
|
||||
(identical(other.equipmentNumber, equipmentNumber) ||
|
||||
other.equipmentNumber == equipmentNumber) &&
|
||||
(identical(other.modelsId, modelsId) ||
|
||||
other.modelsId == modelsId) &&
|
||||
(identical(other.serialNumber, serialNumber) ||
|
||||
other.serialNumber == serialNumber) &&
|
||||
(identical(other.barcode, barcode) || other.barcode == barcode) &&
|
||||
(identical(other.purchaseDate, purchaseDate) ||
|
||||
other.purchaseDate == purchaseDate) &&
|
||||
(identical(other.purchasePrice, purchasePrice) ||
|
||||
other.purchasePrice == purchasePrice) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.warehouseLocationId, warehouseLocationId) ||
|
||||
other.warehouseLocationId == warehouseLocationId) &&
|
||||
(identical(other.lastInspectionDate, lastInspectionDate) ||
|
||||
other.lastInspectionDate == lastInspectionDate) &&
|
||||
(identical(other.nextInspectionDate, nextInspectionDate) ||
|
||||
other.nextInspectionDate == nextInspectionDate) &&
|
||||
(identical(other.remark, remark) || other.remark == remark));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
equipmentNumber,
|
||||
modelsId,
|
||||
serialNumber,
|
||||
barcode,
|
||||
purchaseDate,
|
||||
purchasePrice,
|
||||
companyId,
|
||||
warehouseLocationId,
|
||||
lastInspectionDate,
|
||||
nextInspectionDate,
|
||||
remark);
|
||||
|
||||
/// Create a copy of CreateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CreateEquipmentRequestImplCopyWith<_$CreateEquipmentRequestImpl>
|
||||
get copyWith => __$$CreateEquipmentRequestImplCopyWithImpl<
|
||||
_$CreateEquipmentRequestImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CreateEquipmentRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _CreateEquipmentRequest implements CreateEquipmentRequest {
|
||||
const factory _CreateEquipmentRequest(
|
||||
{@JsonKey(name: 'equipment_number') required final String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') final int? modelsId,
|
||||
@JsonKey(name: 'serial_number') final String? serialNumber,
|
||||
final String? barcode,
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
final double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') final int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
final DateTime? nextInspectionDate,
|
||||
final String? remark}) = _$CreateEquipmentRequestImpl;
|
||||
|
||||
factory _CreateEquipmentRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$CreateEquipmentRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String
|
||||
get equipmentNumber; // Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@override
|
||||
@JsonKey(name: 'models_id')
|
||||
int? get modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber;
|
||||
@override
|
||||
String? get barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
@DecimalConverter()
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
@NaiveDateConverter()
|
||||
DateTime? get nextInspectionDate;
|
||||
@override
|
||||
String? get remark;
|
||||
|
||||
/// Create a copy of CreateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CreateEquipmentRequestImplCopyWith<_$CreateEquipmentRequestImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
UpdateEquipmentRequest _$UpdateEquipmentRequestFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _UpdateEquipmentRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UpdateEquipmentRequest {
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@JsonKey(name: 'models_id', includeIfNull: false)
|
||||
int? get modelsId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
String? get serialNumber => throw _privateConstructorUsedError;
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get barcode => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get status => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_id', includeIfNull: false)
|
||||
int? get companyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
int? get warehouseLocationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this UpdateEquipmentRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of UpdateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UpdateEquipmentRequestCopyWith<UpdateEquipmentRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UpdateEquipmentRequestCopyWith<$Res> {
|
||||
factory $UpdateEquipmentRequestCopyWith(UpdateEquipmentRequest value,
|
||||
$Res Function(UpdateEquipmentRequest) then) =
|
||||
_$UpdateEquipmentRequestCopyWithImpl<$Res, UpdateEquipmentRequest>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'models_id', includeIfNull: false) int? modelsId,
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
String? serialNumber,
|
||||
@JsonKey(includeIfNull: false) String? barcode,
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
double? purchasePrice,
|
||||
@JsonKey(includeIfNull: false) String? status,
|
||||
@JsonKey(name: 'company_id', includeIfNull: false) int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? nextInspectionDate,
|
||||
@JsonKey(includeIfNull: false) String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UpdateEquipmentRequestCopyWithImpl<$Res,
|
||||
$Val extends UpdateEquipmentRequest>
|
||||
implements $UpdateEquipmentRequestCopyWith<$Res> {
|
||||
_$UpdateEquipmentRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of UpdateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? status = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
status: freezed == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UpdateEquipmentRequestImplCopyWith<$Res>
|
||||
implements $UpdateEquipmentRequestCopyWith<$Res> {
|
||||
factory _$$UpdateEquipmentRequestImplCopyWith(
|
||||
_$UpdateEquipmentRequestImpl value,
|
||||
$Res Function(_$UpdateEquipmentRequestImpl) then) =
|
||||
__$$UpdateEquipmentRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'models_id', includeIfNull: false) int? modelsId,
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
String? serialNumber,
|
||||
@JsonKey(includeIfNull: false) String? barcode,
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
double? purchasePrice,
|
||||
@JsonKey(includeIfNull: false) String? status,
|
||||
@JsonKey(name: 'company_id', includeIfNull: false) int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? nextInspectionDate,
|
||||
@JsonKey(includeIfNull: false) String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UpdateEquipmentRequestImplCopyWithImpl<$Res>
|
||||
extends _$UpdateEquipmentRequestCopyWithImpl<$Res,
|
||||
_$UpdateEquipmentRequestImpl>
|
||||
implements _$$UpdateEquipmentRequestImplCopyWith<$Res> {
|
||||
__$$UpdateEquipmentRequestImplCopyWithImpl(
|
||||
_$UpdateEquipmentRequestImpl _value,
|
||||
$Res Function(_$UpdateEquipmentRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of UpdateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? status = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_$UpdateEquipmentRequestImpl(
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
status: freezed == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
|
||||
const _$UpdateEquipmentRequestImpl(
|
||||
{@JsonKey(name: 'models_id', includeIfNull: false) this.modelsId,
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false) this.serialNumber,
|
||||
@JsonKey(includeIfNull: false) this.barcode,
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
this.purchaseDate,
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
this.purchasePrice,
|
||||
@JsonKey(includeIfNull: false) this.status,
|
||||
@JsonKey(name: 'company_id', includeIfNull: false) this.companyId,
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
this.warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
this.lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
this.nextInspectionDate,
|
||||
@JsonKey(includeIfNull: false) this.remark});
|
||||
|
||||
factory _$UpdateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UpdateEquipmentRequestImplFromJson(json);
|
||||
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@override
|
||||
@JsonKey(name: 'models_id', includeIfNull: false)
|
||||
final int? modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
final String? serialNumber;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? status;
|
||||
@override
|
||||
@JsonKey(name: 'company_id', includeIfNull: false)
|
||||
final int? companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
final int? warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? nextInspectionDate;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? remark;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateEquipmentRequest(modelsId: $modelsId, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, status: $status, companyId: $companyId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UpdateEquipmentRequestImpl &&
|
||||
(identical(other.modelsId, modelsId) ||
|
||||
other.modelsId == modelsId) &&
|
||||
(identical(other.serialNumber, serialNumber) ||
|
||||
other.serialNumber == serialNumber) &&
|
||||
(identical(other.barcode, barcode) || other.barcode == barcode) &&
|
||||
(identical(other.purchaseDate, purchaseDate) ||
|
||||
other.purchaseDate == purchaseDate) &&
|
||||
(identical(other.purchasePrice, purchasePrice) ||
|
||||
other.purchasePrice == purchasePrice) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.warehouseLocationId, warehouseLocationId) ||
|
||||
other.warehouseLocationId == warehouseLocationId) &&
|
||||
(identical(other.lastInspectionDate, lastInspectionDate) ||
|
||||
other.lastInspectionDate == lastInspectionDate) &&
|
||||
(identical(other.nextInspectionDate, nextInspectionDate) ||
|
||||
other.nextInspectionDate == nextInspectionDate) &&
|
||||
(identical(other.remark, remark) || other.remark == remark));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
modelsId,
|
||||
serialNumber,
|
||||
barcode,
|
||||
purchaseDate,
|
||||
purchasePrice,
|
||||
status,
|
||||
companyId,
|
||||
warehouseLocationId,
|
||||
lastInspectionDate,
|
||||
nextInspectionDate,
|
||||
remark);
|
||||
|
||||
/// Create a copy of UpdateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UpdateEquipmentRequestImplCopyWith<_$UpdateEquipmentRequestImpl>
|
||||
get copyWith => __$$UpdateEquipmentRequestImplCopyWithImpl<
|
||||
_$UpdateEquipmentRequestImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$UpdateEquipmentRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
|
||||
const factory _UpdateEquipmentRequest(
|
||||
{@JsonKey(name: 'models_id', includeIfNull: false) final int? modelsId,
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
final String? serialNumber,
|
||||
@JsonKey(includeIfNull: false) final String? barcode,
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
final double? purchasePrice,
|
||||
@JsonKey(includeIfNull: false) final String? status,
|
||||
@JsonKey(name: 'company_id', includeIfNull: false) final int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
final int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
final DateTime? nextInspectionDate,
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? remark}) = _$UpdateEquipmentRequestImpl;
|
||||
|
||||
factory _UpdateEquipmentRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$UpdateEquipmentRequestImpl.fromJson;
|
||||
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id
|
||||
@override
|
||||
@JsonKey(name: 'models_id', includeIfNull: false)
|
||||
int? get modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number', includeIfNull: false)
|
||||
String? get serialNumber;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price', includeIfNull: false)
|
||||
@DecimalConverter()
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get status;
|
||||
@override
|
||||
@JsonKey(name: 'company_id', includeIfNull: false)
|
||||
int? get companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
|
||||
int? get warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
|
||||
@NaiveDateConverter()
|
||||
DateTime? get nextInspectionDate;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get remark;
|
||||
|
||||
/// Create a copy of UpdateEquipmentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UpdateEquipmentRequestImplCopyWith<_$UpdateEquipmentRequestImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CreateEquipmentRequestImpl _$$CreateEquipmentRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CreateEquipmentRequestImpl(
|
||||
equipmentNumber: json['equipment_number'] as String,
|
||||
modelsId: (json['models_id'] as num?)?.toInt(),
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
barcode: json['barcode'] as String?,
|
||||
purchaseDate:
|
||||
const NaiveDateConverter().fromJson(json['purchase_date'] as String?),
|
||||
purchasePrice: const DecimalConverter().fromJson(json['purchase_price']),
|
||||
companyId: (json['company_id'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
|
||||
lastInspectionDate: const NaiveDateConverter()
|
||||
.fromJson(json['last_inspection_date'] as String?),
|
||||
nextInspectionDate: const NaiveDateConverter()
|
||||
.fromJson(json['next_inspection_date'] as String?),
|
||||
remark: json['remark'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CreateEquipmentRequestImplToJson(
|
||||
_$CreateEquipmentRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'equipment_number': instance.equipmentNumber,
|
||||
'models_id': instance.modelsId,
|
||||
'serial_number': instance.serialNumber,
|
||||
'barcode': instance.barcode,
|
||||
'purchase_date': const NaiveDateConverter().toJson(instance.purchaseDate),
|
||||
'purchase_price': const DecimalConverter().toJson(instance.purchasePrice),
|
||||
'company_id': instance.companyId,
|
||||
'warehouse_location_id': instance.warehouseLocationId,
|
||||
'last_inspection_date':
|
||||
const NaiveDateConverter().toJson(instance.lastInspectionDate),
|
||||
'next_inspection_date':
|
||||
const NaiveDateConverter().toJson(instance.nextInspectionDate),
|
||||
'remark': instance.remark,
|
||||
};
|
||||
|
||||
_$UpdateEquipmentRequestImpl _$$UpdateEquipmentRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UpdateEquipmentRequestImpl(
|
||||
modelsId: (json['models_id'] as num?)?.toInt(),
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
barcode: json['barcode'] as String?,
|
||||
purchaseDate:
|
||||
const NaiveDateConverter().fromJson(json['purchase_date'] as String?),
|
||||
purchasePrice: const DecimalConverter().fromJson(json['purchase_price']),
|
||||
status: json['status'] as String?,
|
||||
companyId: (json['company_id'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
|
||||
lastInspectionDate: const NaiveDateConverter()
|
||||
.fromJson(json['last_inspection_date'] as String?),
|
||||
nextInspectionDate: const NaiveDateConverter()
|
||||
.fromJson(json['next_inspection_date'] as String?),
|
||||
remark: json['remark'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
|
||||
_$UpdateEquipmentRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.modelsId case final value?) 'models_id': value,
|
||||
if (instance.serialNumber case final value?) 'serial_number': value,
|
||||
if (instance.barcode case final value?) 'barcode': value,
|
||||
if (const NaiveDateConverter().toJson(instance.purchaseDate)
|
||||
case final value?)
|
||||
'purchase_date': value,
|
||||
if (const DecimalConverter().toJson(instance.purchasePrice)
|
||||
case final value?)
|
||||
'purchase_price': value,
|
||||
if (instance.status case final value?) 'status': value,
|
||||
if (instance.companyId case final value?) 'company_id': value,
|
||||
if (instance.warehouseLocationId case final value?)
|
||||
'warehouse_location_id': value,
|
||||
if (const NaiveDateConverter().toJson(instance.lastInspectionDate)
|
||||
case final value?)
|
||||
'last_inspection_date': value,
|
||||
if (const NaiveDateConverter().toJson(instance.nextInspectionDate)
|
||||
case final value?)
|
||||
'next_inspection_date': value,
|
||||
if (instance.remark case final value?) 'remark': value,
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:superport/core/utils/equipment_status_converter.dart';
|
||||
import 'package:superport/data/models/model_dto.dart';
|
||||
|
||||
part 'equipment_response.freezed.dart';
|
||||
part 'equipment_response.g.dart';
|
||||
|
||||
@freezed
|
||||
class EquipmentResponse with _$EquipmentResponse {
|
||||
const factory EquipmentResponse({
|
||||
required int id,
|
||||
@JsonKey(name: 'equipment_number') required String equipmentNumber,
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id and model
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') String? purchasePrice,
|
||||
@EquipmentStatusJsonConverter() required String status,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
|
||||
String? remark,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required DateTime updatedAt,
|
||||
// 추가 필드 (조인된 데이터)
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName,
|
||||
// Sprint 3: Added model relationship (includes vendor info)
|
||||
ModelDto? model,
|
||||
}) = _EquipmentResponse;
|
||||
|
||||
factory EquipmentResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentResponseFromJson(json);
|
||||
}
|
||||
@@ -1,610 +0,0 @@
|
||||
// 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 'equipment_response.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');
|
||||
|
||||
EquipmentResponse _$EquipmentResponseFromJson(Map<String, dynamic> json) {
|
||||
return _EquipmentResponse.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$EquipmentResponse {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String get equipmentNumber =>
|
||||
throw _privateConstructorUsedError; // Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id and model
|
||||
@JsonKey(name: 'models_id')
|
||||
int? get modelsId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber => throw _privateConstructorUsedError;
|
||||
String? get barcode => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_price')
|
||||
String? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@EquipmentStatusJsonConverter()
|
||||
String get status => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt =>
|
||||
throw _privateConstructorUsedError; // 추가 필드 (조인된 데이터)
|
||||
@JsonKey(name: 'company_name')
|
||||
String? get companyName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
String? get warehouseName =>
|
||||
throw _privateConstructorUsedError; // Sprint 3: Added model relationship (includes vendor info)
|
||||
ModelDto? get model => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this EquipmentResponse to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$EquipmentResponseCopyWith<EquipmentResponse> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $EquipmentResponseCopyWith<$Res> {
|
||||
factory $EquipmentResponseCopyWith(
|
||||
EquipmentResponse value, $Res Function(EquipmentResponse) then) =
|
||||
_$EquipmentResponseCopyWithImpl<$Res, EquipmentResponse>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') String? purchasePrice,
|
||||
@EquipmentStatusJsonConverter() String status,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
|
||||
String? remark,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName,
|
||||
ModelDto? model});
|
||||
|
||||
$ModelDtoCopyWith<$Res>? get model;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$EquipmentResponseCopyWithImpl<$Res, $Val extends EquipmentResponse>
|
||||
implements $EquipmentResponseCopyWith<$Res> {
|
||||
_$EquipmentResponseCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? equipmentNumber = null,
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? status = null,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? companyName = freezed,
|
||||
Object? warehouseName = freezed,
|
||||
Object? model = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
equipmentNumber: null == equipmentNumber
|
||||
? _value.equipmentNumber
|
||||
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
status: null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
companyName: freezed == companyName
|
||||
? _value.companyName
|
||||
: companyName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
warehouseName: freezed == warehouseName
|
||||
? _value.warehouseName
|
||||
: warehouseName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
model: freezed == model
|
||||
? _value.model
|
||||
: model // ignore: cast_nullable_to_non_nullable
|
||||
as ModelDto?,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ModelDtoCopyWith<$Res>? get model {
|
||||
if (_value.model == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ModelDtoCopyWith<$Res>(_value.model!, (value) {
|
||||
return _then(_value.copyWith(model: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$EquipmentResponseImplCopyWith<$Res>
|
||||
implements $EquipmentResponseCopyWith<$Res> {
|
||||
factory _$$EquipmentResponseImplCopyWith(_$EquipmentResponseImpl value,
|
||||
$Res Function(_$EquipmentResponseImpl) then) =
|
||||
__$$EquipmentResponseImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') int? modelsId,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String? barcode,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') String? purchasePrice,
|
||||
@EquipmentStatusJsonConverter() String status,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
|
||||
String? remark,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName,
|
||||
ModelDto? model});
|
||||
|
||||
@override
|
||||
$ModelDtoCopyWith<$Res>? get model;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$EquipmentResponseImplCopyWithImpl<$Res>
|
||||
extends _$EquipmentResponseCopyWithImpl<$Res, _$EquipmentResponseImpl>
|
||||
implements _$$EquipmentResponseImplCopyWith<$Res> {
|
||||
__$$EquipmentResponseImplCopyWithImpl(_$EquipmentResponseImpl _value,
|
||||
$Res Function(_$EquipmentResponseImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? equipmentNumber = null,
|
||||
Object? modelsId = freezed,
|
||||
Object? serialNumber = freezed,
|
||||
Object? barcode = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? status = null,
|
||||
Object? companyId = freezed,
|
||||
Object? warehouseLocationId = freezed,
|
||||
Object? lastInspectionDate = freezed,
|
||||
Object? nextInspectionDate = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? companyName = freezed,
|
||||
Object? warehouseName = freezed,
|
||||
Object? model = freezed,
|
||||
}) {
|
||||
return _then(_$EquipmentResponseImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
equipmentNumber: null == equipmentNumber
|
||||
? _value.equipmentNumber
|
||||
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
modelsId: freezed == modelsId
|
||||
? _value.modelsId
|
||||
: modelsId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
serialNumber: freezed == serialNumber
|
||||
? _value.serialNumber
|
||||
: serialNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
barcode: freezed == barcode
|
||||
? _value.barcode
|
||||
: barcode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
status: null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
warehouseLocationId: freezed == warehouseLocationId
|
||||
? _value.warehouseLocationId
|
||||
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
lastInspectionDate: freezed == lastInspectionDate
|
||||
? _value.lastInspectionDate
|
||||
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
nextInspectionDate: freezed == nextInspectionDate
|
||||
? _value.nextInspectionDate
|
||||
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
companyName: freezed == companyName
|
||||
? _value.companyName
|
||||
: companyName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
warehouseName: freezed == warehouseName
|
||||
? _value.warehouseName
|
||||
: warehouseName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
model: freezed == model
|
||||
? _value.model
|
||||
: model // ignore: cast_nullable_to_non_nullable
|
||||
as ModelDto?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$EquipmentResponseImpl implements _EquipmentResponse {
|
||||
const _$EquipmentResponseImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'equipment_number') required this.equipmentNumber,
|
||||
@JsonKey(name: 'models_id') this.modelsId,
|
||||
@JsonKey(name: 'serial_number') this.serialNumber,
|
||||
this.barcode,
|
||||
@JsonKey(name: 'purchase_date') this.purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') this.purchasePrice,
|
||||
@EquipmentStatusJsonConverter() required this.status,
|
||||
@JsonKey(name: 'company_id') this.companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') this.lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') this.nextInspectionDate,
|
||||
this.remark,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt,
|
||||
@JsonKey(name: 'company_name') this.companyName,
|
||||
@JsonKey(name: 'warehouse_name') this.warehouseName,
|
||||
this.model});
|
||||
|
||||
factory _$EquipmentResponseImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$EquipmentResponseImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
final String equipmentNumber;
|
||||
// Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id and model
|
||||
@override
|
||||
@JsonKey(name: 'models_id')
|
||||
final int? modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
final String? serialNumber;
|
||||
@override
|
||||
final String? barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
final DateTime? purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
final String? purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
final String status;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
final int? companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
final int? warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
final DateTime? lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
final DateTime? nextInspectionDate;
|
||||
@override
|
||||
final String? remark;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
final DateTime updatedAt;
|
||||
// 추가 필드 (조인된 데이터)
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
final String? companyName;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
final String? warehouseName;
|
||||
// Sprint 3: Added model relationship (includes vendor info)
|
||||
@override
|
||||
final ModelDto? model;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EquipmentResponse(id: $id, equipmentNumber: $equipmentNumber, modelsId: $modelsId, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, status: $status, companyId: $companyId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark, createdAt: $createdAt, updatedAt: $updatedAt, companyName: $companyName, warehouseName: $warehouseName, model: $model)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$EquipmentResponseImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.equipmentNumber, equipmentNumber) ||
|
||||
other.equipmentNumber == equipmentNumber) &&
|
||||
(identical(other.modelsId, modelsId) ||
|
||||
other.modelsId == modelsId) &&
|
||||
(identical(other.serialNumber, serialNumber) ||
|
||||
other.serialNumber == serialNumber) &&
|
||||
(identical(other.barcode, barcode) || other.barcode == barcode) &&
|
||||
(identical(other.purchaseDate, purchaseDate) ||
|
||||
other.purchaseDate == purchaseDate) &&
|
||||
(identical(other.purchasePrice, purchasePrice) ||
|
||||
other.purchasePrice == purchasePrice) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.warehouseLocationId, warehouseLocationId) ||
|
||||
other.warehouseLocationId == warehouseLocationId) &&
|
||||
(identical(other.lastInspectionDate, lastInspectionDate) ||
|
||||
other.lastInspectionDate == lastInspectionDate) &&
|
||||
(identical(other.nextInspectionDate, nextInspectionDate) ||
|
||||
other.nextInspectionDate == nextInspectionDate) &&
|
||||
(identical(other.remark, remark) || other.remark == remark) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.companyName, companyName) ||
|
||||
other.companyName == companyName) &&
|
||||
(identical(other.warehouseName, warehouseName) ||
|
||||
other.warehouseName == warehouseName) &&
|
||||
(identical(other.model, model) || other.model == model));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
equipmentNumber,
|
||||
modelsId,
|
||||
serialNumber,
|
||||
barcode,
|
||||
purchaseDate,
|
||||
purchasePrice,
|
||||
status,
|
||||
companyId,
|
||||
warehouseLocationId,
|
||||
lastInspectionDate,
|
||||
nextInspectionDate,
|
||||
remark,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
companyName,
|
||||
warehouseName,
|
||||
model);
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$EquipmentResponseImplCopyWith<_$EquipmentResponseImpl> get copyWith =>
|
||||
__$$EquipmentResponseImplCopyWithImpl<_$EquipmentResponseImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$EquipmentResponseImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _EquipmentResponse implements EquipmentResponse {
|
||||
const factory _EquipmentResponse(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'equipment_number') required final String equipmentNumber,
|
||||
@JsonKey(name: 'models_id') final int? modelsId,
|
||||
@JsonKey(name: 'serial_number') final String? serialNumber,
|
||||
final String? barcode,
|
||||
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
|
||||
@JsonKey(name: 'purchase_price') final String? purchasePrice,
|
||||
@EquipmentStatusJsonConverter() required final String status,
|
||||
@JsonKey(name: 'company_id') final int? companyId,
|
||||
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
|
||||
@JsonKey(name: 'last_inspection_date') final DateTime? lastInspectionDate,
|
||||
@JsonKey(name: 'next_inspection_date') final DateTime? nextInspectionDate,
|
||||
final String? remark,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
|
||||
@JsonKey(name: 'company_name') final String? companyName,
|
||||
@JsonKey(name: 'warehouse_name') final String? warehouseName,
|
||||
final ModelDto? model}) = _$EquipmentResponseImpl;
|
||||
|
||||
factory _EquipmentResponse.fromJson(Map<String, dynamic> json) =
|
||||
_$EquipmentResponseImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String
|
||||
get equipmentNumber; // Sprint 3: Replaced category1/2/3, manufacturer, modelName with models_id and model
|
||||
@override
|
||||
@JsonKey(name: 'models_id')
|
||||
int? get modelsId;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber;
|
||||
@override
|
||||
String? get barcode;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
String? get purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
String get status;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'last_inspection_date')
|
||||
DateTime? get lastInspectionDate;
|
||||
@override
|
||||
@JsonKey(name: 'next_inspection_date')
|
||||
DateTime? get nextInspectionDate;
|
||||
@override
|
||||
String? get remark;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt; // 추가 필드 (조인된 데이터)
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
String? get companyName;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
String?
|
||||
get warehouseName; // Sprint 3: Added model relationship (includes vendor info)
|
||||
@override
|
||||
ModelDto? get model;
|
||||
|
||||
/// Create a copy of EquipmentResponse
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$EquipmentResponseImplCopyWith<_$EquipmentResponseImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentResponseImpl _$$EquipmentResponseImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentResponseImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
equipmentNumber: json['equipment_number'] as String,
|
||||
modelsId: (json['models_id'] as num?)?.toInt(),
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
barcode: json['barcode'] as String?,
|
||||
purchaseDate: json['purchase_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['purchase_date'] as String),
|
||||
purchasePrice: json['purchase_price'] as String?,
|
||||
status: const EquipmentStatusJsonConverter()
|
||||
.fromJson(json['status'] as String),
|
||||
companyId: (json['company_id'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
|
||||
lastInspectionDate: json['last_inspection_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_inspection_date'] as String),
|
||||
nextInspectionDate: json['next_inspection_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['next_inspection_date'] as String),
|
||||
remark: json['remark'] as String?,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
companyName: json['company_name'] as String?,
|
||||
warehouseName: json['warehouse_name'] as String?,
|
||||
model: json['model'] == null
|
||||
? null
|
||||
: ModelDto.fromJson(json['model'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentResponseImplToJson(
|
||||
_$EquipmentResponseImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'equipment_number': instance.equipmentNumber,
|
||||
'models_id': instance.modelsId,
|
||||
'serial_number': instance.serialNumber,
|
||||
'barcode': instance.barcode,
|
||||
'purchase_date': instance.purchaseDate?.toIso8601String(),
|
||||
'purchase_price': instance.purchasePrice,
|
||||
'status': const EquipmentStatusJsonConverter().toJson(instance.status),
|
||||
'company_id': instance.companyId,
|
||||
'warehouse_location_id': instance.warehouseLocationId,
|
||||
'last_inspection_date': instance.lastInspectionDate?.toIso8601String(),
|
||||
'next_inspection_date': instance.nextInspectionDate?.toIso8601String(),
|
||||
'remark': instance.remark,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'company_name': instance.companyName,
|
||||
'warehouse_name': instance.warehouseName,
|
||||
'model': instance.model,
|
||||
};
|
||||
@@ -1,69 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:superport/data/models/equipment_history_dto.dart';
|
||||
import 'package:superport/data/models/company/company_dto.dart';
|
||||
|
||||
part 'equipment_history_companies_link_dto.freezed.dart';
|
||||
part 'equipment_history_companies_link_dto.g.dart';
|
||||
|
||||
@freezed
|
||||
class EquipmentHistoryCompaniesLinkDto with _$EquipmentHistoryCompaniesLinkDto {
|
||||
const EquipmentHistoryCompaniesLinkDto._(); // Private constructor for getters
|
||||
|
||||
const factory EquipmentHistoryCompaniesLinkDto({
|
||||
@JsonKey(name: 'Id') int? id,
|
||||
@JsonKey(name: 'companies_id') required int companiesId,
|
||||
@JsonKey(name: 'equipment_history_Id') required int equipmentHistoryId,
|
||||
@JsonKey(name: 'Order') @Default(1) int order,
|
||||
@JsonKey(name: 'is_deleted') @Default(false) bool isDeleted,
|
||||
@JsonKey(name: 'registered_at') required DateTime registeredAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
|
||||
// Related entities (optional, populated in GET requests)
|
||||
CompanyDto? company,
|
||||
EquipmentHistoryDto? equipmentHistory,
|
||||
}) = _EquipmentHistoryCompaniesLinkDto;
|
||||
|
||||
// isActive 계산 속성 (is_deleted의 반대)
|
||||
bool get isActive => !isDeleted;
|
||||
|
||||
factory EquipmentHistoryCompaniesLinkDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkDtoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class EquipmentHistoryCompaniesLinkRequestDto with _$EquipmentHistoryCompaniesLinkRequestDto {
|
||||
const factory EquipmentHistoryCompaniesLinkRequestDto({
|
||||
@JsonKey(name: 'companies_id') required int companiesId,
|
||||
@JsonKey(name: 'equipment_history_Id') required int equipmentHistoryId,
|
||||
@JsonKey(name: 'Order') @Default(1) int order,
|
||||
}) = _EquipmentHistoryCompaniesLinkRequestDto;
|
||||
|
||||
factory EquipmentHistoryCompaniesLinkRequestDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkRequestDtoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class EquipmentHistoryCompaniesLinkUpdateRequestDto with _$EquipmentHistoryCompaniesLinkUpdateRequestDto {
|
||||
const factory EquipmentHistoryCompaniesLinkUpdateRequestDto({
|
||||
@JsonKey(name: 'companies_id') int? companiesId,
|
||||
@JsonKey(name: 'equipment_history_Id') int? equipmentHistoryId,
|
||||
@JsonKey(name: 'Order') int? order,
|
||||
}) = _EquipmentHistoryCompaniesLinkUpdateRequestDto;
|
||||
|
||||
factory EquipmentHistoryCompaniesLinkUpdateRequestDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkUpdateRequestDtoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class EquipmentHistoryCompaniesLinkListResponse with _$EquipmentHistoryCompaniesLinkListResponse {
|
||||
const factory EquipmentHistoryCompaniesLinkListResponse({
|
||||
@JsonKey(name: 'data') required List<EquipmentHistoryCompaniesLinkDto> items,
|
||||
@JsonKey(name: 'total') required int totalCount,
|
||||
@JsonKey(name: 'page') required int currentPage,
|
||||
@JsonKey(name: 'total_pages') required int totalPages,
|
||||
@JsonKey(name: 'page_size') int? pageSize,
|
||||
}) = _EquipmentHistoryCompaniesLinkListResponse;
|
||||
|
||||
factory EquipmentHistoryCompaniesLinkListResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkListResponseFromJson(json);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,101 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_history_companies_link_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentHistoryCompaniesLinkDtoImpl
|
||||
_$$EquipmentHistoryCompaniesLinkDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkDtoImpl(
|
||||
id: (json['Id'] as num?)?.toInt(),
|
||||
companiesId: (json['companies_id'] as num).toInt(),
|
||||
equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
|
||||
order: (json['Order'] as num?)?.toInt() ?? 1,
|
||||
isDeleted: json['is_deleted'] as bool? ?? false,
|
||||
registeredAt: DateTime.parse(json['registered_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
company: json['company'] == null
|
||||
? null
|
||||
: CompanyDto.fromJson(json['company'] as Map<String, dynamic>),
|
||||
equipmentHistory: json['equipmentHistory'] == null
|
||||
? null
|
||||
: EquipmentHistoryDto.fromJson(
|
||||
json['equipmentHistory'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkDtoImplToJson(
|
||||
_$EquipmentHistoryCompaniesLinkDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'Id': instance.id,
|
||||
'companies_id': instance.companiesId,
|
||||
'equipment_history_Id': instance.equipmentHistoryId,
|
||||
'Order': instance.order,
|
||||
'is_deleted': instance.isDeleted,
|
||||
'registered_at': instance.registeredAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
'company': instance.company,
|
||||
'equipmentHistory': instance.equipmentHistory,
|
||||
};
|
||||
|
||||
_$EquipmentHistoryCompaniesLinkRequestDtoImpl
|
||||
_$$EquipmentHistoryCompaniesLinkRequestDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkRequestDtoImpl(
|
||||
companiesId: (json['companies_id'] as num).toInt(),
|
||||
equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
|
||||
order: (json['Order'] as num?)?.toInt() ?? 1,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkRequestDtoImplToJson(
|
||||
_$EquipmentHistoryCompaniesLinkRequestDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'companies_id': instance.companiesId,
|
||||
'equipment_history_Id': instance.equipmentHistoryId,
|
||||
'Order': instance.order,
|
||||
};
|
||||
|
||||
_$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl
|
||||
_$$EquipmentHistoryCompaniesLinkUpdateRequestDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl(
|
||||
companiesId: (json['companies_id'] as num?)?.toInt(),
|
||||
equipmentHistoryId: (json['equipment_history_Id'] as num?)?.toInt(),
|
||||
order: (json['Order'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkUpdateRequestDtoImplToJson(
|
||||
_$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'companies_id': instance.companiesId,
|
||||
'equipment_history_Id': instance.equipmentHistoryId,
|
||||
'Order': instance.order,
|
||||
};
|
||||
|
||||
_$EquipmentHistoryCompaniesLinkListResponseImpl
|
||||
_$$EquipmentHistoryCompaniesLinkListResponseImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentHistoryCompaniesLinkListResponseImpl(
|
||||
items: (json['data'] as List<dynamic>)
|
||||
.map((e) => EquipmentHistoryCompaniesLinkDto.fromJson(
|
||||
e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
totalCount: (json['total'] as num).toInt(),
|
||||
currentPage: (json['page'] as num).toInt(),
|
||||
totalPages: (json['total_pages'] as num).toInt(),
|
||||
pageSize: (json['page_size'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkListResponseImplToJson(
|
||||
_$EquipmentHistoryCompaniesLinkListResponseImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.items,
|
||||
'total': instance.totalCount,
|
||||
'page': instance.currentPage,
|
||||
'total_pages': instance.totalPages,
|
||||
'page_size': instance.pageSize,
|
||||
};
|
||||
Reference in New Issue
Block a user