- UserRemoteDataSource: API v0.2.1 스펙 완전 대응 • 응답 형식 통일 (success: true 구조) • 페이지네이션 처리 개선 • 에러 핸들링 강화 • 불필요한 파라미터 제거 (includeInactive 등) - UserDto 모델 현대화: • 서버 응답 구조와 100% 일치 • 도메인 모델 변환 메서드 추가 • Freezed 불변성 패턴 완성 - User 도메인 모델 신규 구현: • Clean Architecture 원칙 준수 • UserRole enum 타입 안전성 강화 • 비즈니스 로직 캡슐화 - 사용자 관련 UseCase 리팩토링: • Repository 패턴 완전 적용 • Either<Failure, Success> 에러 처리 • 의존성 주입 최적화 - UI 컨트롤러 및 화면 개선: • API 응답 변경사항 반영 • 사용자 권한 표시 정확성 향상 • 폼 검증 로직 강화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1717 lines
51 KiB
Dart
1717 lines
51 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 'user_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');
|
|
|
|
UserDto _$UserDtoFromJson(Map<String, dynamic> json) {
|
|
return _UserDto.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UserDto {
|
|
/// 사용자 ID (자동 생성)
|
|
int get id => throw _privateConstructorUsedError;
|
|
|
|
/// 사용자명 (유니크, 필수)
|
|
String get username => throw _privateConstructorUsedError;
|
|
|
|
/// 이름 (필수)
|
|
String get name => throw _privateConstructorUsedError;
|
|
|
|
/// 이메일 (유니크, 필수)
|
|
String get email => throw _privateConstructorUsedError;
|
|
|
|
/// 전화번호 (선택)
|
|
String? get phone => throw _privateConstructorUsedError;
|
|
|
|
/// 권한 (admin, manager, staff)
|
|
String get role => throw _privateConstructorUsedError;
|
|
|
|
/// 활성화 상태 (기본값: true)
|
|
@JsonKey(name: 'is_active')
|
|
bool get isActive => throw _privateConstructorUsedError;
|
|
|
|
/// 생성일시 (자동 입력)
|
|
@JsonKey(name: 'created_at')
|
|
DateTime get createdAt => throw _privateConstructorUsedError;
|
|
|
|
/// 수정일시 (자동 갱신, 선택적)
|
|
@JsonKey(name: 'updated_at')
|
|
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this UserDto to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of UserDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$UserDtoCopyWith<UserDto> get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserDtoCopyWith<$Res> {
|
|
factory $UserDtoCopyWith(UserDto value, $Res Function(UserDto) then) =
|
|
_$UserDtoCopyWithImpl<$Res, UserDto>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String username,
|
|
String name,
|
|
String email,
|
|
String? phone,
|
|
String role,
|
|
@JsonKey(name: 'is_active') bool isActive,
|
|
@JsonKey(name: 'created_at') DateTime createdAt,
|
|
@JsonKey(name: 'updated_at') DateTime? updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserDtoCopyWithImpl<$Res, $Val extends UserDto>
|
|
implements $UserDtoCopyWith<$Res> {
|
|
_$UserDtoCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of UserDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? username = null,
|
|
Object? name = null,
|
|
Object? email = null,
|
|
Object? phone = freezed,
|
|
Object? role = null,
|
|
Object? isActive = null,
|
|
Object? createdAt = null,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
username: null == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
email: null == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: null == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
isActive: null == isActive
|
|
? _value.isActive
|
|
: isActive // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UserDtoImplCopyWith<$Res> implements $UserDtoCopyWith<$Res> {
|
|
factory _$$UserDtoImplCopyWith(
|
|
_$UserDtoImpl value, $Res Function(_$UserDtoImpl) then) =
|
|
__$$UserDtoImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String username,
|
|
String name,
|
|
String email,
|
|
String? phone,
|
|
String role,
|
|
@JsonKey(name: 'is_active') bool isActive,
|
|
@JsonKey(name: 'created_at') DateTime createdAt,
|
|
@JsonKey(name: 'updated_at') DateTime? updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UserDtoImplCopyWithImpl<$Res>
|
|
extends _$UserDtoCopyWithImpl<$Res, _$UserDtoImpl>
|
|
implements _$$UserDtoImplCopyWith<$Res> {
|
|
__$$UserDtoImplCopyWithImpl(
|
|
_$UserDtoImpl _value, $Res Function(_$UserDtoImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of UserDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? username = null,
|
|
Object? name = null,
|
|
Object? email = null,
|
|
Object? phone = freezed,
|
|
Object? role = null,
|
|
Object? isActive = null,
|
|
Object? createdAt = null,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(_$UserDtoImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
username: null == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
email: null == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: null == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
isActive: null == isActive
|
|
? _value.isActive
|
|
: isActive // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UserDtoImpl extends _UserDto {
|
|
const _$UserDtoImpl(
|
|
{required this.id,
|
|
required this.username,
|
|
required this.name,
|
|
required this.email,
|
|
this.phone,
|
|
required this.role,
|
|
@JsonKey(name: 'is_active') required this.isActive,
|
|
@JsonKey(name: 'created_at') required this.createdAt,
|
|
@JsonKey(name: 'updated_at') this.updatedAt})
|
|
: super._();
|
|
|
|
factory _$UserDtoImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UserDtoImplFromJson(json);
|
|
|
|
/// 사용자 ID (자동 생성)
|
|
@override
|
|
final int id;
|
|
|
|
/// 사용자명 (유니크, 필수)
|
|
@override
|
|
final String username;
|
|
|
|
/// 이름 (필수)
|
|
@override
|
|
final String name;
|
|
|
|
/// 이메일 (유니크, 필수)
|
|
@override
|
|
final String email;
|
|
|
|
/// 전화번호 (선택)
|
|
@override
|
|
final String? phone;
|
|
|
|
/// 권한 (admin, manager, staff)
|
|
@override
|
|
final String role;
|
|
|
|
/// 활성화 상태 (기본값: true)
|
|
@override
|
|
@JsonKey(name: 'is_active')
|
|
final bool isActive;
|
|
|
|
/// 생성일시 (자동 입력)
|
|
@override
|
|
@JsonKey(name: 'created_at')
|
|
final DateTime createdAt;
|
|
|
|
/// 수정일시 (자동 갱신, 선택적)
|
|
@override
|
|
@JsonKey(name: 'updated_at')
|
|
final DateTime? updatedAt;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UserDto(id: $id, username: $username, name: $name, email: $email, phone: $phone, role: $role, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UserDtoImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.username, username) ||
|
|
other.username == username) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.email, email) || other.email == email) &&
|
|
(identical(other.phone, phone) || other.phone == phone) &&
|
|
(identical(other.role, role) || other.role == role) &&
|
|
(identical(other.isActive, isActive) ||
|
|
other.isActive == isActive) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt) &&
|
|
(identical(other.updatedAt, updatedAt) ||
|
|
other.updatedAt == updatedAt));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, username, name, email, phone,
|
|
role, isActive, createdAt, updatedAt);
|
|
|
|
/// Create a copy of UserDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UserDtoImplCopyWith<_$UserDtoImpl> get copyWith =>
|
|
__$$UserDtoImplCopyWithImpl<_$UserDtoImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UserDtoImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UserDto extends UserDto {
|
|
const factory _UserDto(
|
|
{required final int id,
|
|
required final String username,
|
|
required final String name,
|
|
required final String email,
|
|
final String? phone,
|
|
required final String role,
|
|
@JsonKey(name: 'is_active') required final bool isActive,
|
|
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
|
@JsonKey(name: 'updated_at') final DateTime? updatedAt}) = _$UserDtoImpl;
|
|
const _UserDto._() : super._();
|
|
|
|
factory _UserDto.fromJson(Map<String, dynamic> json) = _$UserDtoImpl.fromJson;
|
|
|
|
/// 사용자 ID (자동 생성)
|
|
@override
|
|
int get id;
|
|
|
|
/// 사용자명 (유니크, 필수)
|
|
@override
|
|
String get username;
|
|
|
|
/// 이름 (필수)
|
|
@override
|
|
String get name;
|
|
|
|
/// 이메일 (유니크, 필수)
|
|
@override
|
|
String get email;
|
|
|
|
/// 전화번호 (선택)
|
|
@override
|
|
String? get phone;
|
|
|
|
/// 권한 (admin, manager, staff)
|
|
@override
|
|
String get role;
|
|
|
|
/// 활성화 상태 (기본값: true)
|
|
@override
|
|
@JsonKey(name: 'is_active')
|
|
bool get isActive;
|
|
|
|
/// 생성일시 (자동 입력)
|
|
@override
|
|
@JsonKey(name: 'created_at')
|
|
DateTime get createdAt;
|
|
|
|
/// 수정일시 (자동 갱신, 선택적)
|
|
@override
|
|
@JsonKey(name: 'updated_at')
|
|
DateTime? get updatedAt;
|
|
|
|
/// Create a copy of UserDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$UserDtoImplCopyWith<_$UserDtoImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
CreateUserRequest _$CreateUserRequestFromJson(Map<String, dynamic> json) {
|
|
return _CreateUserRequest.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$CreateUserRequest {
|
|
/// 사용자명 (필수, 유니크, 3자 이상)
|
|
String get username => throw _privateConstructorUsedError;
|
|
|
|
/// 이메일 (필수, 유니크, 이메일 형식)
|
|
String get email => throw _privateConstructorUsedError;
|
|
|
|
/// 비밀번호 (필수, 6자 이상)
|
|
String get password => throw _privateConstructorUsedError;
|
|
|
|
/// 이름 (필수)
|
|
String get name => throw _privateConstructorUsedError;
|
|
|
|
/// 전화번호 (선택, "010-1234-5678" 형태)
|
|
String? get phone => throw _privateConstructorUsedError;
|
|
|
|
/// 권한 (필수: admin, manager, staff)
|
|
String get role => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this CreateUserRequest to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CreateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CreateUserRequestCopyWith<CreateUserRequest> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CreateUserRequestCopyWith<$Res> {
|
|
factory $CreateUserRequestCopyWith(
|
|
CreateUserRequest value, $Res Function(CreateUserRequest) then) =
|
|
_$CreateUserRequestCopyWithImpl<$Res, CreateUserRequest>;
|
|
@useResult
|
|
$Res call(
|
|
{String username,
|
|
String email,
|
|
String password,
|
|
String name,
|
|
String? phone,
|
|
String role});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CreateUserRequestCopyWithImpl<$Res, $Val extends CreateUserRequest>
|
|
implements $CreateUserRequestCopyWith<$Res> {
|
|
_$CreateUserRequestCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CreateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? username = null,
|
|
Object? email = null,
|
|
Object? password = null,
|
|
Object? name = null,
|
|
Object? phone = freezed,
|
|
Object? role = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
username: null == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
email: null == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
password: null == password
|
|
? _value.password
|
|
: password // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: null == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CreateUserRequestImplCopyWith<$Res>
|
|
implements $CreateUserRequestCopyWith<$Res> {
|
|
factory _$$CreateUserRequestImplCopyWith(_$CreateUserRequestImpl value,
|
|
$Res Function(_$CreateUserRequestImpl) then) =
|
|
__$$CreateUserRequestImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{String username,
|
|
String email,
|
|
String password,
|
|
String name,
|
|
String? phone,
|
|
String role});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CreateUserRequestImplCopyWithImpl<$Res>
|
|
extends _$CreateUserRequestCopyWithImpl<$Res, _$CreateUserRequestImpl>
|
|
implements _$$CreateUserRequestImplCopyWith<$Res> {
|
|
__$$CreateUserRequestImplCopyWithImpl(_$CreateUserRequestImpl _value,
|
|
$Res Function(_$CreateUserRequestImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of CreateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? username = null,
|
|
Object? email = null,
|
|
Object? password = null,
|
|
Object? name = null,
|
|
Object? phone = freezed,
|
|
Object? role = null,
|
|
}) {
|
|
return _then(_$CreateUserRequestImpl(
|
|
username: null == username
|
|
? _value.username
|
|
: username // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
email: null == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
password: null == password
|
|
? _value.password
|
|
: password // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: null == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CreateUserRequestImpl implements _CreateUserRequest {
|
|
const _$CreateUserRequestImpl(
|
|
{required this.username,
|
|
required this.email,
|
|
required this.password,
|
|
required this.name,
|
|
this.phone,
|
|
required this.role});
|
|
|
|
factory _$CreateUserRequestImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CreateUserRequestImplFromJson(json);
|
|
|
|
/// 사용자명 (필수, 유니크, 3자 이상)
|
|
@override
|
|
final String username;
|
|
|
|
/// 이메일 (필수, 유니크, 이메일 형식)
|
|
@override
|
|
final String email;
|
|
|
|
/// 비밀번호 (필수, 6자 이상)
|
|
@override
|
|
final String password;
|
|
|
|
/// 이름 (필수)
|
|
@override
|
|
final String name;
|
|
|
|
/// 전화번호 (선택, "010-1234-5678" 형태)
|
|
@override
|
|
final String? phone;
|
|
|
|
/// 권한 (필수: admin, manager, staff)
|
|
@override
|
|
final String role;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CreateUserRequest(username: $username, email: $email, password: $password, name: $name, phone: $phone, role: $role)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CreateUserRequestImpl &&
|
|
(identical(other.username, username) ||
|
|
other.username == username) &&
|
|
(identical(other.email, email) || other.email == email) &&
|
|
(identical(other.password, password) ||
|
|
other.password == password) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.phone, phone) || other.phone == phone) &&
|
|
(identical(other.role, role) || other.role == role));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, username, email, password, name, phone, role);
|
|
|
|
/// Create a copy of CreateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CreateUserRequestImplCopyWith<_$CreateUserRequestImpl> get copyWith =>
|
|
__$$CreateUserRequestImplCopyWithImpl<_$CreateUserRequestImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CreateUserRequestImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _CreateUserRequest implements CreateUserRequest {
|
|
const factory _CreateUserRequest(
|
|
{required final String username,
|
|
required final String email,
|
|
required final String password,
|
|
required final String name,
|
|
final String? phone,
|
|
required final String role}) = _$CreateUserRequestImpl;
|
|
|
|
factory _CreateUserRequest.fromJson(Map<String, dynamic> json) =
|
|
_$CreateUserRequestImpl.fromJson;
|
|
|
|
/// 사용자명 (필수, 유니크, 3자 이상)
|
|
@override
|
|
String get username;
|
|
|
|
/// 이메일 (필수, 유니크, 이메일 형식)
|
|
@override
|
|
String get email;
|
|
|
|
/// 비밀번호 (필수, 6자 이상)
|
|
@override
|
|
String get password;
|
|
|
|
/// 이름 (필수)
|
|
@override
|
|
String get name;
|
|
|
|
/// 전화번호 (선택, "010-1234-5678" 형태)
|
|
@override
|
|
String? get phone;
|
|
|
|
/// 권한 (필수: admin, manager, staff)
|
|
@override
|
|
String get role;
|
|
|
|
/// Create a copy of CreateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CreateUserRequestImplCopyWith<_$CreateUserRequestImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
UpdateUserRequest _$UpdateUserRequestFromJson(Map<String, dynamic> json) {
|
|
return _UpdateUserRequest.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UpdateUserRequest {
|
|
/// 이름 (선택)
|
|
String? get name => throw _privateConstructorUsedError;
|
|
|
|
/// 이메일 (선택, 유니크, 이메일 형식)
|
|
String? get email => throw _privateConstructorUsedError;
|
|
|
|
/// 비밀번호 (선택, 6자 이상)
|
|
String? get password => throw _privateConstructorUsedError;
|
|
|
|
/// 전화번호 (선택)
|
|
String? get phone => throw _privateConstructorUsedError;
|
|
|
|
/// 권한 (선택: admin, manager, staff)
|
|
String? get role => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this UpdateUserRequest to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of UpdateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$UpdateUserRequestCopyWith<UpdateUserRequest> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UpdateUserRequestCopyWith<$Res> {
|
|
factory $UpdateUserRequestCopyWith(
|
|
UpdateUserRequest value, $Res Function(UpdateUserRequest) then) =
|
|
_$UpdateUserRequestCopyWithImpl<$Res, UpdateUserRequest>;
|
|
@useResult
|
|
$Res call(
|
|
{String? name,
|
|
String? email,
|
|
String? password,
|
|
String? phone,
|
|
String? role});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UpdateUserRequestCopyWithImpl<$Res, $Val extends UpdateUserRequest>
|
|
implements $UpdateUserRequestCopyWith<$Res> {
|
|
_$UpdateUserRequestCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of UpdateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? name = freezed,
|
|
Object? email = freezed,
|
|
Object? password = freezed,
|
|
Object? phone = freezed,
|
|
Object? role = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
name: freezed == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
email: freezed == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
password: freezed == password
|
|
? _value.password
|
|
: password // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: freezed == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UpdateUserRequestImplCopyWith<$Res>
|
|
implements $UpdateUserRequestCopyWith<$Res> {
|
|
factory _$$UpdateUserRequestImplCopyWith(_$UpdateUserRequestImpl value,
|
|
$Res Function(_$UpdateUserRequestImpl) then) =
|
|
__$$UpdateUserRequestImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{String? name,
|
|
String? email,
|
|
String? password,
|
|
String? phone,
|
|
String? role});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UpdateUserRequestImplCopyWithImpl<$Res>
|
|
extends _$UpdateUserRequestCopyWithImpl<$Res, _$UpdateUserRequestImpl>
|
|
implements _$$UpdateUserRequestImplCopyWith<$Res> {
|
|
__$$UpdateUserRequestImplCopyWithImpl(_$UpdateUserRequestImpl _value,
|
|
$Res Function(_$UpdateUserRequestImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of UpdateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? name = freezed,
|
|
Object? email = freezed,
|
|
Object? password = freezed,
|
|
Object? phone = freezed,
|
|
Object? role = freezed,
|
|
}) {
|
|
return _then(_$UpdateUserRequestImpl(
|
|
name: freezed == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
email: freezed == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
password: freezed == password
|
|
? _value.password
|
|
: password // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
role: freezed == role
|
|
? _value.role
|
|
: role // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UpdateUserRequestImpl implements _UpdateUserRequest {
|
|
const _$UpdateUserRequestImpl(
|
|
{this.name, this.email, this.password, this.phone, this.role});
|
|
|
|
factory _$UpdateUserRequestImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UpdateUserRequestImplFromJson(json);
|
|
|
|
/// 이름 (선택)
|
|
@override
|
|
final String? name;
|
|
|
|
/// 이메일 (선택, 유니크, 이메일 형식)
|
|
@override
|
|
final String? email;
|
|
|
|
/// 비밀번호 (선택, 6자 이상)
|
|
@override
|
|
final String? password;
|
|
|
|
/// 전화번호 (선택)
|
|
@override
|
|
final String? phone;
|
|
|
|
/// 권한 (선택: admin, manager, staff)
|
|
@override
|
|
final String? role;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UpdateUserRequest(name: $name, email: $email, password: $password, phone: $phone, role: $role)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UpdateUserRequestImpl &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.email, email) || other.email == email) &&
|
|
(identical(other.password, password) ||
|
|
other.password == password) &&
|
|
(identical(other.phone, phone) || other.phone == phone) &&
|
|
(identical(other.role, role) || other.role == role));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, name, email, password, phone, role);
|
|
|
|
/// Create a copy of UpdateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UpdateUserRequestImplCopyWith<_$UpdateUserRequestImpl> get copyWith =>
|
|
__$$UpdateUserRequestImplCopyWithImpl<_$UpdateUserRequestImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UpdateUserRequestImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UpdateUserRequest implements UpdateUserRequest {
|
|
const factory _UpdateUserRequest(
|
|
{final String? name,
|
|
final String? email,
|
|
final String? password,
|
|
final String? phone,
|
|
final String? role}) = _$UpdateUserRequestImpl;
|
|
|
|
factory _UpdateUserRequest.fromJson(Map<String, dynamic> json) =
|
|
_$UpdateUserRequestImpl.fromJson;
|
|
|
|
/// 이름 (선택)
|
|
@override
|
|
String? get name;
|
|
|
|
/// 이메일 (선택, 유니크, 이메일 형식)
|
|
@override
|
|
String? get email;
|
|
|
|
/// 비밀번호 (선택, 6자 이상)
|
|
@override
|
|
String? get password;
|
|
|
|
/// 전화번호 (선택)
|
|
@override
|
|
String? get phone;
|
|
|
|
/// 권한 (선택: admin, manager, staff)
|
|
@override
|
|
String? get role;
|
|
|
|
/// Create a copy of UpdateUserRequest
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$UpdateUserRequestImplCopyWith<_$UpdateUserRequestImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
CheckUsernameResponse _$CheckUsernameResponseFromJson(
|
|
Map<String, dynamic> json) {
|
|
return _CheckUsernameResponse.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$CheckUsernameResponse {
|
|
bool get available => throw _privateConstructorUsedError;
|
|
String? get message => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this CheckUsernameResponse to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CheckUsernameResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CheckUsernameResponseCopyWith<CheckUsernameResponse> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CheckUsernameResponseCopyWith<$Res> {
|
|
factory $CheckUsernameResponseCopyWith(CheckUsernameResponse value,
|
|
$Res Function(CheckUsernameResponse) then) =
|
|
_$CheckUsernameResponseCopyWithImpl<$Res, CheckUsernameResponse>;
|
|
@useResult
|
|
$Res call({bool available, String? message});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CheckUsernameResponseCopyWithImpl<$Res,
|
|
$Val extends CheckUsernameResponse>
|
|
implements $CheckUsernameResponseCopyWith<$Res> {
|
|
_$CheckUsernameResponseCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CheckUsernameResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? available = null,
|
|
Object? message = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
available: null == available
|
|
? _value.available
|
|
: available // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
message: freezed == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CheckUsernameResponseImplCopyWith<$Res>
|
|
implements $CheckUsernameResponseCopyWith<$Res> {
|
|
factory _$$CheckUsernameResponseImplCopyWith(
|
|
_$CheckUsernameResponseImpl value,
|
|
$Res Function(_$CheckUsernameResponseImpl) then) =
|
|
__$$CheckUsernameResponseImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({bool available, String? message});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CheckUsernameResponseImplCopyWithImpl<$Res>
|
|
extends _$CheckUsernameResponseCopyWithImpl<$Res,
|
|
_$CheckUsernameResponseImpl>
|
|
implements _$$CheckUsernameResponseImplCopyWith<$Res> {
|
|
__$$CheckUsernameResponseImplCopyWithImpl(_$CheckUsernameResponseImpl _value,
|
|
$Res Function(_$CheckUsernameResponseImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of CheckUsernameResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? available = null,
|
|
Object? message = freezed,
|
|
}) {
|
|
return _then(_$CheckUsernameResponseImpl(
|
|
available: null == available
|
|
? _value.available
|
|
: available // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
message: freezed == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CheckUsernameResponseImpl implements _CheckUsernameResponse {
|
|
const _$CheckUsernameResponseImpl({required this.available, this.message});
|
|
|
|
factory _$CheckUsernameResponseImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CheckUsernameResponseImplFromJson(json);
|
|
|
|
@override
|
|
final bool available;
|
|
@override
|
|
final String? message;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CheckUsernameResponse(available: $available, message: $message)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CheckUsernameResponseImpl &&
|
|
(identical(other.available, available) ||
|
|
other.available == available) &&
|
|
(identical(other.message, message) || other.message == message));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, available, message);
|
|
|
|
/// Create a copy of CheckUsernameResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CheckUsernameResponseImplCopyWith<_$CheckUsernameResponseImpl>
|
|
get copyWith => __$$CheckUsernameResponseImplCopyWithImpl<
|
|
_$CheckUsernameResponseImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CheckUsernameResponseImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _CheckUsernameResponse implements CheckUsernameResponse {
|
|
const factory _CheckUsernameResponse(
|
|
{required final bool available,
|
|
final String? message}) = _$CheckUsernameResponseImpl;
|
|
|
|
factory _CheckUsernameResponse.fromJson(Map<String, dynamic> json) =
|
|
_$CheckUsernameResponseImpl.fromJson;
|
|
|
|
@override
|
|
bool get available;
|
|
@override
|
|
String? get message;
|
|
|
|
/// Create a copy of CheckUsernameResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CheckUsernameResponseImplCopyWith<_$CheckUsernameResponseImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
UserListDto _$UserListDtoFromJson(Map<String, dynamic> json) {
|
|
return _UserListDto.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UserListDto {
|
|
List<UserDto> get users => throw _privateConstructorUsedError;
|
|
int get total => throw _privateConstructorUsedError;
|
|
int get page => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'per_page')
|
|
int get perPage => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'total_pages')
|
|
int get totalPages => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this UserListDto to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of UserListDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$UserListDtoCopyWith<UserListDto> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserListDtoCopyWith<$Res> {
|
|
factory $UserListDtoCopyWith(
|
|
UserListDto value, $Res Function(UserListDto) then) =
|
|
_$UserListDtoCopyWithImpl<$Res, UserListDto>;
|
|
@useResult
|
|
$Res call(
|
|
{List<UserDto> users,
|
|
int total,
|
|
int page,
|
|
@JsonKey(name: 'per_page') int perPage,
|
|
@JsonKey(name: 'total_pages') int totalPages});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserListDtoCopyWithImpl<$Res, $Val extends UserListDto>
|
|
implements $UserListDtoCopyWith<$Res> {
|
|
_$UserListDtoCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of UserListDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? users = null,
|
|
Object? total = null,
|
|
Object? page = null,
|
|
Object? perPage = null,
|
|
Object? totalPages = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
users: null == users
|
|
? _value.users
|
|
: users // ignore: cast_nullable_to_non_nullable
|
|
as List<UserDto>,
|
|
total: null == total
|
|
? _value.total
|
|
: total // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
page: null == page
|
|
? _value.page
|
|
: page // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
perPage: null == perPage
|
|
? _value.perPage
|
|
: perPage // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalPages: null == totalPages
|
|
? _value.totalPages
|
|
: totalPages // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UserListDtoImplCopyWith<$Res>
|
|
implements $UserListDtoCopyWith<$Res> {
|
|
factory _$$UserListDtoImplCopyWith(
|
|
_$UserListDtoImpl value, $Res Function(_$UserListDtoImpl) then) =
|
|
__$$UserListDtoImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{List<UserDto> users,
|
|
int total,
|
|
int page,
|
|
@JsonKey(name: 'per_page') int perPage,
|
|
@JsonKey(name: 'total_pages') int totalPages});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UserListDtoImplCopyWithImpl<$Res>
|
|
extends _$UserListDtoCopyWithImpl<$Res, _$UserListDtoImpl>
|
|
implements _$$UserListDtoImplCopyWith<$Res> {
|
|
__$$UserListDtoImplCopyWithImpl(
|
|
_$UserListDtoImpl _value, $Res Function(_$UserListDtoImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of UserListDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? users = null,
|
|
Object? total = null,
|
|
Object? page = null,
|
|
Object? perPage = null,
|
|
Object? totalPages = null,
|
|
}) {
|
|
return _then(_$UserListDtoImpl(
|
|
users: null == users
|
|
? _value._users
|
|
: users // ignore: cast_nullable_to_non_nullable
|
|
as List<UserDto>,
|
|
total: null == total
|
|
? _value.total
|
|
: total // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
page: null == page
|
|
? _value.page
|
|
: page // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
perPage: null == perPage
|
|
? _value.perPage
|
|
: perPage // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
totalPages: null == totalPages
|
|
? _value.totalPages
|
|
: totalPages // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UserListDtoImpl extends _UserListDto {
|
|
const _$UserListDtoImpl(
|
|
{required final List<UserDto> users,
|
|
required this.total,
|
|
required this.page,
|
|
@JsonKey(name: 'per_page') required this.perPage,
|
|
@JsonKey(name: 'total_pages') required this.totalPages})
|
|
: _users = users,
|
|
super._();
|
|
|
|
factory _$UserListDtoImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UserListDtoImplFromJson(json);
|
|
|
|
final List<UserDto> _users;
|
|
@override
|
|
List<UserDto> get users {
|
|
if (_users is EqualUnmodifiableListView) return _users;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_users);
|
|
}
|
|
|
|
@override
|
|
final int total;
|
|
@override
|
|
final int page;
|
|
@override
|
|
@JsonKey(name: 'per_page')
|
|
final int perPage;
|
|
@override
|
|
@JsonKey(name: 'total_pages')
|
|
final int totalPages;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UserListDto(users: $users, total: $total, page: $page, perPage: $perPage, totalPages: $totalPages)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UserListDtoImpl &&
|
|
const DeepCollectionEquality().equals(other._users, _users) &&
|
|
(identical(other.total, total) || other.total == total) &&
|
|
(identical(other.page, page) || other.page == page) &&
|
|
(identical(other.perPage, perPage) || other.perPage == perPage) &&
|
|
(identical(other.totalPages, totalPages) ||
|
|
other.totalPages == totalPages));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_users),
|
|
total,
|
|
page,
|
|
perPage,
|
|
totalPages);
|
|
|
|
/// Create a copy of UserListDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UserListDtoImplCopyWith<_$UserListDtoImpl> get copyWith =>
|
|
__$$UserListDtoImplCopyWithImpl<_$UserListDtoImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UserListDtoImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UserListDto extends UserListDto {
|
|
const factory _UserListDto(
|
|
{required final List<UserDto> users,
|
|
required final int total,
|
|
required final int page,
|
|
@JsonKey(name: 'per_page') required final int perPage,
|
|
@JsonKey(name: 'total_pages') required final int totalPages}) =
|
|
_$UserListDtoImpl;
|
|
const _UserListDto._() : super._();
|
|
|
|
factory _UserListDto.fromJson(Map<String, dynamic> json) =
|
|
_$UserListDtoImpl.fromJson;
|
|
|
|
@override
|
|
List<UserDto> get users;
|
|
@override
|
|
int get total;
|
|
@override
|
|
int get page;
|
|
@override
|
|
@JsonKey(name: 'per_page')
|
|
int get perPage;
|
|
@override
|
|
@JsonKey(name: 'total_pages')
|
|
int get totalPages;
|
|
|
|
/// Create a copy of UserListDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$UserListDtoImplCopyWith<_$UserListDtoImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
UserDetailDto _$UserDetailDtoFromJson(Map<String, dynamic> json) {
|
|
return _UserDetailDto.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UserDetailDto {
|
|
UserDto get user => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this UserDetailDto to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$UserDetailDtoCopyWith<UserDetailDto> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserDetailDtoCopyWith<$Res> {
|
|
factory $UserDetailDtoCopyWith(
|
|
UserDetailDto value, $Res Function(UserDetailDto) then) =
|
|
_$UserDetailDtoCopyWithImpl<$Res, UserDetailDto>;
|
|
@useResult
|
|
$Res call({UserDto user});
|
|
|
|
$UserDtoCopyWith<$Res> get user;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserDetailDtoCopyWithImpl<$Res, $Val extends UserDetailDto>
|
|
implements $UserDetailDtoCopyWith<$Res> {
|
|
_$UserDetailDtoCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? user = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
user: null == user
|
|
? _value.user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as UserDto,
|
|
) as $Val);
|
|
}
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$UserDtoCopyWith<$Res> get user {
|
|
return $UserDtoCopyWith<$Res>(_value.user, (value) {
|
|
return _then(_value.copyWith(user: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UserDetailDtoImplCopyWith<$Res>
|
|
implements $UserDetailDtoCopyWith<$Res> {
|
|
factory _$$UserDetailDtoImplCopyWith(
|
|
_$UserDetailDtoImpl value, $Res Function(_$UserDetailDtoImpl) then) =
|
|
__$$UserDetailDtoImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({UserDto user});
|
|
|
|
@override
|
|
$UserDtoCopyWith<$Res> get user;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UserDetailDtoImplCopyWithImpl<$Res>
|
|
extends _$UserDetailDtoCopyWithImpl<$Res, _$UserDetailDtoImpl>
|
|
implements _$$UserDetailDtoImplCopyWith<$Res> {
|
|
__$$UserDetailDtoImplCopyWithImpl(
|
|
_$UserDetailDtoImpl _value, $Res Function(_$UserDetailDtoImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? user = null,
|
|
}) {
|
|
return _then(_$UserDetailDtoImpl(
|
|
user: null == user
|
|
? _value.user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as UserDto,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UserDetailDtoImpl implements _UserDetailDto {
|
|
const _$UserDetailDtoImpl({required this.user});
|
|
|
|
factory _$UserDetailDtoImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UserDetailDtoImplFromJson(json);
|
|
|
|
@override
|
|
final UserDto user;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UserDetailDto(user: $user)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UserDetailDtoImpl &&
|
|
(identical(other.user, user) || other.user == user));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, user);
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UserDetailDtoImplCopyWith<_$UserDetailDtoImpl> get copyWith =>
|
|
__$$UserDetailDtoImplCopyWithImpl<_$UserDetailDtoImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UserDetailDtoImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UserDetailDto implements UserDetailDto {
|
|
const factory _UserDetailDto({required final UserDto user}) =
|
|
_$UserDetailDtoImpl;
|
|
|
|
factory _UserDetailDto.fromJson(Map<String, dynamic> json) =
|
|
_$UserDetailDtoImpl.fromJson;
|
|
|
|
@override
|
|
UserDto get user;
|
|
|
|
/// Create a copy of UserDetailDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$UserDetailDtoImplCopyWith<_$UserDetailDtoImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
UserResponse _$UserResponseFromJson(Map<String, dynamic> json) {
|
|
return _UserResponse.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UserResponse {
|
|
UserDto get user => throw _privateConstructorUsedError;
|
|
String? get message => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this UserResponse to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$UserResponseCopyWith<UserResponse> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserResponseCopyWith<$Res> {
|
|
factory $UserResponseCopyWith(
|
|
UserResponse value, $Res Function(UserResponse) then) =
|
|
_$UserResponseCopyWithImpl<$Res, UserResponse>;
|
|
@useResult
|
|
$Res call({UserDto user, String? message});
|
|
|
|
$UserDtoCopyWith<$Res> get user;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserResponseCopyWithImpl<$Res, $Val extends UserResponse>
|
|
implements $UserResponseCopyWith<$Res> {
|
|
_$UserResponseCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? user = null,
|
|
Object? message = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
user: null == user
|
|
? _value.user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as UserDto,
|
|
message: freezed == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$UserDtoCopyWith<$Res> get user {
|
|
return $UserDtoCopyWith<$Res>(_value.user, (value) {
|
|
return _then(_value.copyWith(user: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UserResponseImplCopyWith<$Res>
|
|
implements $UserResponseCopyWith<$Res> {
|
|
factory _$$UserResponseImplCopyWith(
|
|
_$UserResponseImpl value, $Res Function(_$UserResponseImpl) then) =
|
|
__$$UserResponseImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({UserDto user, String? message});
|
|
|
|
@override
|
|
$UserDtoCopyWith<$Res> get user;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UserResponseImplCopyWithImpl<$Res>
|
|
extends _$UserResponseCopyWithImpl<$Res, _$UserResponseImpl>
|
|
implements _$$UserResponseImplCopyWith<$Res> {
|
|
__$$UserResponseImplCopyWithImpl(
|
|
_$UserResponseImpl _value, $Res Function(_$UserResponseImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? user = null,
|
|
Object? message = freezed,
|
|
}) {
|
|
return _then(_$UserResponseImpl(
|
|
user: null == user
|
|
? _value.user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as UserDto,
|
|
message: freezed == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UserResponseImpl implements _UserResponse {
|
|
const _$UserResponseImpl({required this.user, this.message});
|
|
|
|
factory _$UserResponseImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UserResponseImplFromJson(json);
|
|
|
|
@override
|
|
final UserDto user;
|
|
@override
|
|
final String? message;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UserResponse(user: $user, message: $message)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UserResponseImpl &&
|
|
(identical(other.user, user) || other.user == user) &&
|
|
(identical(other.message, message) || other.message == message));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, user, message);
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UserResponseImplCopyWith<_$UserResponseImpl> get copyWith =>
|
|
__$$UserResponseImplCopyWithImpl<_$UserResponseImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UserResponseImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UserResponse implements UserResponse {
|
|
const factory _UserResponse(
|
|
{required final UserDto user,
|
|
final String? message}) = _$UserResponseImpl;
|
|
|
|
factory _UserResponse.fromJson(Map<String, dynamic> json) =
|
|
_$UserResponseImpl.fromJson;
|
|
|
|
@override
|
|
UserDto get user;
|
|
@override
|
|
String? get message;
|
|
|
|
/// Create a copy of UserResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$UserResponseImplCopyWith<_$UserResponseImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|