fix: API 응답 파싱 오류 수정 및 에러 처리 개선
주요 변경사항: - 창고 관리 API 응답 구조와 DTO 불일치 수정 - WarehouseLocationDto에 code, manager_phone 필드 추가 - RemoteDataSource에서 API 응답을 DTO 구조에 맞게 변환 - 회사 관리 API 응답 파싱 오류 수정 - CompanyResponse의 필수 필드를 nullable로 변경 - PaginatedResponse 구조 매핑 로직 개선 - 에러 처리 및 로깅 개선 - Service Layer에 상세 에러 로깅 추가 - Controller에서 에러 타입별 처리 - 새로운 유틸리티 추가 - ResponseInterceptor: API 응답 정규화 - DebugLogger: 디버깅 도구 - HealthCheckService: 서버 상태 확인 - 문서화 - API 통합 테스트 가이드 - 에러 분석 보고서 - 리팩토링 계획서
This commit is contained in:
@@ -7,9 +7,9 @@ part 'auth_user.g.dart';
|
||||
class AuthUser with _$AuthUser {
|
||||
const factory AuthUser({
|
||||
required int id,
|
||||
required String username,
|
||||
required String email,
|
||||
@JsonKey(name: 'first_name') required String firstName,
|
||||
@JsonKey(name: 'last_name') required String lastName,
|
||||
required String name,
|
||||
required String role,
|
||||
}) = _AuthUser;
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@ AuthUser _$AuthUserFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$AuthUser {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
String get username => throw _privateConstructorUsedError;
|
||||
String get email => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'last_name')
|
||||
String get lastName => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
String get role => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthUser to a JSON map.
|
||||
@@ -43,12 +41,7 @@ abstract class $AuthUserCopyWith<$Res> {
|
||||
factory $AuthUserCopyWith(AuthUser value, $Res Function(AuthUser) then) =
|
||||
_$AuthUserCopyWithImpl<$Res, AuthUser>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String email,
|
||||
@JsonKey(name: 'first_name') String firstName,
|
||||
@JsonKey(name: 'last_name') String lastName,
|
||||
String role});
|
||||
$Res call({int id, String username, String email, String name, String role});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -67,9 +60,9 @@ class _$AuthUserCopyWithImpl<$Res, $Val extends AuthUser>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? username = null,
|
||||
Object? email = null,
|
||||
Object? firstName = null,
|
||||
Object? lastName = null,
|
||||
Object? name = null,
|
||||
Object? role = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -77,17 +70,17 @@ class _$AuthUserCopyWithImpl<$Res, $Val extends AuthUser>
|
||||
? _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,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
firstName: null == firstName
|
||||
? _value.firstName
|
||||
: firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
lastName: null == lastName
|
||||
? _value.lastName
|
||||
: lastName // ignore: cast_nullable_to_non_nullable
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
role: null == role
|
||||
? _value.role
|
||||
@@ -105,12 +98,7 @@ abstract class _$$AuthUserImplCopyWith<$Res>
|
||||
__$$AuthUserImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String email,
|
||||
@JsonKey(name: 'first_name') String firstName,
|
||||
@JsonKey(name: 'last_name') String lastName,
|
||||
String role});
|
||||
$Res call({int id, String username, String email, String name, String role});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -127,9 +115,9 @@ class __$$AuthUserImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? username = null,
|
||||
Object? email = null,
|
||||
Object? firstName = null,
|
||||
Object? lastName = null,
|
||||
Object? name = null,
|
||||
Object? role = null,
|
||||
}) {
|
||||
return _then(_$AuthUserImpl(
|
||||
@@ -137,17 +125,17 @@ class __$$AuthUserImplCopyWithImpl<$Res>
|
||||
? _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,
|
||||
email: null == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
firstName: null == firstName
|
||||
? _value.firstName
|
||||
: firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
lastName: null == lastName
|
||||
? _value.lastName
|
||||
: lastName // ignore: cast_nullable_to_non_nullable
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
role: null == role
|
||||
? _value.role
|
||||
@@ -162,9 +150,9 @@ class __$$AuthUserImplCopyWithImpl<$Res>
|
||||
class _$AuthUserImpl implements _AuthUser {
|
||||
const _$AuthUserImpl(
|
||||
{required this.id,
|
||||
required this.username,
|
||||
required this.email,
|
||||
@JsonKey(name: 'first_name') required this.firstName,
|
||||
@JsonKey(name: 'last_name') required this.lastName,
|
||||
required this.name,
|
||||
required this.role});
|
||||
|
||||
factory _$AuthUserImpl.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -173,19 +161,17 @@ class _$AuthUserImpl implements _AuthUser {
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
final String username;
|
||||
@override
|
||||
final String email;
|
||||
@override
|
||||
@JsonKey(name: 'first_name')
|
||||
final String firstName;
|
||||
@override
|
||||
@JsonKey(name: 'last_name')
|
||||
final String lastName;
|
||||
final String name;
|
||||
@override
|
||||
final String role;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthUser(id: $id, email: $email, firstName: $firstName, lastName: $lastName, role: $role)';
|
||||
return 'AuthUser(id: $id, username: $username, email: $email, name: $name, role: $role)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -194,18 +180,16 @@ class _$AuthUserImpl implements _AuthUser {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthUserImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.username, username) ||
|
||||
other.username == username) &&
|
||||
(identical(other.email, email) || other.email == email) &&
|
||||
(identical(other.firstName, firstName) ||
|
||||
other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) ||
|
||||
other.lastName == lastName) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.role, role) || other.role == role));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, email, firstName, lastName, role);
|
||||
int get hashCode => Object.hash(runtimeType, id, username, email, name, role);
|
||||
|
||||
/// Create a copy of AuthUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -226,9 +210,9 @@ class _$AuthUserImpl implements _AuthUser {
|
||||
abstract class _AuthUser implements AuthUser {
|
||||
const factory _AuthUser(
|
||||
{required final int id,
|
||||
required final String username,
|
||||
required final String email,
|
||||
@JsonKey(name: 'first_name') required final String firstName,
|
||||
@JsonKey(name: 'last_name') required final String lastName,
|
||||
required final String name,
|
||||
required final String role}) = _$AuthUserImpl;
|
||||
|
||||
factory _AuthUser.fromJson(Map<String, dynamic> json) =
|
||||
@@ -237,13 +221,11 @@ abstract class _AuthUser implements AuthUser {
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
String get username;
|
||||
@override
|
||||
String get email;
|
||||
@override
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName;
|
||||
@override
|
||||
@JsonKey(name: 'last_name')
|
||||
String get lastName;
|
||||
String get name;
|
||||
@override
|
||||
String get role;
|
||||
|
||||
|
||||
@@ -9,17 +9,17 @@ part of 'auth_user.dart';
|
||||
_$AuthUserImpl _$$AuthUserImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AuthUserImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
username: json['username'] as String,
|
||||
email: json['email'] as String,
|
||||
firstName: json['first_name'] as String,
|
||||
lastName: json['last_name'] as String,
|
||||
name: json['name'] as String,
|
||||
role: json['role'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthUserImplToJson(_$AuthUserImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'username': instance.username,
|
||||
'email': instance.email,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'name': instance.name,
|
||||
'role': instance.role,
|
||||
};
|
||||
|
||||
@@ -6,7 +6,8 @@ part 'login_request.g.dart';
|
||||
@freezed
|
||||
class LoginRequest with _$LoginRequest {
|
||||
const factory LoginRequest({
|
||||
required String email,
|
||||
String? username,
|
||||
String? email,
|
||||
required String password,
|
||||
}) = _LoginRequest;
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ LoginRequest _$LoginRequestFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LoginRequest {
|
||||
String get email => throw _privateConstructorUsedError;
|
||||
String? get username => throw _privateConstructorUsedError;
|
||||
String? get email => throw _privateConstructorUsedError;
|
||||
String get password => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LoginRequest to a JSON map.
|
||||
@@ -39,7 +40,7 @@ abstract class $LoginRequestCopyWith<$Res> {
|
||||
LoginRequest value, $Res Function(LoginRequest) then) =
|
||||
_$LoginRequestCopyWithImpl<$Res, LoginRequest>;
|
||||
@useResult
|
||||
$Res call({String email, String password});
|
||||
$Res call({String? username, String? email, String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -57,14 +58,19 @@ class _$LoginRequestCopyWithImpl<$Res, $Val extends LoginRequest>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? email = null,
|
||||
Object? username = freezed,
|
||||
Object? email = freezed,
|
||||
Object? password = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
email: null == email
|
||||
username: freezed == username
|
||||
? _value.username
|
||||
: username // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
email: freezed == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String?,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
@@ -81,7 +87,7 @@ abstract class _$$LoginRequestImplCopyWith<$Res>
|
||||
__$$LoginRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String email, String password});
|
||||
$Res call({String? username, String? email, String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -97,14 +103,19 @@ class __$$LoginRequestImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? email = null,
|
||||
Object? username = freezed,
|
||||
Object? email = freezed,
|
||||
Object? password = null,
|
||||
}) {
|
||||
return _then(_$LoginRequestImpl(
|
||||
email: null == email
|
||||
username: freezed == username
|
||||
? _value.username
|
||||
: username // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
email: freezed == email
|
||||
? _value.email
|
||||
: email // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String?,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
@@ -116,19 +127,21 @@ class __$$LoginRequestImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LoginRequestImpl implements _LoginRequest {
|
||||
const _$LoginRequestImpl({required this.email, required this.password});
|
||||
const _$LoginRequestImpl({this.username, this.email, required this.password});
|
||||
|
||||
factory _$LoginRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LoginRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String email;
|
||||
final String? username;
|
||||
@override
|
||||
final String? email;
|
||||
@override
|
||||
final String password;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LoginRequest(email: $email, password: $password)';
|
||||
return 'LoginRequest(username: $username, email: $email, password: $password)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -136,6 +149,8 @@ class _$LoginRequestImpl implements _LoginRequest {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$LoginRequestImpl &&
|
||||
(identical(other.username, username) ||
|
||||
other.username == username) &&
|
||||
(identical(other.email, email) || other.email == email) &&
|
||||
(identical(other.password, password) ||
|
||||
other.password == password));
|
||||
@@ -143,7 +158,7 @@ class _$LoginRequestImpl implements _LoginRequest {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, email, password);
|
||||
int get hashCode => Object.hash(runtimeType, username, email, password);
|
||||
|
||||
/// Create a copy of LoginRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -163,14 +178,17 @@ class _$LoginRequestImpl implements _LoginRequest {
|
||||
|
||||
abstract class _LoginRequest implements LoginRequest {
|
||||
const factory _LoginRequest(
|
||||
{required final String email,
|
||||
{final String? username,
|
||||
final String? email,
|
||||
required final String password}) = _$LoginRequestImpl;
|
||||
|
||||
factory _LoginRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$LoginRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get email;
|
||||
String? get username;
|
||||
@override
|
||||
String? get email;
|
||||
@override
|
||||
String get password;
|
||||
|
||||
|
||||
@@ -8,12 +8,14 @@ part of 'login_request.dart';
|
||||
|
||||
_$LoginRequestImpl _$$LoginRequestImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LoginRequestImpl(
|
||||
email: json['email'] as String,
|
||||
username: json['username'] as String?,
|
||||
email: json['email'] as String?,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LoginRequestImplToJson(_$LoginRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'username': instance.username,
|
||||
'email': instance.email,
|
||||
'password': instance.password,
|
||||
};
|
||||
|
||||
@@ -45,14 +45,14 @@ class CompanyResponse with _$CompanyResponse {
|
||||
required String name,
|
||||
required String address,
|
||||
@JsonKey(name: 'contact_name') required String contactName,
|
||||
@JsonKey(name: 'contact_position') required String contactPosition,
|
||||
@JsonKey(name: 'contact_position') String? contactPosition, // nullable로 변경
|
||||
@JsonKey(name: 'contact_phone') required String contactPhone,
|
||||
@JsonKey(name: 'contact_email') required String contactEmail,
|
||||
@JsonKey(name: 'company_types') @Default([]) List<String> companyTypes,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt, // nullable로 변경
|
||||
@JsonKey(name: 'address_id') int? addressId,
|
||||
}) = _CompanyResponse;
|
||||
|
||||
|
||||
@@ -719,7 +719,8 @@ mixin _$CompanyResponse {
|
||||
@JsonKey(name: 'contact_name')
|
||||
String get contactName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'contact_position')
|
||||
String get contactPosition => throw _privateConstructorUsedError;
|
||||
String? get contactPosition =>
|
||||
throw _privateConstructorUsedError; // nullable로 변경
|
||||
@JsonKey(name: 'contact_phone')
|
||||
String get contactPhone => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'contact_email')
|
||||
@@ -732,7 +733,7 @@ mixin _$CompanyResponse {
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
DateTime? get updatedAt => throw _privateConstructorUsedError; // nullable로 변경
|
||||
@JsonKey(name: 'address_id')
|
||||
int? get addressId => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -757,14 +758,14 @@ abstract class $CompanyResponseCopyWith<$Res> {
|
||||
String name,
|
||||
String address,
|
||||
@JsonKey(name: 'contact_name') String contactName,
|
||||
@JsonKey(name: 'contact_position') String contactPosition,
|
||||
@JsonKey(name: 'contact_position') String? contactPosition,
|
||||
@JsonKey(name: 'contact_phone') String contactPhone,
|
||||
@JsonKey(name: 'contact_email') String contactEmail,
|
||||
@JsonKey(name: 'company_types') List<String> companyTypes,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') int? addressId});
|
||||
}
|
||||
|
||||
@@ -787,14 +788,14 @@ class _$CompanyResponseCopyWithImpl<$Res, $Val extends CompanyResponse>
|
||||
Object? name = null,
|
||||
Object? address = null,
|
||||
Object? contactName = null,
|
||||
Object? contactPosition = null,
|
||||
Object? contactPosition = freezed,
|
||||
Object? contactPhone = null,
|
||||
Object? contactEmail = null,
|
||||
Object? companyTypes = null,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? addressId = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -814,10 +815,10 @@ class _$CompanyResponseCopyWithImpl<$Res, $Val extends CompanyResponse>
|
||||
? _value.contactName
|
||||
: contactName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
contactPosition: null == contactPosition
|
||||
contactPosition: freezed == contactPosition
|
||||
? _value.contactPosition
|
||||
: contactPosition // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String?,
|
||||
contactPhone: null == contactPhone
|
||||
? _value.contactPhone
|
||||
: contactPhone // ignore: cast_nullable_to_non_nullable
|
||||
@@ -842,10 +843,10 @@ class _$CompanyResponseCopyWithImpl<$Res, $Val extends CompanyResponse>
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
addressId: freezed == addressId
|
||||
? _value.addressId
|
||||
: addressId // ignore: cast_nullable_to_non_nullable
|
||||
@@ -867,14 +868,14 @@ abstract class _$$CompanyResponseImplCopyWith<$Res>
|
||||
String name,
|
||||
String address,
|
||||
@JsonKey(name: 'contact_name') String contactName,
|
||||
@JsonKey(name: 'contact_position') String contactPosition,
|
||||
@JsonKey(name: 'contact_position') String? contactPosition,
|
||||
@JsonKey(name: 'contact_phone') String contactPhone,
|
||||
@JsonKey(name: 'contact_email') String contactEmail,
|
||||
@JsonKey(name: 'company_types') List<String> companyTypes,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') int? addressId});
|
||||
}
|
||||
|
||||
@@ -895,14 +896,14 @@ class __$$CompanyResponseImplCopyWithImpl<$Res>
|
||||
Object? name = null,
|
||||
Object? address = null,
|
||||
Object? contactName = null,
|
||||
Object? contactPosition = null,
|
||||
Object? contactPosition = freezed,
|
||||
Object? contactPhone = null,
|
||||
Object? contactEmail = null,
|
||||
Object? companyTypes = null,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? addressId = freezed,
|
||||
}) {
|
||||
return _then(_$CompanyResponseImpl(
|
||||
@@ -922,10 +923,10 @@ class __$$CompanyResponseImplCopyWithImpl<$Res>
|
||||
? _value.contactName
|
||||
: contactName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
contactPosition: null == contactPosition
|
||||
contactPosition: freezed == contactPosition
|
||||
? _value.contactPosition
|
||||
: contactPosition // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String?,
|
||||
contactPhone: null == contactPhone
|
||||
? _value.contactPhone
|
||||
: contactPhone // ignore: cast_nullable_to_non_nullable
|
||||
@@ -950,10 +951,10 @@ class __$$CompanyResponseImplCopyWithImpl<$Res>
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
addressId: freezed == addressId
|
||||
? _value.addressId
|
||||
: addressId // ignore: cast_nullable_to_non_nullable
|
||||
@@ -970,7 +971,7 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
required this.name,
|
||||
required this.address,
|
||||
@JsonKey(name: 'contact_name') required this.contactName,
|
||||
@JsonKey(name: 'contact_position') required this.contactPosition,
|
||||
@JsonKey(name: 'contact_position') this.contactPosition,
|
||||
@JsonKey(name: 'contact_phone') required this.contactPhone,
|
||||
@JsonKey(name: 'contact_email') required this.contactEmail,
|
||||
@JsonKey(name: 'company_types')
|
||||
@@ -978,7 +979,7 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
this.remark,
|
||||
@JsonKey(name: 'is_active') required this.isActive,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt,
|
||||
@JsonKey(name: 'updated_at') this.updatedAt,
|
||||
@JsonKey(name: 'address_id') this.addressId})
|
||||
: _companyTypes = companyTypes;
|
||||
|
||||
@@ -996,7 +997,8 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
final String contactName;
|
||||
@override
|
||||
@JsonKey(name: 'contact_position')
|
||||
final String contactPosition;
|
||||
final String? contactPosition;
|
||||
// nullable로 변경
|
||||
@override
|
||||
@JsonKey(name: 'contact_phone')
|
||||
final String contactPhone;
|
||||
@@ -1022,7 +1024,8 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
final DateTime updatedAt;
|
||||
final DateTime? updatedAt;
|
||||
// nullable로 변경
|
||||
@override
|
||||
@JsonKey(name: 'address_id')
|
||||
final int? addressId;
|
||||
@@ -1098,20 +1101,20 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
|
||||
abstract class _CompanyResponse implements CompanyResponse {
|
||||
const factory _CompanyResponse(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
required final String address,
|
||||
@JsonKey(name: 'contact_name') required final String contactName,
|
||||
@JsonKey(name: 'contact_position') required final String contactPosition,
|
||||
@JsonKey(name: 'contact_phone') required final String contactPhone,
|
||||
@JsonKey(name: 'contact_email') required final String contactEmail,
|
||||
@JsonKey(name: 'company_types') final List<String> companyTypes,
|
||||
final String? remark,
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
|
||||
@JsonKey(name: 'address_id')
|
||||
final int? addressId}) = _$CompanyResponseImpl;
|
||||
{required final int id,
|
||||
required final String name,
|
||||
required final String address,
|
||||
@JsonKey(name: 'contact_name') required final String contactName,
|
||||
@JsonKey(name: 'contact_position') final String? contactPosition,
|
||||
@JsonKey(name: 'contact_phone') required final String contactPhone,
|
||||
@JsonKey(name: 'contact_email') required final String contactEmail,
|
||||
@JsonKey(name: 'company_types') final List<String> companyTypes,
|
||||
final String? remark,
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') final DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') final int? addressId}) =
|
||||
_$CompanyResponseImpl;
|
||||
|
||||
factory _CompanyResponse.fromJson(Map<String, dynamic> json) =
|
||||
_$CompanyResponseImpl.fromJson;
|
||||
@@ -1127,7 +1130,7 @@ abstract class _CompanyResponse implements CompanyResponse {
|
||||
String get contactName;
|
||||
@override
|
||||
@JsonKey(name: 'contact_position')
|
||||
String get contactPosition;
|
||||
String? get contactPosition; // nullable로 변경
|
||||
@override
|
||||
@JsonKey(name: 'contact_phone')
|
||||
String get contactPhone;
|
||||
@@ -1147,7 +1150,7 @@ abstract class _CompanyResponse implements CompanyResponse {
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt;
|
||||
DateTime? get updatedAt; // nullable로 변경
|
||||
@override
|
||||
@JsonKey(name: 'address_id')
|
||||
int? get addressId;
|
||||
|
||||
@@ -72,7 +72,7 @@ _$CompanyResponseImpl _$$CompanyResponseImplFromJson(
|
||||
name: json['name'] as String,
|
||||
address: json['address'] as String,
|
||||
contactName: json['contact_name'] as String,
|
||||
contactPosition: json['contact_position'] as String,
|
||||
contactPosition: json['contact_position'] as String?,
|
||||
contactPhone: json['contact_phone'] as String,
|
||||
contactEmail: json['contact_email'] as String,
|
||||
companyTypes: (json['company_types'] as List<dynamic>?)
|
||||
@@ -82,7 +82,9 @@ _$CompanyResponseImpl _$$CompanyResponseImplFromJson(
|
||||
remark: json['remark'] as String?,
|
||||
isActive: json['is_active'] as bool,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
addressId: (json['address_id'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
@@ -100,7 +102,7 @@ Map<String, dynamic> _$$CompanyResponseImplToJson(
|
||||
'remark': instance.remark,
|
||||
'is_active': instance.isActive,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
'address_id': instance.addressId,
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ class CompanyListDto with _$CompanyListDto {
|
||||
required String address,
|
||||
@JsonKey(name: 'contact_name') required String contactName,
|
||||
@JsonKey(name: 'contact_phone') required String contactPhone,
|
||||
@JsonKey(name: 'contact_email') String? contactEmail,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime? createdAt,
|
||||
@JsonKey(name: 'branch_count') @Default(0) int branchCount,
|
||||
}) = _CompanyListDto;
|
||||
|
||||
|
||||
@@ -27,8 +27,12 @@ mixin _$CompanyListDto {
|
||||
String get contactName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'contact_phone')
|
||||
String get contactPhone => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'contact_email')
|
||||
String? get contactEmail => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_active')
|
||||
bool get isActive => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime? get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'branch_count')
|
||||
int get branchCount => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -54,7 +58,9 @@ abstract class $CompanyListDtoCopyWith<$Res> {
|
||||
String address,
|
||||
@JsonKey(name: 'contact_name') String contactName,
|
||||
@JsonKey(name: 'contact_phone') String contactPhone,
|
||||
@JsonKey(name: 'contact_email') String? contactEmail,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime? createdAt,
|
||||
@JsonKey(name: 'branch_count') int branchCount});
|
||||
}
|
||||
|
||||
@@ -78,7 +84,9 @@ class _$CompanyListDtoCopyWithImpl<$Res, $Val extends CompanyListDto>
|
||||
Object? address = null,
|
||||
Object? contactName = null,
|
||||
Object? contactPhone = null,
|
||||
Object? contactEmail = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = freezed,
|
||||
Object? branchCount = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -102,10 +110,18 @@ class _$CompanyListDtoCopyWithImpl<$Res, $Val extends CompanyListDto>
|
||||
? _value.contactPhone
|
||||
: contactPhone // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
contactEmail: freezed == contactEmail
|
||||
? _value.contactEmail
|
||||
: contactEmail // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isActive: null == isActive
|
||||
? _value.isActive
|
||||
: isActive // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
createdAt: freezed == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
branchCount: null == branchCount
|
||||
? _value.branchCount
|
||||
: branchCount // ignore: cast_nullable_to_non_nullable
|
||||
@@ -128,7 +144,9 @@ abstract class _$$CompanyListDtoImplCopyWith<$Res>
|
||||
String address,
|
||||
@JsonKey(name: 'contact_name') String contactName,
|
||||
@JsonKey(name: 'contact_phone') String contactPhone,
|
||||
@JsonKey(name: 'contact_email') String? contactEmail,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime? createdAt,
|
||||
@JsonKey(name: 'branch_count') int branchCount});
|
||||
}
|
||||
|
||||
@@ -150,7 +168,9 @@ class __$$CompanyListDtoImplCopyWithImpl<$Res>
|
||||
Object? address = null,
|
||||
Object? contactName = null,
|
||||
Object? contactPhone = null,
|
||||
Object? contactEmail = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = freezed,
|
||||
Object? branchCount = null,
|
||||
}) {
|
||||
return _then(_$CompanyListDtoImpl(
|
||||
@@ -174,10 +194,18 @@ class __$$CompanyListDtoImplCopyWithImpl<$Res>
|
||||
? _value.contactPhone
|
||||
: contactPhone // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
contactEmail: freezed == contactEmail
|
||||
? _value.contactEmail
|
||||
: contactEmail // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isActive: null == isActive
|
||||
? _value.isActive
|
||||
: isActive // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
createdAt: freezed == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
branchCount: null == branchCount
|
||||
? _value.branchCount
|
||||
: branchCount // ignore: cast_nullable_to_non_nullable
|
||||
@@ -195,7 +223,9 @@ class _$CompanyListDtoImpl implements _CompanyListDto {
|
||||
required this.address,
|
||||
@JsonKey(name: 'contact_name') required this.contactName,
|
||||
@JsonKey(name: 'contact_phone') required this.contactPhone,
|
||||
@JsonKey(name: 'contact_email') this.contactEmail,
|
||||
@JsonKey(name: 'is_active') required this.isActive,
|
||||
@JsonKey(name: 'created_at') this.createdAt,
|
||||
@JsonKey(name: 'branch_count') this.branchCount = 0});
|
||||
|
||||
factory _$CompanyListDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -214,15 +244,21 @@ class _$CompanyListDtoImpl implements _CompanyListDto {
|
||||
@JsonKey(name: 'contact_phone')
|
||||
final String contactPhone;
|
||||
@override
|
||||
@JsonKey(name: 'contact_email')
|
||||
final String? contactEmail;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
final bool isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime? createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'branch_count')
|
||||
final int branchCount;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CompanyListDto(id: $id, name: $name, address: $address, contactName: $contactName, contactPhone: $contactPhone, isActive: $isActive, branchCount: $branchCount)';
|
||||
return 'CompanyListDto(id: $id, name: $name, address: $address, contactName: $contactName, contactPhone: $contactPhone, contactEmail: $contactEmail, isActive: $isActive, createdAt: $createdAt, branchCount: $branchCount)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -237,8 +273,12 @@ class _$CompanyListDtoImpl implements _CompanyListDto {
|
||||
other.contactName == contactName) &&
|
||||
(identical(other.contactPhone, contactPhone) ||
|
||||
other.contactPhone == contactPhone) &&
|
||||
(identical(other.contactEmail, contactEmail) ||
|
||||
other.contactEmail == contactEmail) &&
|
||||
(identical(other.isActive, isActive) ||
|
||||
other.isActive == isActive) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.branchCount, branchCount) ||
|
||||
other.branchCount == branchCount));
|
||||
}
|
||||
@@ -246,7 +286,7 @@ class _$CompanyListDtoImpl implements _CompanyListDto {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, address, contactName,
|
||||
contactPhone, isActive, branchCount);
|
||||
contactPhone, contactEmail, isActive, createdAt, branchCount);
|
||||
|
||||
/// Create a copy of CompanyListDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -272,7 +312,9 @@ abstract class _CompanyListDto implements CompanyListDto {
|
||||
required final String address,
|
||||
@JsonKey(name: 'contact_name') required final String contactName,
|
||||
@JsonKey(name: 'contact_phone') required final String contactPhone,
|
||||
@JsonKey(name: 'contact_email') final String? contactEmail,
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'created_at') final DateTime? createdAt,
|
||||
@JsonKey(name: 'branch_count') final int branchCount}) =
|
||||
_$CompanyListDtoImpl;
|
||||
|
||||
@@ -292,9 +334,15 @@ abstract class _CompanyListDto implements CompanyListDto {
|
||||
@JsonKey(name: 'contact_phone')
|
||||
String get contactPhone;
|
||||
@override
|
||||
@JsonKey(name: 'contact_email')
|
||||
String? get contactEmail;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
bool get isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime? get createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'branch_count')
|
||||
int get branchCount;
|
||||
|
||||
|
||||
@@ -13,7 +13,11 @@ _$CompanyListDtoImpl _$$CompanyListDtoImplFromJson(Map<String, dynamic> json) =>
|
||||
address: json['address'] as String,
|
||||
contactName: json['contact_name'] as String,
|
||||
contactPhone: json['contact_phone'] as String,
|
||||
contactEmail: json['contact_email'] as String?,
|
||||
isActive: json['is_active'] as bool,
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
branchCount: (json['branch_count'] as num?)?.toInt() ?? 0,
|
||||
);
|
||||
|
||||
@@ -25,7 +29,9 @@ Map<String, dynamic> _$$CompanyListDtoImplToJson(
|
||||
'address': instance.address,
|
||||
'contact_name': instance.contactName,
|
||||
'contact_phone': instance.contactPhone,
|
||||
'contact_email': instance.contactEmail,
|
||||
'is_active': instance.isActive,
|
||||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
'branch_count': instance.branchCount,
|
||||
};
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@ part 'expiring_license.g.dart';
|
||||
class ExpiringLicense with _$ExpiringLicense {
|
||||
const factory ExpiringLicense({
|
||||
required int id,
|
||||
@JsonKey(name: 'license_name') required String licenseName,
|
||||
@JsonKey(name: 'license_key') required String licenseKey,
|
||||
@JsonKey(name: 'software_name') required String softwareName,
|
||||
@JsonKey(name: 'company_name') required String companyName,
|
||||
@JsonKey(name: 'expiry_date') required DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required int daysRemaining,
|
||||
@JsonKey(name: 'license_type') required String licenseType,
|
||||
@JsonKey(name: 'days_until_expiry') required int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') required bool autoRenew,
|
||||
}) = _ExpiringLicense;
|
||||
|
||||
factory ExpiringLicense.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -21,16 +21,20 @@ ExpiringLicense _$ExpiringLicenseFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ExpiringLicense {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_name')
|
||||
String get licenseName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'software_name')
|
||||
String get softwareName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_name')
|
||||
String get companyName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime get expiryDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'days_remaining')
|
||||
int get daysRemaining => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_type')
|
||||
String get licenseType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
int get daysUntilExpiry => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
double get renewalCost => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'auto_renew')
|
||||
bool get autoRenew => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExpiringLicense to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -50,11 +54,13 @@ abstract class $ExpiringLicenseCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'license_name') String licenseName,
|
||||
@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'software_name') String softwareName,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'expiry_date') DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') int daysRemaining,
|
||||
@JsonKey(name: 'license_type') String licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') bool autoRenew});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -73,20 +79,26 @@ class _$ExpiringLicenseCopyWithImpl<$Res, $Val extends ExpiringLicense>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? licenseName = null,
|
||||
Object? licenseKey = null,
|
||||
Object? softwareName = null,
|
||||
Object? companyName = null,
|
||||
Object? expiryDate = null,
|
||||
Object? daysRemaining = null,
|
||||
Object? licenseType = null,
|
||||
Object? daysUntilExpiry = null,
|
||||
Object? renewalCost = null,
|
||||
Object? autoRenew = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseName: null == licenseName
|
||||
? _value.licenseName
|
||||
: licenseName // ignore: cast_nullable_to_non_nullable
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
softwareName: null == softwareName
|
||||
? _value.softwareName
|
||||
: softwareName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyName: null == companyName
|
||||
? _value.companyName
|
||||
@@ -96,14 +108,18 @@ class _$ExpiringLicenseCopyWithImpl<$Res, $Val extends ExpiringLicense>
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
daysRemaining: null == daysRemaining
|
||||
? _value.daysRemaining
|
||||
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
||||
daysUntilExpiry: null == daysUntilExpiry
|
||||
? _value.daysUntilExpiry
|
||||
: daysUntilExpiry // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseType: null == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
renewalCost: null == renewalCost
|
||||
? _value.renewalCost
|
||||
: renewalCost // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
autoRenew: null == autoRenew
|
||||
? _value.autoRenew
|
||||
: autoRenew // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -118,11 +134,13 @@ abstract class _$$ExpiringLicenseImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'license_name') String licenseName,
|
||||
@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'software_name') String softwareName,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'expiry_date') DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') int daysRemaining,
|
||||
@JsonKey(name: 'license_type') String licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') bool autoRenew});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -139,20 +157,26 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? licenseName = null,
|
||||
Object? licenseKey = null,
|
||||
Object? softwareName = null,
|
||||
Object? companyName = null,
|
||||
Object? expiryDate = null,
|
||||
Object? daysRemaining = null,
|
||||
Object? licenseType = null,
|
||||
Object? daysUntilExpiry = null,
|
||||
Object? renewalCost = null,
|
||||
Object? autoRenew = null,
|
||||
}) {
|
||||
return _then(_$ExpiringLicenseImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseName: null == licenseName
|
||||
? _value.licenseName
|
||||
: licenseName // ignore: cast_nullable_to_non_nullable
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
softwareName: null == softwareName
|
||||
? _value.softwareName
|
||||
: softwareName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyName: null == companyName
|
||||
? _value.companyName
|
||||
@@ -162,14 +186,18 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
daysRemaining: null == daysRemaining
|
||||
? _value.daysRemaining
|
||||
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
||||
daysUntilExpiry: null == daysUntilExpiry
|
||||
? _value.daysUntilExpiry
|
||||
: daysUntilExpiry // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseType: null == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
renewalCost: null == renewalCost
|
||||
? _value.renewalCost
|
||||
: renewalCost // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
autoRenew: null == autoRenew
|
||||
? _value.autoRenew
|
||||
: autoRenew // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -179,11 +207,13 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
const _$ExpiringLicenseImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'license_name') required this.licenseName,
|
||||
@JsonKey(name: 'license_key') required this.licenseKey,
|
||||
@JsonKey(name: 'software_name') required this.softwareName,
|
||||
@JsonKey(name: 'company_name') required this.companyName,
|
||||
@JsonKey(name: 'expiry_date') required this.expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required this.daysRemaining,
|
||||
@JsonKey(name: 'license_type') required this.licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') required this.daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required this.renewalCost,
|
||||
@JsonKey(name: 'auto_renew') required this.autoRenew});
|
||||
|
||||
factory _$ExpiringLicenseImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ExpiringLicenseImplFromJson(json);
|
||||
@@ -191,8 +221,11 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: 'license_name')
|
||||
final String licenseName;
|
||||
@JsonKey(name: 'license_key')
|
||||
final String licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'software_name')
|
||||
final String softwareName;
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
final String companyName;
|
||||
@@ -200,15 +233,18 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
@JsonKey(name: 'expiry_date')
|
||||
final DateTime expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'days_remaining')
|
||||
final int daysRemaining;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
final int daysUntilExpiry;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
final String licenseType;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
final double renewalCost;
|
||||
@override
|
||||
@JsonKey(name: 'auto_renew')
|
||||
final bool autoRenew;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ExpiringLicense(id: $id, licenseName: $licenseName, companyName: $companyName, expiryDate: $expiryDate, daysRemaining: $daysRemaining, licenseType: $licenseType)';
|
||||
return 'ExpiringLicense(id: $id, licenseKey: $licenseKey, softwareName: $softwareName, companyName: $companyName, expiryDate: $expiryDate, daysUntilExpiry: $daysUntilExpiry, renewalCost: $renewalCost, autoRenew: $autoRenew)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -217,22 +253,26 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ExpiringLicenseImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.licenseName, licenseName) ||
|
||||
other.licenseName == licenseName) &&
|
||||
(identical(other.licenseKey, licenseKey) ||
|
||||
other.licenseKey == licenseKey) &&
|
||||
(identical(other.softwareName, softwareName) ||
|
||||
other.softwareName == softwareName) &&
|
||||
(identical(other.companyName, companyName) ||
|
||||
other.companyName == companyName) &&
|
||||
(identical(other.expiryDate, expiryDate) ||
|
||||
other.expiryDate == expiryDate) &&
|
||||
(identical(other.daysRemaining, daysRemaining) ||
|
||||
other.daysRemaining == daysRemaining) &&
|
||||
(identical(other.licenseType, licenseType) ||
|
||||
other.licenseType == licenseType));
|
||||
(identical(other.daysUntilExpiry, daysUntilExpiry) ||
|
||||
other.daysUntilExpiry == daysUntilExpiry) &&
|
||||
(identical(other.renewalCost, renewalCost) ||
|
||||
other.renewalCost == renewalCost) &&
|
||||
(identical(other.autoRenew, autoRenew) ||
|
||||
other.autoRenew == autoRenew));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, licenseName, companyName,
|
||||
expiryDate, daysRemaining, licenseType);
|
||||
int get hashCode => Object.hash(runtimeType, id, licenseKey, softwareName,
|
||||
companyName, expiryDate, daysUntilExpiry, renewalCost, autoRenew);
|
||||
|
||||
/// Create a copy of ExpiringLicense
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -253,13 +293,15 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
|
||||
abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
const factory _ExpiringLicense(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'license_name') required final String licenseName,
|
||||
@JsonKey(name: 'company_name') required final String companyName,
|
||||
@JsonKey(name: 'expiry_date') required final DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required final int daysRemaining,
|
||||
@JsonKey(name: 'license_type') required final String licenseType}) =
|
||||
_$ExpiringLicenseImpl;
|
||||
{required final int id,
|
||||
@JsonKey(name: 'license_key') required final String licenseKey,
|
||||
@JsonKey(name: 'software_name') required final String softwareName,
|
||||
@JsonKey(name: 'company_name') required final String companyName,
|
||||
@JsonKey(name: 'expiry_date') required final DateTime expiryDate,
|
||||
@JsonKey(name: 'days_until_expiry') required final int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required final double renewalCost,
|
||||
@JsonKey(name: 'auto_renew')
|
||||
required final bool autoRenew}) = _$ExpiringLicenseImpl;
|
||||
|
||||
factory _ExpiringLicense.fromJson(Map<String, dynamic> json) =
|
||||
_$ExpiringLicenseImpl.fromJson;
|
||||
@@ -267,8 +309,11 @@ abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: 'license_name')
|
||||
String get licenseName;
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'software_name')
|
||||
String get softwareName;
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
String get companyName;
|
||||
@@ -276,11 +321,14 @@ abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime get expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'days_remaining')
|
||||
int get daysRemaining;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
int get daysUntilExpiry;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
String get licenseType;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
double get renewalCost;
|
||||
@override
|
||||
@JsonKey(name: 'auto_renew')
|
||||
bool get autoRenew;
|
||||
|
||||
/// Create a copy of ExpiringLicense
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
@@ -10,20 +10,24 @@ _$ExpiringLicenseImpl _$$ExpiringLicenseImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
licenseName: json['license_name'] as String,
|
||||
licenseKey: json['license_key'] as String,
|
||||
softwareName: json['software_name'] as String,
|
||||
companyName: json['company_name'] as String,
|
||||
expiryDate: DateTime.parse(json['expiry_date'] as String),
|
||||
daysRemaining: (json['days_remaining'] as num).toInt(),
|
||||
licenseType: json['license_type'] as String,
|
||||
daysUntilExpiry: (json['days_until_expiry'] as num).toInt(),
|
||||
renewalCost: (json['renewal_cost'] as num).toDouble(),
|
||||
autoRenew: json['auto_renew'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ExpiringLicenseImplToJson(
|
||||
_$ExpiringLicenseImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'license_name': instance.licenseName,
|
||||
'license_key': instance.licenseKey,
|
||||
'software_name': instance.softwareName,
|
||||
'company_name': instance.companyName,
|
||||
'expiry_date': instance.expiryDate.toIso8601String(),
|
||||
'days_remaining': instance.daysRemaining,
|
||||
'license_type': instance.licenseType,
|
||||
'days_until_expiry': instance.daysUntilExpiry,
|
||||
'renewal_cost': instance.renewalCost,
|
||||
'auto_renew': instance.autoRenew,
|
||||
};
|
||||
|
||||
@@ -6,16 +6,23 @@ part 'overview_stats.g.dart';
|
||||
@freezed
|
||||
class OverviewStats with _$OverviewStats {
|
||||
const factory OverviewStats({
|
||||
@JsonKey(name: 'total_companies') required int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required int activeCompanies,
|
||||
@JsonKey(name: 'total_users') required int totalUsers,
|
||||
@JsonKey(name: 'active_users') required int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') required int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') required int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required int totalCompanies,
|
||||
@JsonKey(name: 'total_users') required int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') required int activeRentals,
|
||||
@JsonKey(name: 'expiring_licenses_count') required int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') required int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') required int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') required int activeWarehouseLocations,
|
||||
// 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals,
|
||||
}) = _OverviewStats;
|
||||
|
||||
factory OverviewStats.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -20,6 +20,14 @@ OverviewStats _$OverviewStatsFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$OverviewStats {
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_companies')
|
||||
int get activeCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_users')
|
||||
int get activeUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_equipment')
|
||||
int get totalEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'available_equipment')
|
||||
@@ -28,18 +36,23 @@ mixin _$OverviewStats {
|
||||
int get inUseEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
int get maintenanceEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
int get totalLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_licenses')
|
||||
int get activeLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
int get expiringLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_rentals')
|
||||
int get totalRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_rentals')
|
||||
int get activeRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
int get expiringLicensesCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
int get expiredLicensesCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
int get totalWarehouseLocations => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
int get activeWarehouseLocations =>
|
||||
throw _privateConstructorUsedError; // 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
int? get totalRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
int? get activeRentals => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this OverviewStats to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -58,16 +71,22 @@ abstract class $OverviewStatsCopyWith<$Res> {
|
||||
_$OverviewStatsCopyWithImpl<$Res, OverviewStats>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') int activeCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'active_users') int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') int activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count') int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -85,18 +104,40 @@ class _$OverviewStatsCopyWithImpl<$Res, $Val extends OverviewStats>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalCompanies = null,
|
||||
Object? activeCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? activeUsers = null,
|
||||
Object? totalEquipment = null,
|
||||
Object? availableEquipment = null,
|
||||
Object? inUseEquipment = null,
|
||||
Object? maintenanceEquipment = null,
|
||||
Object? totalCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? totalLicenses = null,
|
||||
Object? activeLicenses = null,
|
||||
Object? expiringLicenses = null,
|
||||
Object? totalRentals = null,
|
||||
Object? activeRentals = null,
|
||||
Object? expiringLicensesCount = null,
|
||||
Object? expiredLicensesCount = null,
|
||||
Object? totalWarehouseLocations = null,
|
||||
Object? activeWarehouseLocations = null,
|
||||
Object? totalRentals = freezed,
|
||||
Object? activeRentals = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCompanies: null == activeCompanies
|
||||
? _value.activeCompanies
|
||||
: activeCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeUsers: null == activeUsers
|
||||
? _value.activeUsers
|
||||
: activeUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalEquipment: null == totalEquipment
|
||||
? _value.totalEquipment
|
||||
: totalEquipment // ignore: cast_nullable_to_non_nullable
|
||||
@@ -113,30 +154,38 @@ class _$OverviewStatsCopyWithImpl<$Res, $Val extends OverviewStats>
|
||||
? _value.maintenanceEquipment
|
||||
: maintenanceEquipment // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
totalLicenses: null == totalLicenses
|
||||
? _value.totalLicenses
|
||||
: totalLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeLicenses: null == activeLicenses
|
||||
? _value.activeLicenses
|
||||
: activeLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expiringLicenses: null == expiringLicenses
|
||||
? _value.expiringLicenses
|
||||
: expiringLicenses // ignore: cast_nullable_to_non_nullable
|
||||
expiringLicensesCount: null == expiringLicensesCount
|
||||
? _value.expiringLicensesCount
|
||||
: expiringLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: null == totalRentals
|
||||
expiredLicensesCount: null == expiredLicensesCount
|
||||
? _value.expiredLicensesCount
|
||||
: expiredLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWarehouseLocations: null == totalWarehouseLocations
|
||||
? _value.totalWarehouseLocations
|
||||
: totalWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeWarehouseLocations: null == activeWarehouseLocations
|
||||
? _value.activeWarehouseLocations
|
||||
: activeWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: freezed == totalRentals
|
||||
? _value.totalRentals
|
||||
: totalRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeRentals: null == activeRentals
|
||||
as int?,
|
||||
activeRentals: freezed == activeRentals
|
||||
? _value.activeRentals
|
||||
: activeRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -150,16 +199,22 @@ abstract class _$$OverviewStatsImplCopyWith<$Res>
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') int activeCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'active_users') int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') int activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count') int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -175,18 +230,40 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalCompanies = null,
|
||||
Object? activeCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? activeUsers = null,
|
||||
Object? totalEquipment = null,
|
||||
Object? availableEquipment = null,
|
||||
Object? inUseEquipment = null,
|
||||
Object? maintenanceEquipment = null,
|
||||
Object? totalCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? totalLicenses = null,
|
||||
Object? activeLicenses = null,
|
||||
Object? expiringLicenses = null,
|
||||
Object? totalRentals = null,
|
||||
Object? activeRentals = null,
|
||||
Object? expiringLicensesCount = null,
|
||||
Object? expiredLicensesCount = null,
|
||||
Object? totalWarehouseLocations = null,
|
||||
Object? activeWarehouseLocations = null,
|
||||
Object? totalRentals = freezed,
|
||||
Object? activeRentals = freezed,
|
||||
}) {
|
||||
return _then(_$OverviewStatsImpl(
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCompanies: null == activeCompanies
|
||||
? _value.activeCompanies
|
||||
: activeCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeUsers: null == activeUsers
|
||||
? _value.activeUsers
|
||||
: activeUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalEquipment: null == totalEquipment
|
||||
? _value.totalEquipment
|
||||
: totalEquipment // ignore: cast_nullable_to_non_nullable
|
||||
@@ -203,30 +280,38 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
? _value.maintenanceEquipment
|
||||
: maintenanceEquipment // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
totalLicenses: null == totalLicenses
|
||||
? _value.totalLicenses
|
||||
: totalLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeLicenses: null == activeLicenses
|
||||
? _value.activeLicenses
|
||||
: activeLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expiringLicenses: null == expiringLicenses
|
||||
? _value.expiringLicenses
|
||||
: expiringLicenses // ignore: cast_nullable_to_non_nullable
|
||||
expiringLicensesCount: null == expiringLicensesCount
|
||||
? _value.expiringLicensesCount
|
||||
: expiringLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: null == totalRentals
|
||||
expiredLicensesCount: null == expiredLicensesCount
|
||||
? _value.expiredLicensesCount
|
||||
: expiredLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWarehouseLocations: null == totalWarehouseLocations
|
||||
? _value.totalWarehouseLocations
|
||||
: totalWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeWarehouseLocations: null == activeWarehouseLocations
|
||||
? _value.activeWarehouseLocations
|
||||
: activeWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: freezed == totalRentals
|
||||
? _value.totalRentals
|
||||
: totalRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeRentals: null == activeRentals
|
||||
as int?,
|
||||
activeRentals: freezed == activeRentals
|
||||
? _value.activeRentals
|
||||
: activeRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -235,21 +320,43 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$OverviewStatsImpl implements _OverviewStats {
|
||||
const _$OverviewStatsImpl(
|
||||
{@JsonKey(name: 'total_equipment') required this.totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') required this.totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required this.activeCompanies,
|
||||
@JsonKey(name: 'total_users') required this.totalUsers,
|
||||
@JsonKey(name: 'active_users') required this.activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required this.totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') required this.availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required this.inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
required this.maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required this.totalCompanies,
|
||||
@JsonKey(name: 'total_users') required this.totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required this.totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required this.activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required this.expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required this.totalRentals,
|
||||
@JsonKey(name: 'active_rentals') required this.activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
required this.expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
required this.expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
required this.totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
required this.activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) this.totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) this.activeRentals});
|
||||
|
||||
factory _$OverviewStatsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$OverviewStatsImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
final int totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'active_companies')
|
||||
final int activeCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
final int totalUsers;
|
||||
@override
|
||||
@JsonKey(name: 'active_users')
|
||||
final int activeUsers;
|
||||
@override
|
||||
@JsonKey(name: 'total_equipment')
|
||||
final int totalEquipment;
|
||||
@@ -263,27 +370,34 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
final int maintenanceEquipment;
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
final int totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
final int totalUsers;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
final int totalLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'active_licenses')
|
||||
final int activeLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
final int expiringLicenses;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
final int expiringLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals')
|
||||
final int totalRentals;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
final int expiredLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals')
|
||||
final int activeRentals;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
final int totalWarehouseLocations;
|
||||
@override
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
final int activeWarehouseLocations;
|
||||
// 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
final int? totalRentals;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
final int? activeRentals;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OverviewStats(totalEquipment: $totalEquipment, availableEquipment: $availableEquipment, inUseEquipment: $inUseEquipment, maintenanceEquipment: $maintenanceEquipment, totalCompanies: $totalCompanies, totalUsers: $totalUsers, activeLicenses: $activeLicenses, expiringLicenses: $expiringLicenses, totalRentals: $totalRentals, activeRentals: $activeRentals)';
|
||||
return 'OverviewStats(totalCompanies: $totalCompanies, activeCompanies: $activeCompanies, totalUsers: $totalUsers, activeUsers: $activeUsers, totalEquipment: $totalEquipment, availableEquipment: $availableEquipment, inUseEquipment: $inUseEquipment, maintenanceEquipment: $maintenanceEquipment, totalLicenses: $totalLicenses, activeLicenses: $activeLicenses, expiringLicensesCount: $expiringLicensesCount, expiredLicensesCount: $expiredLicensesCount, totalWarehouseLocations: $totalWarehouseLocations, activeWarehouseLocations: $activeWarehouseLocations, totalRentals: $totalRentals, activeRentals: $activeRentals)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -291,6 +405,14 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$OverviewStatsImpl &&
|
||||
(identical(other.totalCompanies, totalCompanies) ||
|
||||
other.totalCompanies == totalCompanies) &&
|
||||
(identical(other.activeCompanies, activeCompanies) ||
|
||||
other.activeCompanies == activeCompanies) &&
|
||||
(identical(other.totalUsers, totalUsers) ||
|
||||
other.totalUsers == totalUsers) &&
|
||||
(identical(other.activeUsers, activeUsers) ||
|
||||
other.activeUsers == activeUsers) &&
|
||||
(identical(other.totalEquipment, totalEquipment) ||
|
||||
other.totalEquipment == totalEquipment) &&
|
||||
(identical(other.availableEquipment, availableEquipment) ||
|
||||
@@ -299,14 +421,20 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
other.inUseEquipment == inUseEquipment) &&
|
||||
(identical(other.maintenanceEquipment, maintenanceEquipment) ||
|
||||
other.maintenanceEquipment == maintenanceEquipment) &&
|
||||
(identical(other.totalCompanies, totalCompanies) ||
|
||||
other.totalCompanies == totalCompanies) &&
|
||||
(identical(other.totalUsers, totalUsers) ||
|
||||
other.totalUsers == totalUsers) &&
|
||||
(identical(other.totalLicenses, totalLicenses) ||
|
||||
other.totalLicenses == totalLicenses) &&
|
||||
(identical(other.activeLicenses, activeLicenses) ||
|
||||
other.activeLicenses == activeLicenses) &&
|
||||
(identical(other.expiringLicenses, expiringLicenses) ||
|
||||
other.expiringLicenses == expiringLicenses) &&
|
||||
(identical(other.expiringLicensesCount, expiringLicensesCount) ||
|
||||
other.expiringLicensesCount == expiringLicensesCount) &&
|
||||
(identical(other.expiredLicensesCount, expiredLicensesCount) ||
|
||||
other.expiredLicensesCount == expiredLicensesCount) &&
|
||||
(identical(
|
||||
other.totalWarehouseLocations, totalWarehouseLocations) ||
|
||||
other.totalWarehouseLocations == totalWarehouseLocations) &&
|
||||
(identical(
|
||||
other.activeWarehouseLocations, activeWarehouseLocations) ||
|
||||
other.activeWarehouseLocations == activeWarehouseLocations) &&
|
||||
(identical(other.totalRentals, totalRentals) ||
|
||||
other.totalRentals == totalRentals) &&
|
||||
(identical(other.activeRentals, activeRentals) ||
|
||||
@@ -317,14 +445,20 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalCompanies,
|
||||
activeCompanies,
|
||||
totalUsers,
|
||||
activeUsers,
|
||||
totalEquipment,
|
||||
availableEquipment,
|
||||
inUseEquipment,
|
||||
maintenanceEquipment,
|
||||
totalCompanies,
|
||||
totalUsers,
|
||||
totalLicenses,
|
||||
activeLicenses,
|
||||
expiringLicenses,
|
||||
expiringLicensesCount,
|
||||
expiredLicensesCount,
|
||||
totalWarehouseLocations,
|
||||
activeWarehouseLocations,
|
||||
totalRentals,
|
||||
activeRentals);
|
||||
|
||||
@@ -346,23 +480,45 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
|
||||
abstract class _OverviewStats implements OverviewStats {
|
||||
const factory _OverviewStats(
|
||||
{@JsonKey(name: 'total_equipment') required final int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') required final int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required final int activeCompanies,
|
||||
@JsonKey(name: 'total_users') required final int totalUsers,
|
||||
@JsonKey(name: 'active_users') required final int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required final int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment')
|
||||
required final int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required final int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
required final int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required final int totalCompanies,
|
||||
@JsonKey(name: 'total_users') required final int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required final int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required final int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required final int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required final int totalRentals,
|
||||
@JsonKey(name: 'active_rentals')
|
||||
required final int activeRentals}) = _$OverviewStatsImpl;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
required final int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
required final int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
required final int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
required final int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) final int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
final int? activeRentals}) = _$OverviewStatsImpl;
|
||||
|
||||
factory _OverviewStats.fromJson(Map<String, dynamic> json) =
|
||||
_$OverviewStatsImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'active_companies')
|
||||
int get activeCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers;
|
||||
@override
|
||||
@JsonKey(name: 'active_users')
|
||||
int get activeUsers;
|
||||
@override
|
||||
@JsonKey(name: 'total_equipment')
|
||||
int get totalEquipment;
|
||||
@@ -376,23 +532,29 @@ abstract class _OverviewStats implements OverviewStats {
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
int get maintenanceEquipment;
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
int get totalLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'active_licenses')
|
||||
int get activeLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
int get expiringLicenses;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
int get expiringLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals')
|
||||
int get totalRentals;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
int get expiredLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals')
|
||||
int get activeRentals;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
int get totalWarehouseLocations;
|
||||
@override
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
int get activeWarehouseLocations; // 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
int? get totalRentals;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
int? get activeRentals;
|
||||
|
||||
/// Create a copy of OverviewStats
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
@@ -8,28 +8,42 @@ part of 'overview_stats.dart';
|
||||
|
||||
_$OverviewStatsImpl _$$OverviewStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$OverviewStatsImpl(
|
||||
totalCompanies: (json['total_companies'] as num).toInt(),
|
||||
activeCompanies: (json['active_companies'] as num).toInt(),
|
||||
totalUsers: (json['total_users'] as num).toInt(),
|
||||
activeUsers: (json['active_users'] as num).toInt(),
|
||||
totalEquipment: (json['total_equipment'] as num).toInt(),
|
||||
availableEquipment: (json['available_equipment'] as num).toInt(),
|
||||
inUseEquipment: (json['in_use_equipment'] as num).toInt(),
|
||||
maintenanceEquipment: (json['maintenance_equipment'] as num).toInt(),
|
||||
totalCompanies: (json['total_companies'] as num).toInt(),
|
||||
totalUsers: (json['total_users'] as num).toInt(),
|
||||
totalLicenses: (json['total_licenses'] as num).toInt(),
|
||||
activeLicenses: (json['active_licenses'] as num).toInt(),
|
||||
expiringLicenses: (json['expiring_licenses'] as num).toInt(),
|
||||
totalRentals: (json['total_rentals'] as num).toInt(),
|
||||
activeRentals: (json['active_rentals'] as num).toInt(),
|
||||
expiringLicensesCount: (json['expiring_licenses_count'] as num).toInt(),
|
||||
expiredLicensesCount: (json['expired_licenses_count'] as num).toInt(),
|
||||
totalWarehouseLocations:
|
||||
(json['total_warehouse_locations'] as num).toInt(),
|
||||
activeWarehouseLocations:
|
||||
(json['active_warehouse_locations'] as num).toInt(),
|
||||
totalRentals: (json['total_rentals'] as num?)?.toInt() ?? 0,
|
||||
activeRentals: (json['active_rentals'] as num?)?.toInt() ?? 0,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$OverviewStatsImplToJson(_$OverviewStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'total_companies': instance.totalCompanies,
|
||||
'active_companies': instance.activeCompanies,
|
||||
'total_users': instance.totalUsers,
|
||||
'active_users': instance.activeUsers,
|
||||
'total_equipment': instance.totalEquipment,
|
||||
'available_equipment': instance.availableEquipment,
|
||||
'in_use_equipment': instance.inUseEquipment,
|
||||
'maintenance_equipment': instance.maintenanceEquipment,
|
||||
'total_companies': instance.totalCompanies,
|
||||
'total_users': instance.totalUsers,
|
||||
'total_licenses': instance.totalLicenses,
|
||||
'active_licenses': instance.activeLicenses,
|
||||
'expiring_licenses': instance.expiringLicenses,
|
||||
'expiring_licenses_count': instance.expiringLicensesCount,
|
||||
'expired_licenses_count': instance.expiredLicensesCount,
|
||||
'total_warehouse_locations': instance.totalWarehouseLocations,
|
||||
'active_warehouse_locations': instance.activeWarehouseLocations,
|
||||
'total_rentals': instance.totalRentals,
|
||||
'active_rentals': instance.activeRentals,
|
||||
};
|
||||
|
||||
@@ -8,9 +8,13 @@ class RecentActivity with _$RecentActivity {
|
||||
const factory RecentActivity({
|
||||
required int id,
|
||||
@JsonKey(name: 'activity_type') required String activityType,
|
||||
@JsonKey(name: 'entity_type') required String entityType,
|
||||
@JsonKey(name: 'entity_id') required int entityId,
|
||||
@JsonKey(name: 'entity_name') required String entityName,
|
||||
required String description,
|
||||
@JsonKey(name: 'user_name') required String userName,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
required DateTime timestamp,
|
||||
Map<String, dynamic>? metadata,
|
||||
}) = _RecentActivity;
|
||||
|
||||
|
||||
@@ -23,11 +23,18 @@ mixin _$RecentActivity {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'activity_type')
|
||||
String get activityType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_type')
|
||||
String get entityType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_id')
|
||||
int get entityId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_name')
|
||||
String get entityName => throw _privateConstructorUsedError;
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_id')
|
||||
int? get userId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_name')
|
||||
String get userName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
String? get userName => throw _privateConstructorUsedError;
|
||||
DateTime get timestamp => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecentActivity to a JSON map.
|
||||
@@ -49,9 +56,13 @@ abstract class $RecentActivityCopyWith<$Res> {
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'activity_type') String activityType,
|
||||
@JsonKey(name: 'entity_type') String entityType,
|
||||
@JsonKey(name: 'entity_id') int entityId,
|
||||
@JsonKey(name: 'entity_name') String entityName,
|
||||
String description,
|
||||
@JsonKey(name: 'user_name') String userName,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
DateTime timestamp,
|
||||
Map<String, dynamic>? metadata});
|
||||
}
|
||||
|
||||
@@ -72,9 +83,13 @@ class _$RecentActivityCopyWithImpl<$Res, $Val extends RecentActivity>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? activityType = null,
|
||||
Object? entityType = null,
|
||||
Object? entityId = null,
|
||||
Object? entityName = null,
|
||||
Object? description = null,
|
||||
Object? userName = null,
|
||||
Object? createdAt = null,
|
||||
Object? userId = freezed,
|
||||
Object? userName = freezed,
|
||||
Object? timestamp = null,
|
||||
Object? metadata = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -86,17 +101,33 @@ class _$RecentActivityCopyWithImpl<$Res, $Val extends RecentActivity>
|
||||
? _value.activityType
|
||||
: activityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityType: null == entityType
|
||||
? _value.entityType
|
||||
: entityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityId: null == entityId
|
||||
? _value.entityId
|
||||
: entityId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
entityName: null == entityName
|
||||
? _value.entityName
|
||||
: entityName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userName: null == userName
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
userName: freezed == userName
|
||||
? _value.userName
|
||||
: userName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
timestamp: null == timestamp
|
||||
? _value.timestamp
|
||||
: timestamp // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: freezed == metadata
|
||||
? _value.metadata
|
||||
@@ -117,9 +148,13 @@ abstract class _$$RecentActivityImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'activity_type') String activityType,
|
||||
@JsonKey(name: 'entity_type') String entityType,
|
||||
@JsonKey(name: 'entity_id') int entityId,
|
||||
@JsonKey(name: 'entity_name') String entityName,
|
||||
String description,
|
||||
@JsonKey(name: 'user_name') String userName,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
DateTime timestamp,
|
||||
Map<String, dynamic>? metadata});
|
||||
}
|
||||
|
||||
@@ -138,9 +173,13 @@ class __$$RecentActivityImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? activityType = null,
|
||||
Object? entityType = null,
|
||||
Object? entityId = null,
|
||||
Object? entityName = null,
|
||||
Object? description = null,
|
||||
Object? userName = null,
|
||||
Object? createdAt = null,
|
||||
Object? userId = freezed,
|
||||
Object? userName = freezed,
|
||||
Object? timestamp = null,
|
||||
Object? metadata = freezed,
|
||||
}) {
|
||||
return _then(_$RecentActivityImpl(
|
||||
@@ -152,17 +191,33 @@ class __$$RecentActivityImplCopyWithImpl<$Res>
|
||||
? _value.activityType
|
||||
: activityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityType: null == entityType
|
||||
? _value.entityType
|
||||
: entityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityId: null == entityId
|
||||
? _value.entityId
|
||||
: entityId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
entityName: null == entityName
|
||||
? _value.entityName
|
||||
: entityName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userName: null == userName
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
userName: freezed == userName
|
||||
? _value.userName
|
||||
: userName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
timestamp: null == timestamp
|
||||
? _value.timestamp
|
||||
: timestamp // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: freezed == metadata
|
||||
? _value._metadata
|
||||
@@ -178,9 +233,13 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
const _$RecentActivityImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'activity_type') required this.activityType,
|
||||
@JsonKey(name: 'entity_type') required this.entityType,
|
||||
@JsonKey(name: 'entity_id') required this.entityId,
|
||||
@JsonKey(name: 'entity_name') required this.entityName,
|
||||
required this.description,
|
||||
@JsonKey(name: 'user_name') required this.userName,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'user_id') this.userId,
|
||||
@JsonKey(name: 'user_name') this.userName,
|
||||
required this.timestamp,
|
||||
final Map<String, dynamic>? metadata})
|
||||
: _metadata = metadata;
|
||||
|
||||
@@ -193,13 +252,24 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
@JsonKey(name: 'activity_type')
|
||||
final String activityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_type')
|
||||
final String entityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_id')
|
||||
final int entityId;
|
||||
@override
|
||||
@JsonKey(name: 'entity_name')
|
||||
final String entityName;
|
||||
@override
|
||||
final String description;
|
||||
@override
|
||||
@JsonKey(name: 'user_name')
|
||||
final String userName;
|
||||
@JsonKey(name: 'user_id')
|
||||
final int? userId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
@JsonKey(name: 'user_name')
|
||||
final String? userName;
|
||||
@override
|
||||
final DateTime timestamp;
|
||||
final Map<String, dynamic>? _metadata;
|
||||
@override
|
||||
Map<String, dynamic>? get metadata {
|
||||
@@ -212,7 +282,7 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecentActivity(id: $id, activityType: $activityType, description: $description, userName: $userName, createdAt: $createdAt, metadata: $metadata)';
|
||||
return 'RecentActivity(id: $id, activityType: $activityType, entityType: $entityType, entityId: $entityId, entityName: $entityName, description: $description, userId: $userId, userName: $userName, timestamp: $timestamp, metadata: $metadata)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -223,19 +293,36 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.activityType, activityType) ||
|
||||
other.activityType == activityType) &&
|
||||
(identical(other.entityType, entityType) ||
|
||||
other.entityType == entityType) &&
|
||||
(identical(other.entityId, entityId) ||
|
||||
other.entityId == entityId) &&
|
||||
(identical(other.entityName, entityName) ||
|
||||
other.entityName == entityName) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.userId, userId) || other.userId == userId) &&
|
||||
(identical(other.userName, userName) ||
|
||||
other.userName == userName) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.timestamp, timestamp) ||
|
||||
other.timestamp == timestamp) &&
|
||||
const DeepCollectionEquality().equals(other._metadata, _metadata));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, activityType, description,
|
||||
userName, createdAt, const DeepCollectionEquality().hash(_metadata));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
activityType,
|
||||
entityType,
|
||||
entityId,
|
||||
entityName,
|
||||
description,
|
||||
userId,
|
||||
userName,
|
||||
timestamp,
|
||||
const DeepCollectionEquality().hash(_metadata));
|
||||
|
||||
/// Create a copy of RecentActivity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -258,9 +345,13 @@ abstract class _RecentActivity implements RecentActivity {
|
||||
const factory _RecentActivity(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'activity_type') required final String activityType,
|
||||
@JsonKey(name: 'entity_type') required final String entityType,
|
||||
@JsonKey(name: 'entity_id') required final int entityId,
|
||||
@JsonKey(name: 'entity_name') required final String entityName,
|
||||
required final String description,
|
||||
@JsonKey(name: 'user_name') required final String userName,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') final int? userId,
|
||||
@JsonKey(name: 'user_name') final String? userName,
|
||||
required final DateTime timestamp,
|
||||
final Map<String, dynamic>? metadata}) = _$RecentActivityImpl;
|
||||
|
||||
factory _RecentActivity.fromJson(Map<String, dynamic> json) =
|
||||
@@ -272,13 +363,24 @@ abstract class _RecentActivity implements RecentActivity {
|
||||
@JsonKey(name: 'activity_type')
|
||||
String get activityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_type')
|
||||
String get entityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_id')
|
||||
int get entityId;
|
||||
@override
|
||||
@JsonKey(name: 'entity_name')
|
||||
String get entityName;
|
||||
@override
|
||||
String get description;
|
||||
@override
|
||||
@JsonKey(name: 'user_name')
|
||||
String get userName;
|
||||
@JsonKey(name: 'user_id')
|
||||
int? get userId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
@JsonKey(name: 'user_name')
|
||||
String? get userName;
|
||||
@override
|
||||
DateTime get timestamp;
|
||||
@override
|
||||
Map<String, dynamic>? get metadata;
|
||||
|
||||
|
||||
@@ -10,9 +10,13 @@ _$RecentActivityImpl _$$RecentActivityImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecentActivityImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
activityType: json['activity_type'] as String,
|
||||
entityType: json['entity_type'] as String,
|
||||
entityId: (json['entity_id'] as num).toInt(),
|
||||
entityName: json['entity_name'] as String,
|
||||
description: json['description'] as String,
|
||||
userName: json['user_name'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
userId: (json['user_id'] as num?)?.toInt(),
|
||||
userName: json['user_name'] as String?,
|
||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
);
|
||||
|
||||
@@ -21,8 +25,12 @@ Map<String, dynamic> _$$RecentActivityImplToJson(
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'activity_type': instance.activityType,
|
||||
'entity_type': instance.entityType,
|
||||
'entity_id': instance.entityId,
|
||||
'entity_name': instance.entityName,
|
||||
'description': instance.description,
|
||||
'user_id': instance.userId,
|
||||
'user_name': instance.userName,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'timestamp': instance.timestamp.toIso8601String(),
|
||||
'metadata': instance.metadata,
|
||||
};
|
||||
|
||||
@@ -7,19 +7,19 @@ part 'equipment_list_dto.g.dart';
|
||||
class EquipmentListDto with _$EquipmentListDto {
|
||||
const factory EquipmentListDto({
|
||||
required int id,
|
||||
required String equipmentNumber,
|
||||
@JsonKey(name: 'equipment_number') required String equipmentNumber,
|
||||
required String manufacturer,
|
||||
String? modelName,
|
||||
String? serialNumber,
|
||||
@JsonKey(name: 'model_name') String? modelName,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
required String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
required DateTime createdAt,
|
||||
@JsonKey(name: 'current_company_id') int? currentCompanyId,
|
||||
@JsonKey(name: 'current_branch_id') int? currentBranchId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
// 추가 필드 (조인된 데이터)
|
||||
String? companyName,
|
||||
String? branchName,
|
||||
String? warehouseName,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName,
|
||||
}) = _EquipmentListDto;
|
||||
|
||||
factory EquipmentListDto.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -21,18 +21,28 @@ EquipmentListDto _$EquipmentListDtoFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$EquipmentListDto {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String get equipmentNumber => throw _privateConstructorUsedError;
|
||||
String get manufacturer => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'model_name')
|
||||
String? get modelName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber => throw _privateConstructorUsedError;
|
||||
String get status => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'current_company_id')
|
||||
int? get currentCompanyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'current_branch_id')
|
||||
int? get currentBranchId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt =>
|
||||
throw _privateConstructorUsedError; // 추가 필드 (조인된 데이터)
|
||||
@JsonKey(name: 'company_name')
|
||||
String? get companyName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'branch_name')
|
||||
String? get branchName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
String? get warehouseName => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this EquipmentListDto to a JSON map.
|
||||
@@ -53,18 +63,18 @@ abstract class $EquipmentListDtoCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String equipmentNumber,
|
||||
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
String manufacturer,
|
||||
String? modelName,
|
||||
String? serialNumber,
|
||||
@JsonKey(name: 'model_name') String? modelName,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
DateTime createdAt,
|
||||
String? companyName,
|
||||
String? branchName,
|
||||
String? warehouseName});
|
||||
@JsonKey(name: 'current_company_id') int? currentCompanyId,
|
||||
@JsonKey(name: 'current_branch_id') int? currentBranchId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -163,18 +173,18 @@ abstract class _$$EquipmentListDtoImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String equipmentNumber,
|
||||
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
||||
String manufacturer,
|
||||
String? modelName,
|
||||
String? serialNumber,
|
||||
@JsonKey(name: 'model_name') String? modelName,
|
||||
@JsonKey(name: 'serial_number') String? serialNumber,
|
||||
String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
DateTime createdAt,
|
||||
String? companyName,
|
||||
String? branchName,
|
||||
String? warehouseName});
|
||||
@JsonKey(name: 'current_company_id') int? currentCompanyId,
|
||||
@JsonKey(name: 'current_branch_id') int? currentBranchId,
|
||||
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'warehouse_name') String? warehouseName});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -266,18 +276,18 @@ class __$$EquipmentListDtoImplCopyWithImpl<$Res>
|
||||
class _$EquipmentListDtoImpl implements _EquipmentListDto {
|
||||
const _$EquipmentListDtoImpl(
|
||||
{required this.id,
|
||||
required this.equipmentNumber,
|
||||
@JsonKey(name: 'equipment_number') required this.equipmentNumber,
|
||||
required this.manufacturer,
|
||||
this.modelName,
|
||||
this.serialNumber,
|
||||
@JsonKey(name: 'model_name') this.modelName,
|
||||
@JsonKey(name: 'serial_number') this.serialNumber,
|
||||
required this.status,
|
||||
this.currentCompanyId,
|
||||
this.currentBranchId,
|
||||
this.warehouseLocationId,
|
||||
required this.createdAt,
|
||||
this.companyName,
|
||||
this.branchName,
|
||||
this.warehouseName});
|
||||
@JsonKey(name: 'current_company_id') this.currentCompanyId,
|
||||
@JsonKey(name: 'current_branch_id') this.currentBranchId,
|
||||
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'company_name') this.companyName,
|
||||
@JsonKey(name: 'branch_name') this.branchName,
|
||||
@JsonKey(name: 'warehouse_name') this.warehouseName});
|
||||
|
||||
factory _$EquipmentListDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$EquipmentListDtoImplFromJson(json);
|
||||
@@ -285,29 +295,39 @@ class _$EquipmentListDtoImpl implements _EquipmentListDto {
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
final String equipmentNumber;
|
||||
@override
|
||||
final String manufacturer;
|
||||
@override
|
||||
@JsonKey(name: 'model_name')
|
||||
final String? modelName;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
final String? serialNumber;
|
||||
@override
|
||||
final String status;
|
||||
@override
|
||||
@JsonKey(name: 'current_company_id')
|
||||
final int? currentCompanyId;
|
||||
@override
|
||||
@JsonKey(name: 'current_branch_id')
|
||||
final int? currentBranchId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
final int? warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
// 추가 필드 (조인된 데이터)
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
final String? companyName;
|
||||
@override
|
||||
@JsonKey(name: 'branch_name')
|
||||
final String? branchName;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
final String? warehouseName;
|
||||
|
||||
@override
|
||||
@@ -384,17 +404,18 @@ class _$EquipmentListDtoImpl implements _EquipmentListDto {
|
||||
abstract class _EquipmentListDto implements EquipmentListDto {
|
||||
const factory _EquipmentListDto(
|
||||
{required final int id,
|
||||
required final String equipmentNumber,
|
||||
@JsonKey(name: 'equipment_number') required final String equipmentNumber,
|
||||
required final String manufacturer,
|
||||
final String? modelName,
|
||||
final String? serialNumber,
|
||||
@JsonKey(name: 'model_name') final String? modelName,
|
||||
@JsonKey(name: 'serial_number') final String? serialNumber,
|
||||
required final String status,
|
||||
final int? currentCompanyId,
|
||||
final int? currentBranchId,
|
||||
final int? warehouseLocationId,
|
||||
required final DateTime createdAt,
|
||||
final String? companyName,
|
||||
final String? branchName,
|
||||
@JsonKey(name: 'current_company_id') final int? currentCompanyId,
|
||||
@JsonKey(name: 'current_branch_id') final int? currentBranchId,
|
||||
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'company_name') final String? companyName,
|
||||
@JsonKey(name: 'branch_name') final String? branchName,
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
final String? warehouseName}) = _$EquipmentListDtoImpl;
|
||||
|
||||
factory _EquipmentListDto.fromJson(Map<String, dynamic> json) =
|
||||
@@ -403,28 +424,38 @@ abstract class _EquipmentListDto implements EquipmentListDto {
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_number')
|
||||
String get equipmentNumber;
|
||||
@override
|
||||
String get manufacturer;
|
||||
@override
|
||||
@JsonKey(name: 'model_name')
|
||||
String? get modelName;
|
||||
@override
|
||||
@JsonKey(name: 'serial_number')
|
||||
String? get serialNumber;
|
||||
@override
|
||||
String get status;
|
||||
@override
|
||||
@JsonKey(name: 'current_company_id')
|
||||
int? get currentCompanyId;
|
||||
@override
|
||||
@JsonKey(name: 'current_branch_id')
|
||||
int? get currentBranchId;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_location_id')
|
||||
int? get warehouseLocationId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt; // 추가 필드 (조인된 데이터)
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
String? get companyName;
|
||||
@override
|
||||
@JsonKey(name: 'branch_name')
|
||||
String? get branchName;
|
||||
@override
|
||||
@JsonKey(name: 'warehouse_name')
|
||||
String? get warehouseName;
|
||||
|
||||
/// Create a copy of EquipmentListDto
|
||||
|
||||
@@ -10,34 +10,34 @@ _$EquipmentListDtoImpl _$$EquipmentListDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentListDtoImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
equipmentNumber: json['equipmentNumber'] as String,
|
||||
equipmentNumber: json['equipment_number'] as String,
|
||||
manufacturer: json['manufacturer'] as String,
|
||||
modelName: json['modelName'] as String?,
|
||||
serialNumber: json['serialNumber'] as String?,
|
||||
modelName: json['model_name'] as String?,
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
status: json['status'] as String,
|
||||
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
|
||||
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
|
||||
createdAt: DateTime.parse(json['createdAt'] as String),
|
||||
companyName: json['companyName'] as String?,
|
||||
branchName: json['branchName'] as String?,
|
||||
warehouseName: json['warehouseName'] as String?,
|
||||
currentCompanyId: (json['current_company_id'] as num?)?.toInt(),
|
||||
currentBranchId: (json['current_branch_id'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
companyName: json['company_name'] as String?,
|
||||
branchName: json['branch_name'] as String?,
|
||||
warehouseName: json['warehouse_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentListDtoImplToJson(
|
||||
_$EquipmentListDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'equipmentNumber': instance.equipmentNumber,
|
||||
'equipment_number': instance.equipmentNumber,
|
||||
'manufacturer': instance.manufacturer,
|
||||
'modelName': instance.modelName,
|
||||
'serialNumber': instance.serialNumber,
|
||||
'model_name': instance.modelName,
|
||||
'serial_number': instance.serialNumber,
|
||||
'status': instance.status,
|
||||
'currentCompanyId': instance.currentCompanyId,
|
||||
'currentBranchId': instance.currentBranchId,
|
||||
'warehouseLocationId': instance.warehouseLocationId,
|
||||
'createdAt': instance.createdAt.toIso8601String(),
|
||||
'companyName': instance.companyName,
|
||||
'branchName': instance.branchName,
|
||||
'warehouseName': instance.warehouseName,
|
||||
'current_company_id': instance.currentCompanyId,
|
||||
'current_branch_id': instance.currentBranchId,
|
||||
'warehouse_location_id': instance.warehouseLocationId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'company_name': instance.companyName,
|
||||
'branch_name': instance.branchName,
|
||||
'warehouse_name': instance.warehouseName,
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:superport/core/utils/equipment_status_converter.dart';
|
||||
|
||||
part 'equipment_request.freezed.dart';
|
||||
part 'equipment_request.g.dart';
|
||||
@@ -34,7 +35,7 @@ class UpdateEquipmentRequest with _$UpdateEquipmentRequest {
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
String? status,
|
||||
@EquipmentStatusJsonConverter() String? status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
|
||||
@@ -389,6 +389,7 @@ mixin _$UpdateEquipmentRequest {
|
||||
String? get barcode => throw _privateConstructorUsedError;
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@EquipmentStatusJsonConverter()
|
||||
String? get status => throw _privateConstructorUsedError;
|
||||
int? get currentCompanyId => throw _privateConstructorUsedError;
|
||||
int? get currentBranchId => throw _privateConstructorUsedError;
|
||||
@@ -423,7 +424,7 @@ abstract class $UpdateEquipmentRequestCopyWith<$Res> {
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
String? status,
|
||||
@EquipmentStatusJsonConverter() String? status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
@@ -553,7 +554,7 @@ abstract class _$$UpdateEquipmentRequestImplCopyWith<$Res>
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
String? status,
|
||||
@EquipmentStatusJsonConverter() String? status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
@@ -676,7 +677,7 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
|
||||
this.barcode,
|
||||
this.purchaseDate,
|
||||
this.purchasePrice,
|
||||
this.status,
|
||||
@EquipmentStatusJsonConverter() this.status,
|
||||
this.currentCompanyId,
|
||||
this.currentBranchId,
|
||||
this.warehouseLocationId,
|
||||
@@ -706,6 +707,7 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
|
||||
@override
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
final String? status;
|
||||
@override
|
||||
final int? currentCompanyId;
|
||||
@@ -810,7 +812,7 @@ abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
|
||||
final String? barcode,
|
||||
final DateTime? purchaseDate,
|
||||
final double? purchasePrice,
|
||||
final String? status,
|
||||
@EquipmentStatusJsonConverter() final String? status,
|
||||
final int? currentCompanyId,
|
||||
final int? currentBranchId,
|
||||
final int? warehouseLocationId,
|
||||
@@ -840,6 +842,7 @@ abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
|
||||
@override
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
String? get status;
|
||||
@override
|
||||
int? get currentCompanyId;
|
||||
|
||||
@@ -52,7 +52,8 @@ _$UpdateEquipmentRequestImpl _$$UpdateEquipmentRequestImplFromJson(
|
||||
? null
|
||||
: DateTime.parse(json['purchaseDate'] as String),
|
||||
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
|
||||
status: json['status'] as String?,
|
||||
status: _$JsonConverterFromJson<String, String>(
|
||||
json['status'], const EquipmentStatusJsonConverter().fromJson),
|
||||
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
|
||||
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
|
||||
@@ -77,7 +78,8 @@ Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
|
||||
'barcode': instance.barcode,
|
||||
'purchaseDate': instance.purchaseDate?.toIso8601String(),
|
||||
'purchasePrice': instance.purchasePrice,
|
||||
'status': instance.status,
|
||||
'status': _$JsonConverterToJson<String, String>(
|
||||
instance.status, const EquipmentStatusJsonConverter().toJson),
|
||||
'currentCompanyId': instance.currentCompanyId,
|
||||
'currentBranchId': instance.currentBranchId,
|
||||
'warehouseLocationId': instance.warehouseLocationId,
|
||||
@@ -85,3 +87,15 @@ Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
|
||||
'nextInspectionDate': instance.nextInspectionDate?.toIso8601String(),
|
||||
'remark': instance.remark,
|
||||
};
|
||||
|
||||
Value? _$JsonConverterFromJson<Json, Value>(
|
||||
Object? json,
|
||||
Value? Function(Json json) fromJson,
|
||||
) =>
|
||||
json == null ? null : fromJson(json as Json);
|
||||
|
||||
Json? _$JsonConverterToJson<Json, Value>(
|
||||
Value? value,
|
||||
Json? Function(Value value) toJson,
|
||||
) =>
|
||||
value == null ? null : toJson(value);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:superport/core/utils/equipment_status_converter.dart';
|
||||
|
||||
part 'equipment_response.freezed.dart';
|
||||
part 'equipment_response.g.dart';
|
||||
@@ -17,7 +18,7 @@ class EquipmentResponse with _$EquipmentResponse {
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
required String status,
|
||||
@EquipmentStatusJsonConverter() required String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
|
||||
@@ -31,6 +31,7 @@ mixin _$EquipmentResponse {
|
||||
String? get barcode => throw _privateConstructorUsedError;
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@EquipmentStatusJsonConverter()
|
||||
String get status => throw _privateConstructorUsedError;
|
||||
int? get currentCompanyId => throw _privateConstructorUsedError;
|
||||
int? get currentBranchId => throw _privateConstructorUsedError;
|
||||
@@ -73,7 +74,7 @@ abstract class $EquipmentResponseCopyWith<$Res> {
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
String status,
|
||||
@EquipmentStatusJsonConverter() String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
@@ -243,7 +244,7 @@ abstract class _$$EquipmentResponseImplCopyWith<$Res>
|
||||
String? barcode,
|
||||
DateTime? purchaseDate,
|
||||
double? purchasePrice,
|
||||
String status,
|
||||
@EquipmentStatusJsonConverter() String status,
|
||||
int? currentCompanyId,
|
||||
int? currentBranchId,
|
||||
int? warehouseLocationId,
|
||||
@@ -406,7 +407,7 @@ class _$EquipmentResponseImpl implements _EquipmentResponse {
|
||||
this.barcode,
|
||||
this.purchaseDate,
|
||||
this.purchasePrice,
|
||||
required this.status,
|
||||
@EquipmentStatusJsonConverter() required this.status,
|
||||
this.currentCompanyId,
|
||||
this.currentBranchId,
|
||||
this.warehouseLocationId,
|
||||
@@ -445,6 +446,7 @@ class _$EquipmentResponseImpl implements _EquipmentResponse {
|
||||
@override
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
final String status;
|
||||
@override
|
||||
final int? currentCompanyId;
|
||||
@@ -583,7 +585,7 @@ abstract class _EquipmentResponse implements EquipmentResponse {
|
||||
final String? barcode,
|
||||
final DateTime? purchaseDate,
|
||||
final double? purchasePrice,
|
||||
required final String status,
|
||||
@EquipmentStatusJsonConverter() required final String status,
|
||||
final int? currentCompanyId,
|
||||
final int? currentBranchId,
|
||||
final int? warehouseLocationId,
|
||||
@@ -622,6 +624,7 @@ abstract class _EquipmentResponse implements EquipmentResponse {
|
||||
@override
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
@EquipmentStatusJsonConverter()
|
||||
String get status;
|
||||
@override
|
||||
int? get currentCompanyId;
|
||||
|
||||
@@ -22,7 +22,8 @@ _$EquipmentResponseImpl _$$EquipmentResponseImplFromJson(
|
||||
? null
|
||||
: DateTime.parse(json['purchaseDate'] as String),
|
||||
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
|
||||
status: json['status'] as String,
|
||||
status: const EquipmentStatusJsonConverter()
|
||||
.fromJson(json['status'] as String),
|
||||
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
|
||||
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
|
||||
@@ -54,7 +55,7 @@ Map<String, dynamic> _$$EquipmentResponseImplToJson(
|
||||
'barcode': instance.barcode,
|
||||
'purchaseDate': instance.purchaseDate?.toIso8601String(),
|
||||
'purchasePrice': instance.purchasePrice,
|
||||
'status': instance.status,
|
||||
'status': const EquipmentStatusJsonConverter().toJson(instance.status),
|
||||
'currentCompanyId': instance.currentCompanyId,
|
||||
'currentBranchId': instance.currentBranchId,
|
||||
'warehouseLocationId': instance.warehouseLocationId,
|
||||
|
||||
@@ -46,18 +46,20 @@ class WarehouseLocationDto with _$WarehouseLocationDto {
|
||||
const factory WarehouseLocationDto({
|
||||
required int id,
|
||||
required String name,
|
||||
String? code,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
// API에 없는 필드들은 nullable로 변경
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required DateTime updatedAt,
|
||||
// 추가 정보
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'current_stock') int? currentStock,
|
||||
@JsonKey(name: 'available_capacity') int? availableCapacity,
|
||||
}) = _WarehouseLocationDto;
|
||||
|
||||
@@ -680,23 +680,27 @@ WarehouseLocationDto _$WarehouseLocationDtoFromJson(Map<String, dynamic> json) {
|
||||
mixin _$WarehouseLocationDto {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
String? get code => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'manager_name')
|
||||
String? get managerName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'manager_phone')
|
||||
String? get managerPhone => throw _privateConstructorUsedError;
|
||||
int? get capacity => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_active')
|
||||
bool get isActive => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt =>
|
||||
throw _privateConstructorUsedError; // API에 없는 필드들은 nullable로 변경
|
||||
String? get address => throw _privateConstructorUsedError;
|
||||
String? get city => throw _privateConstructorUsedError;
|
||||
String? get state => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'postal_code')
|
||||
String? get postalCode => throw _privateConstructorUsedError;
|
||||
String? get country => throw _privateConstructorUsedError;
|
||||
int? get capacity => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'manager_id')
|
||||
int? get managerId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'manager_name')
|
||||
String? get managerName => throw _privateConstructorUsedError;
|
||||
@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; // 추가 정보
|
||||
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'current_stock')
|
||||
int? get currentStock => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'available_capacity')
|
||||
@@ -721,17 +725,19 @@ abstract class $WarehouseLocationDtoCopyWith<$Res> {
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
String? code,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'current_stock') int? currentStock,
|
||||
@JsonKey(name: 'available_capacity') int? availableCapacity});
|
||||
}
|
||||
@@ -754,17 +760,19 @@ class _$WarehouseLocationDtoCopyWithImpl<$Res,
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? name = null,
|
||||
Object? code = freezed,
|
||||
Object? managerName = freezed,
|
||||
Object? managerPhone = freezed,
|
||||
Object? capacity = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? address = freezed,
|
||||
Object? city = freezed,
|
||||
Object? state = freezed,
|
||||
Object? postalCode = freezed,
|
||||
Object? country = freezed,
|
||||
Object? capacity = freezed,
|
||||
Object? managerId = freezed,
|
||||
Object? managerName = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? currentStock = freezed,
|
||||
Object? availableCapacity = freezed,
|
||||
}) {
|
||||
@@ -777,6 +785,30 @@ class _$WarehouseLocationDtoCopyWithImpl<$Res,
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
code: freezed == code
|
||||
? _value.code
|
||||
: code // 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?,
|
||||
capacity: freezed == capacity
|
||||
? _value.capacity
|
||||
: capacity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
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,
|
||||
address: freezed == address
|
||||
? _value.address
|
||||
: address // ignore: cast_nullable_to_non_nullable
|
||||
@@ -797,30 +829,14 @@ class _$WarehouseLocationDtoCopyWithImpl<$Res,
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
capacity: freezed == capacity
|
||||
? _value.capacity
|
||||
: capacity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
managerId: freezed == managerId
|
||||
? _value.managerId
|
||||
: managerId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
managerName: freezed == managerName
|
||||
? _value.managerName
|
||||
: managerName // 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: null == updatedAt
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
currentStock: freezed == currentStock
|
||||
? _value.currentStock
|
||||
: currentStock // ignore: cast_nullable_to_non_nullable
|
||||
@@ -844,17 +860,19 @@ abstract class _$$WarehouseLocationDtoImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
String? code,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'current_stock') int? currentStock,
|
||||
@JsonKey(name: 'available_capacity') int? availableCapacity});
|
||||
}
|
||||
@@ -874,17 +892,19 @@ class __$$WarehouseLocationDtoImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? name = null,
|
||||
Object? code = freezed,
|
||||
Object? managerName = freezed,
|
||||
Object? managerPhone = freezed,
|
||||
Object? capacity = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? address = freezed,
|
||||
Object? city = freezed,
|
||||
Object? state = freezed,
|
||||
Object? postalCode = freezed,
|
||||
Object? country = freezed,
|
||||
Object? capacity = freezed,
|
||||
Object? managerId = freezed,
|
||||
Object? managerName = freezed,
|
||||
Object? isActive = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? currentStock = freezed,
|
||||
Object? availableCapacity = freezed,
|
||||
}) {
|
||||
@@ -897,6 +917,30 @@ class __$$WarehouseLocationDtoImplCopyWithImpl<$Res>
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
code: freezed == code
|
||||
? _value.code
|
||||
: code // 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?,
|
||||
capacity: freezed == capacity
|
||||
? _value.capacity
|
||||
: capacity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
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,
|
||||
address: freezed == address
|
||||
? _value.address
|
||||
: address // ignore: cast_nullable_to_non_nullable
|
||||
@@ -917,30 +961,14 @@ class __$$WarehouseLocationDtoImplCopyWithImpl<$Res>
|
||||
? _value.country
|
||||
: country // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
capacity: freezed == capacity
|
||||
? _value.capacity
|
||||
: capacity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
managerId: freezed == managerId
|
||||
? _value.managerId
|
||||
: managerId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
managerName: freezed == managerName
|
||||
? _value.managerName
|
||||
: managerName // 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: null == updatedAt
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
as DateTime?,
|
||||
currentStock: freezed == currentStock
|
||||
? _value.currentStock
|
||||
: currentStock // ignore: cast_nullable_to_non_nullable
|
||||
@@ -959,17 +987,19 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
const _$WarehouseLocationDtoImpl(
|
||||
{required this.id,
|
||||
required this.name,
|
||||
this.code,
|
||||
@JsonKey(name: 'manager_name') this.managerName,
|
||||
@JsonKey(name: 'manager_phone') this.managerPhone,
|
||||
this.capacity,
|
||||
@JsonKey(name: 'is_active') required this.isActive,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
this.address,
|
||||
this.city,
|
||||
this.state,
|
||||
@JsonKey(name: 'postal_code') this.postalCode,
|
||||
this.country,
|
||||
this.capacity,
|
||||
@JsonKey(name: 'manager_id') this.managerId,
|
||||
@JsonKey(name: 'manager_name') this.managerName,
|
||||
@JsonKey(name: 'is_active') required this.isActive,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt,
|
||||
@JsonKey(name: 'updated_at') this.updatedAt,
|
||||
@JsonKey(name: 'current_stock') this.currentStock,
|
||||
@JsonKey(name: 'available_capacity') this.availableCapacity});
|
||||
|
||||
@@ -980,6 +1010,23 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
final int id;
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
final String? code;
|
||||
@override
|
||||
@JsonKey(name: 'manager_name')
|
||||
final String? managerName;
|
||||
@override
|
||||
@JsonKey(name: 'manager_phone')
|
||||
final String? managerPhone;
|
||||
@override
|
||||
final int? capacity;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
final bool isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
// API에 없는 필드들은 nullable로 변경
|
||||
@override
|
||||
final String? address;
|
||||
@override
|
||||
@@ -992,23 +1039,11 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
@override
|
||||
final String? country;
|
||||
@override
|
||||
final int? capacity;
|
||||
@override
|
||||
@JsonKey(name: 'manager_id')
|
||||
final int? managerId;
|
||||
@override
|
||||
@JsonKey(name: 'manager_name')
|
||||
final String? managerName;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
final bool isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
final DateTime updatedAt;
|
||||
// 추가 정보
|
||||
final DateTime? updatedAt;
|
||||
@override
|
||||
@JsonKey(name: 'current_stock')
|
||||
final int? currentStock;
|
||||
@@ -1018,7 +1053,7 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WarehouseLocationDto(id: $id, name: $name, address: $address, city: $city, state: $state, postalCode: $postalCode, country: $country, capacity: $capacity, managerId: $managerId, managerName: $managerName, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, currentStock: $currentStock, availableCapacity: $availableCapacity)';
|
||||
return 'WarehouseLocationDto(id: $id, name: $name, code: $code, managerName: $managerName, managerPhone: $managerPhone, capacity: $capacity, isActive: $isActive, createdAt: $createdAt, address: $address, city: $city, state: $state, postalCode: $postalCode, country: $country, managerId: $managerId, updatedAt: $updatedAt, currentStock: $currentStock, availableCapacity: $availableCapacity)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1028,22 +1063,25 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
other is _$WarehouseLocationDtoImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.code, code) || other.code == code) &&
|
||||
(identical(other.managerName, managerName) ||
|
||||
other.managerName == managerName) &&
|
||||
(identical(other.managerPhone, managerPhone) ||
|
||||
other.managerPhone == managerPhone) &&
|
||||
(identical(other.capacity, capacity) ||
|
||||
other.capacity == capacity) &&
|
||||
(identical(other.isActive, isActive) ||
|
||||
other.isActive == isActive) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.address, address) || other.address == address) &&
|
||||
(identical(other.city, city) || other.city == city) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.postalCode, postalCode) ||
|
||||
other.postalCode == postalCode) &&
|
||||
(identical(other.country, country) || other.country == country) &&
|
||||
(identical(other.capacity, capacity) ||
|
||||
other.capacity == capacity) &&
|
||||
(identical(other.managerId, managerId) ||
|
||||
other.managerId == managerId) &&
|
||||
(identical(other.managerName, managerName) ||
|
||||
other.managerName == managerName) &&
|
||||
(identical(other.isActive, isActive) ||
|
||||
other.isActive == isActive) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.currentStock, currentStock) ||
|
||||
@@ -1058,16 +1096,18 @@ class _$WarehouseLocationDtoImpl implements _WarehouseLocationDto {
|
||||
runtimeType,
|
||||
id,
|
||||
name,
|
||||
code,
|
||||
managerName,
|
||||
managerPhone,
|
||||
capacity,
|
||||
isActive,
|
||||
createdAt,
|
||||
address,
|
||||
city,
|
||||
state,
|
||||
postalCode,
|
||||
country,
|
||||
capacity,
|
||||
managerId,
|
||||
managerName,
|
||||
isActive,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
currentStock,
|
||||
availableCapacity);
|
||||
@@ -1094,17 +1134,19 @@ abstract class _WarehouseLocationDto implements WarehouseLocationDto {
|
||||
const factory _WarehouseLocationDto(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
final String? code,
|
||||
@JsonKey(name: 'manager_name') final String? managerName,
|
||||
@JsonKey(name: 'manager_phone') final String? managerPhone,
|
||||
final int? capacity,
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
final String? address,
|
||||
final String? city,
|
||||
final String? state,
|
||||
@JsonKey(name: 'postal_code') final String? postalCode,
|
||||
final String? country,
|
||||
final int? capacity,
|
||||
@JsonKey(name: 'manager_id') final int? managerId,
|
||||
@JsonKey(name: 'manager_name') final String? managerName,
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
|
||||
@JsonKey(name: 'updated_at') final DateTime? updatedAt,
|
||||
@JsonKey(name: 'current_stock') final int? currentStock,
|
||||
@JsonKey(name: 'available_capacity') final int? availableCapacity}) =
|
||||
_$WarehouseLocationDtoImpl;
|
||||
@@ -1117,6 +1159,22 @@ abstract class _WarehouseLocationDto implements WarehouseLocationDto {
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
String? get code;
|
||||
@override
|
||||
@JsonKey(name: 'manager_name')
|
||||
String? get managerName;
|
||||
@override
|
||||
@JsonKey(name: 'manager_phone')
|
||||
String? get managerPhone;
|
||||
@override
|
||||
int? get capacity;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
bool get isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt; // API에 없는 필드들은 nullable로 변경
|
||||
@override
|
||||
String? get address;
|
||||
@override
|
||||
String? get city;
|
||||
@@ -1128,22 +1186,11 @@ abstract class _WarehouseLocationDto implements WarehouseLocationDto {
|
||||
@override
|
||||
String? get country;
|
||||
@override
|
||||
int? get capacity;
|
||||
@override
|
||||
@JsonKey(name: 'manager_id')
|
||||
int? get managerId;
|
||||
@override
|
||||
@JsonKey(name: 'manager_name')
|
||||
String? get managerName;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
bool get isActive;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt; // 추가 정보
|
||||
DateTime? get updatedAt;
|
||||
@override
|
||||
@JsonKey(name: 'current_stock')
|
||||
int? get currentStock;
|
||||
|
||||
@@ -65,17 +65,21 @@ _$WarehouseLocationDtoImpl _$$WarehouseLocationDtoImplFromJson(
|
||||
_$WarehouseLocationDtoImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
code: json['code'] as String?,
|
||||
managerName: json['manager_name'] as String?,
|
||||
managerPhone: json['manager_phone'] as String?,
|
||||
capacity: (json['capacity'] as num?)?.toInt(),
|
||||
isActive: json['is_active'] as bool,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
address: json['address'] as String?,
|
||||
city: json['city'] as String?,
|
||||
state: json['state'] as String?,
|
||||
postalCode: json['postal_code'] as String?,
|
||||
country: json['country'] as String?,
|
||||
capacity: (json['capacity'] as num?)?.toInt(),
|
||||
managerId: (json['manager_id'] as num?)?.toInt(),
|
||||
managerName: json['manager_name'] as String?,
|
||||
isActive: json['is_active'] as bool,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
currentStock: (json['current_stock'] as num?)?.toInt(),
|
||||
availableCapacity: (json['available_capacity'] as num?)?.toInt(),
|
||||
);
|
||||
@@ -85,17 +89,19 @@ Map<String, dynamic> _$$WarehouseLocationDtoImplToJson(
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'code': instance.code,
|
||||
'manager_name': instance.managerName,
|
||||
'manager_phone': instance.managerPhone,
|
||||
'capacity': instance.capacity,
|
||||
'is_active': instance.isActive,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'address': instance.address,
|
||||
'city': instance.city,
|
||||
'state': instance.state,
|
||||
'postal_code': instance.postalCode,
|
||||
'country': instance.country,
|
||||
'capacity': instance.capacity,
|
||||
'manager_id': instance.managerId,
|
||||
'manager_name': instance.managerName,
|
||||
'is_active': instance.isActive,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
'current_stock': instance.currentStock,
|
||||
'available_capacity': instance.availableCapacity,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user