Files
superport/lib/data/models/company/branch_dto.freezed.dart
JiWoong Sul 6b31631cfb feat: 회사 관리 API 연동 구현
- CompanyService 및 RemoteDataSource 구현
- Company, Branch DTO 모델 생성 (Freezed)
- 의존성 주입 컨테이너 업데이트
- 회사 등록/수정 폼에 API 연동 로직 적용
- API 통합 계획 문서 업데이트
2025-07-24 17:56:06 +09:00

1212 lines
40 KiB
Dart

// 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 'branch_dto.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
CreateBranchRequest _$CreateBranchRequestFromJson(Map<String, dynamic> json) {
return _CreateBranchRequest.fromJson(json);
}
/// @nodoc
mixin _$CreateBranchRequest {
@JsonKey(name: 'branch_name')
String get branchName => throw _privateConstructorUsedError;
String get address => throw _privateConstructorUsedError;
String get phone => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_name')
String? get managerName => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_phone')
String? get managerPhone => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
/// Serializes this CreateBranchRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CreateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CreateBranchRequestCopyWith<CreateBranchRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CreateBranchRequestCopyWith<$Res> {
factory $CreateBranchRequestCopyWith(
CreateBranchRequest value, $Res Function(CreateBranchRequest) then) =
_$CreateBranchRequestCopyWithImpl<$Res, CreateBranchRequest>;
@useResult
$Res call(
{@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark});
}
/// @nodoc
class _$CreateBranchRequestCopyWithImpl<$Res, $Val extends CreateBranchRequest>
implements $CreateBranchRequestCopyWith<$Res> {
_$CreateBranchRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CreateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
}) {
return _then(_value.copyWith(
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$CreateBranchRequestImplCopyWith<$Res>
implements $CreateBranchRequestCopyWith<$Res> {
factory _$$CreateBranchRequestImplCopyWith(_$CreateBranchRequestImpl value,
$Res Function(_$CreateBranchRequestImpl) then) =
__$$CreateBranchRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark});
}
/// @nodoc
class __$$CreateBranchRequestImplCopyWithImpl<$Res>
extends _$CreateBranchRequestCopyWithImpl<$Res, _$CreateBranchRequestImpl>
implements _$$CreateBranchRequestImplCopyWith<$Res> {
__$$CreateBranchRequestImplCopyWithImpl(_$CreateBranchRequestImpl _value,
$Res Function(_$CreateBranchRequestImpl) _then)
: super(_value, _then);
/// Create a copy of CreateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
}) {
return _then(_$CreateBranchRequestImpl(
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CreateBranchRequestImpl implements _CreateBranchRequest {
const _$CreateBranchRequestImpl(
{@JsonKey(name: 'branch_name') required this.branchName,
required this.address,
required this.phone,
@JsonKey(name: 'manager_name') this.managerName,
@JsonKey(name: 'manager_phone') this.managerPhone,
this.remark});
factory _$CreateBranchRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$CreateBranchRequestImplFromJson(json);
@override
@JsonKey(name: 'branch_name')
final String branchName;
@override
final String address;
@override
final String phone;
@override
@JsonKey(name: 'manager_name')
final String? managerName;
@override
@JsonKey(name: 'manager_phone')
final String? managerPhone;
@override
final String? remark;
@override
String toString() {
return 'CreateBranchRequest(branchName: $branchName, address: $address, phone: $phone, managerName: $managerName, managerPhone: $managerPhone, remark: $remark)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateBranchRequestImpl &&
(identical(other.branchName, branchName) ||
other.branchName == branchName) &&
(identical(other.address, address) || other.address == address) &&
(identical(other.phone, phone) || other.phone == phone) &&
(identical(other.managerName, managerName) ||
other.managerName == managerName) &&
(identical(other.managerPhone, managerPhone) ||
other.managerPhone == managerPhone) &&
(identical(other.remark, remark) || other.remark == remark));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, branchName, address, phone,
managerName, managerPhone, remark);
/// Create a copy of CreateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CreateBranchRequestImplCopyWith<_$CreateBranchRequestImpl> get copyWith =>
__$$CreateBranchRequestImplCopyWithImpl<_$CreateBranchRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CreateBranchRequestImplToJson(
this,
);
}
}
abstract class _CreateBranchRequest implements CreateBranchRequest {
const factory _CreateBranchRequest(
{@JsonKey(name: 'branch_name') required final String branchName,
required final String address,
required final String phone,
@JsonKey(name: 'manager_name') final String? managerName,
@JsonKey(name: 'manager_phone') final String? managerPhone,
final String? remark}) = _$CreateBranchRequestImpl;
factory _CreateBranchRequest.fromJson(Map<String, dynamic> json) =
_$CreateBranchRequestImpl.fromJson;
@override
@JsonKey(name: 'branch_name')
String get branchName;
@override
String get address;
@override
String get phone;
@override
@JsonKey(name: 'manager_name')
String? get managerName;
@override
@JsonKey(name: 'manager_phone')
String? get managerPhone;
@override
String? get remark;
/// Create a copy of CreateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CreateBranchRequestImplCopyWith<_$CreateBranchRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}
UpdateBranchRequest _$UpdateBranchRequestFromJson(Map<String, dynamic> json) {
return _UpdateBranchRequest.fromJson(json);
}
/// @nodoc
mixin _$UpdateBranchRequest {
@JsonKey(name: 'branch_name')
String? get branchName => throw _privateConstructorUsedError;
String? get address => throw _privateConstructorUsedError;
String? get phone => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_name')
String? get managerName => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_phone')
String? get managerPhone => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
/// Serializes this UpdateBranchRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of UpdateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$UpdateBranchRequestCopyWith<UpdateBranchRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $UpdateBranchRequestCopyWith<$Res> {
factory $UpdateBranchRequestCopyWith(
UpdateBranchRequest value, $Res Function(UpdateBranchRequest) then) =
_$UpdateBranchRequestCopyWithImpl<$Res, UpdateBranchRequest>;
@useResult
$Res call(
{@JsonKey(name: 'branch_name') String? branchName,
String? address,
String? phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark});
}
/// @nodoc
class _$UpdateBranchRequestCopyWithImpl<$Res, $Val extends UpdateBranchRequest>
implements $UpdateBranchRequestCopyWith<$Res> {
_$UpdateBranchRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of UpdateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? branchName = freezed,
Object? address = freezed,
Object? phone = freezed,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
}) {
return _then(_value.copyWith(
branchName: freezed == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String?,
address: freezed == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String?,
phone: freezed == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String?,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$UpdateBranchRequestImplCopyWith<$Res>
implements $UpdateBranchRequestCopyWith<$Res> {
factory _$$UpdateBranchRequestImplCopyWith(_$UpdateBranchRequestImpl value,
$Res Function(_$UpdateBranchRequestImpl) then) =
__$$UpdateBranchRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'branch_name') String? branchName,
String? address,
String? phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark});
}
/// @nodoc
class __$$UpdateBranchRequestImplCopyWithImpl<$Res>
extends _$UpdateBranchRequestCopyWithImpl<$Res, _$UpdateBranchRequestImpl>
implements _$$UpdateBranchRequestImplCopyWith<$Res> {
__$$UpdateBranchRequestImplCopyWithImpl(_$UpdateBranchRequestImpl _value,
$Res Function(_$UpdateBranchRequestImpl) _then)
: super(_value, _then);
/// Create a copy of UpdateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? branchName = freezed,
Object? address = freezed,
Object? phone = freezed,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
}) {
return _then(_$UpdateBranchRequestImpl(
branchName: freezed == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String?,
address: freezed == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String?,
phone: freezed == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String?,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$UpdateBranchRequestImpl implements _UpdateBranchRequest {
const _$UpdateBranchRequestImpl(
{@JsonKey(name: 'branch_name') this.branchName,
this.address,
this.phone,
@JsonKey(name: 'manager_name') this.managerName,
@JsonKey(name: 'manager_phone') this.managerPhone,
this.remark});
factory _$UpdateBranchRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$UpdateBranchRequestImplFromJson(json);
@override
@JsonKey(name: 'branch_name')
final String? branchName;
@override
final String? address;
@override
final String? phone;
@override
@JsonKey(name: 'manager_name')
final String? managerName;
@override
@JsonKey(name: 'manager_phone')
final String? managerPhone;
@override
final String? remark;
@override
String toString() {
return 'UpdateBranchRequest(branchName: $branchName, address: $address, phone: $phone, managerName: $managerName, managerPhone: $managerPhone, remark: $remark)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UpdateBranchRequestImpl &&
(identical(other.branchName, branchName) ||
other.branchName == branchName) &&
(identical(other.address, address) || other.address == address) &&
(identical(other.phone, phone) || other.phone == phone) &&
(identical(other.managerName, managerName) ||
other.managerName == managerName) &&
(identical(other.managerPhone, managerPhone) ||
other.managerPhone == managerPhone) &&
(identical(other.remark, remark) || other.remark == remark));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, branchName, address, phone,
managerName, managerPhone, remark);
/// Create a copy of UpdateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UpdateBranchRequestImplCopyWith<_$UpdateBranchRequestImpl> get copyWith =>
__$$UpdateBranchRequestImplCopyWithImpl<_$UpdateBranchRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$UpdateBranchRequestImplToJson(
this,
);
}
}
abstract class _UpdateBranchRequest implements UpdateBranchRequest {
const factory _UpdateBranchRequest(
{@JsonKey(name: 'branch_name') final String? branchName,
final String? address,
final String? phone,
@JsonKey(name: 'manager_name') final String? managerName,
@JsonKey(name: 'manager_phone') final String? managerPhone,
final String? remark}) = _$UpdateBranchRequestImpl;
factory _UpdateBranchRequest.fromJson(Map<String, dynamic> json) =
_$UpdateBranchRequestImpl.fromJson;
@override
@JsonKey(name: 'branch_name')
String? get branchName;
@override
String? get address;
@override
String? get phone;
@override
@JsonKey(name: 'manager_name')
String? get managerName;
@override
@JsonKey(name: 'manager_phone')
String? get managerPhone;
@override
String? get remark;
/// Create a copy of UpdateBranchRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UpdateBranchRequestImplCopyWith<_$UpdateBranchRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}
BranchResponse _$BranchResponseFromJson(Map<String, dynamic> json) {
return _BranchResponse.fromJson(json);
}
/// @nodoc
mixin _$BranchResponse {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'company_id')
int get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'branch_name')
String get branchName => throw _privateConstructorUsedError;
String get address => throw _privateConstructorUsedError;
String get phone => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_name')
String? get managerName => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_phone')
String? get managerPhone => 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: 'address_id')
int? get addressId => throw _privateConstructorUsedError;
/// Serializes this BranchResponse to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of BranchResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$BranchResponseCopyWith<BranchResponse> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $BranchResponseCopyWith<$Res> {
factory $BranchResponseCopyWith(
BranchResponse value, $Res Function(BranchResponse) then) =
_$BranchResponseCopyWithImpl<$Res, BranchResponse>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
@JsonKey(name: 'address_id') int? addressId});
}
/// @nodoc
class _$BranchResponseCopyWithImpl<$Res, $Val extends BranchResponse>
implements $BranchResponseCopyWith<$Res> {
_$BranchResponseCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of BranchResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? companyId = null,
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
Object? createdAt = null,
Object? updatedAt = null,
Object? addressId = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
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,
addressId: freezed == addressId
? _value.addressId
: addressId // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
}
}
/// @nodoc
abstract class _$$BranchResponseImplCopyWith<$Res>
implements $BranchResponseCopyWith<$Res> {
factory _$$BranchResponseImplCopyWith(_$BranchResponseImpl value,
$Res Function(_$BranchResponseImpl) then) =
__$$BranchResponseImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName,
@JsonKey(name: 'manager_phone') String? managerPhone,
String? remark,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
@JsonKey(name: 'address_id') int? addressId});
}
/// @nodoc
class __$$BranchResponseImplCopyWithImpl<$Res>
extends _$BranchResponseCopyWithImpl<$Res, _$BranchResponseImpl>
implements _$$BranchResponseImplCopyWith<$Res> {
__$$BranchResponseImplCopyWithImpl(
_$BranchResponseImpl _value, $Res Function(_$BranchResponseImpl) _then)
: super(_value, _then);
/// Create a copy of BranchResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? companyId = null,
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
Object? managerPhone = freezed,
Object? remark = freezed,
Object? createdAt = null,
Object? updatedAt = null,
Object? addressId = freezed,
}) {
return _then(_$BranchResponseImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
managerPhone: freezed == managerPhone
? _value.managerPhone
: managerPhone // ignore: cast_nullable_to_non_nullable
as String?,
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,
addressId: freezed == addressId
? _value.addressId
: addressId // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$BranchResponseImpl implements _BranchResponse {
const _$BranchResponseImpl(
{required this.id,
@JsonKey(name: 'company_id') required this.companyId,
@JsonKey(name: 'branch_name') required this.branchName,
required this.address,
required this.phone,
@JsonKey(name: 'manager_name') this.managerName,
@JsonKey(name: 'manager_phone') this.managerPhone,
this.remark,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt,
@JsonKey(name: 'address_id') this.addressId});
factory _$BranchResponseImpl.fromJson(Map<String, dynamic> json) =>
_$$BranchResponseImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'company_id')
final int companyId;
@override
@JsonKey(name: 'branch_name')
final String branchName;
@override
final String address;
@override
final String phone;
@override
@JsonKey(name: 'manager_name')
final String? managerName;
@override
@JsonKey(name: 'manager_phone')
final String? managerPhone;
@override
final String? remark;
@override
@JsonKey(name: 'created_at')
final DateTime createdAt;
@override
@JsonKey(name: 'updated_at')
final DateTime updatedAt;
@override
@JsonKey(name: 'address_id')
final int? addressId;
@override
String toString() {
return 'BranchResponse(id: $id, companyId: $companyId, branchName: $branchName, address: $address, phone: $phone, managerName: $managerName, managerPhone: $managerPhone, remark: $remark, createdAt: $createdAt, updatedAt: $updatedAt, addressId: $addressId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BranchResponseImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.branchName, branchName) ||
other.branchName == branchName) &&
(identical(other.address, address) || other.address == address) &&
(identical(other.phone, phone) || other.phone == phone) &&
(identical(other.managerName, managerName) ||
other.managerName == managerName) &&
(identical(other.managerPhone, managerPhone) ||
other.managerPhone == managerPhone) &&
(identical(other.remark, remark) || other.remark == remark) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.addressId, addressId) ||
other.addressId == addressId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
companyId,
branchName,
address,
phone,
managerName,
managerPhone,
remark,
createdAt,
updatedAt,
addressId);
/// Create a copy of BranchResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$BranchResponseImplCopyWith<_$BranchResponseImpl> get copyWith =>
__$$BranchResponseImplCopyWithImpl<_$BranchResponseImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$BranchResponseImplToJson(
this,
);
}
}
abstract class _BranchResponse implements BranchResponse {
const factory _BranchResponse(
{required final int id,
@JsonKey(name: 'company_id') required final int companyId,
@JsonKey(name: 'branch_name') required final String branchName,
required final String address,
required final String phone,
@JsonKey(name: 'manager_name') final String? managerName,
@JsonKey(name: 'manager_phone') final String? managerPhone,
final String? remark,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
@JsonKey(name: 'address_id') final int? addressId}) =
_$BranchResponseImpl;
factory _BranchResponse.fromJson(Map<String, dynamic> json) =
_$BranchResponseImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'company_id')
int get companyId;
@override
@JsonKey(name: 'branch_name')
String get branchName;
@override
String get address;
@override
String get phone;
@override
@JsonKey(name: 'manager_name')
String? get managerName;
@override
@JsonKey(name: 'manager_phone')
String? get managerPhone;
@override
String? get remark;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime get updatedAt;
@override
@JsonKey(name: 'address_id')
int? get addressId;
/// Create a copy of BranchResponse
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$BranchResponseImplCopyWith<_$BranchResponseImpl> get copyWith =>
throw _privateConstructorUsedError;
}
BranchListDto _$BranchListDtoFromJson(Map<String, dynamic> json) {
return _BranchListDto.fromJson(json);
}
/// @nodoc
mixin _$BranchListDto {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'company_id')
int get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'branch_name')
String get branchName => throw _privateConstructorUsedError;
String get address => throw _privateConstructorUsedError;
String get phone => throw _privateConstructorUsedError;
@JsonKey(name: 'manager_name')
String? get managerName => throw _privateConstructorUsedError;
/// Serializes this BranchListDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of BranchListDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$BranchListDtoCopyWith<BranchListDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $BranchListDtoCopyWith<$Res> {
factory $BranchListDtoCopyWith(
BranchListDto value, $Res Function(BranchListDto) then) =
_$BranchListDtoCopyWithImpl<$Res, BranchListDto>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName});
}
/// @nodoc
class _$BranchListDtoCopyWithImpl<$Res, $Val extends BranchListDto>
implements $BranchListDtoCopyWith<$Res> {
_$BranchListDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of BranchListDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? companyId = null,
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$BranchListDtoImplCopyWith<$Res>
implements $BranchListDtoCopyWith<$Res> {
factory _$$BranchListDtoImplCopyWith(
_$BranchListDtoImpl value, $Res Function(_$BranchListDtoImpl) then) =
__$$BranchListDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'branch_name') String branchName,
String address,
String phone,
@JsonKey(name: 'manager_name') String? managerName});
}
/// @nodoc
class __$$BranchListDtoImplCopyWithImpl<$Res>
extends _$BranchListDtoCopyWithImpl<$Res, _$BranchListDtoImpl>
implements _$$BranchListDtoImplCopyWith<$Res> {
__$$BranchListDtoImplCopyWithImpl(
_$BranchListDtoImpl _value, $Res Function(_$BranchListDtoImpl) _then)
: super(_value, _then);
/// Create a copy of BranchListDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? companyId = null,
Object? branchName = null,
Object? address = null,
Object? phone = null,
Object? managerName = freezed,
}) {
return _then(_$BranchListDtoImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchName: null == branchName
? _value.branchName
: branchName // ignore: cast_nullable_to_non_nullable
as String,
address: null == address
? _value.address
: address // ignore: cast_nullable_to_non_nullable
as String,
phone: null == phone
? _value.phone
: phone // ignore: cast_nullable_to_non_nullable
as String,
managerName: freezed == managerName
? _value.managerName
: managerName // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$BranchListDtoImpl implements _BranchListDto {
const _$BranchListDtoImpl(
{required this.id,
@JsonKey(name: 'company_id') required this.companyId,
@JsonKey(name: 'branch_name') required this.branchName,
required this.address,
required this.phone,
@JsonKey(name: 'manager_name') this.managerName});
factory _$BranchListDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$BranchListDtoImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'company_id')
final int companyId;
@override
@JsonKey(name: 'branch_name')
final String branchName;
@override
final String address;
@override
final String phone;
@override
@JsonKey(name: 'manager_name')
final String? managerName;
@override
String toString() {
return 'BranchListDto(id: $id, companyId: $companyId, branchName: $branchName, address: $address, phone: $phone, managerName: $managerName)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BranchListDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.branchName, branchName) ||
other.branchName == branchName) &&
(identical(other.address, address) || other.address == address) &&
(identical(other.phone, phone) || other.phone == phone) &&
(identical(other.managerName, managerName) ||
other.managerName == managerName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, id, companyId, branchName, address, phone, managerName);
/// Create a copy of BranchListDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$BranchListDtoImplCopyWith<_$BranchListDtoImpl> get copyWith =>
__$$BranchListDtoImplCopyWithImpl<_$BranchListDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$BranchListDtoImplToJson(
this,
);
}
}
abstract class _BranchListDto implements BranchListDto {
const factory _BranchListDto(
{required final int id,
@JsonKey(name: 'company_id') required final int companyId,
@JsonKey(name: 'branch_name') required final String branchName,
required final String address,
required final String phone,
@JsonKey(name: 'manager_name') final String? managerName}) =
_$BranchListDtoImpl;
factory _BranchListDto.fromJson(Map<String, dynamic> json) =
_$BranchListDtoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'company_id')
int get companyId;
@override
@JsonKey(name: 'branch_name')
String get branchName;
@override
String get address;
@override
String get phone;
@override
@JsonKey(name: 'manager_name')
String? get managerName;
/// Create a copy of BranchListDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$BranchListDtoImplCopyWith<_$BranchListDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}