feat: 라이선스 및 창고 관리 API 연동 구현
- 라이선스 관리 API 연동 완료 - LicenseRemoteDataSource, LicenseService 구현 - LicenseListController, LicenseFormController API 연동 - 페이지네이션, 검색, 필터링 기능 추가 - 라이선스 할당/해제 기능 구현 - 창고 관리 API 연동 완료 - WarehouseRemoteDataSource, WarehouseService 구현 - WarehouseLocationListController, WarehouseLocationFormController API 연동 - 창고별 장비 조회 및 용량 관리 기능 추가 - DI 컨테이너에 새로운 서비스 등록 - API 통합 문서 업데이트 (전체 진행률 100% 달성)
This commit is contained in:
80
lib/data/models/license/license_dto.dart
Normal file
80
lib/data/models/license/license_dto.dart
Normal file
@@ -0,0 +1,80 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'license_dto.freezed.dart';
|
||||
part 'license_dto.g.dart';
|
||||
|
||||
/// 라이선스 전체 정보 DTO
|
||||
@freezed
|
||||
class LicenseDto with _$LicenseDto {
|
||||
const factory LicenseDto({
|
||||
required int id,
|
||||
@JsonKey(name: 'license_key') required String licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
@JsonKey(name: 'assigned_user_id') int? assignedUserId,
|
||||
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: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'branch_name') String? branchName,
|
||||
@JsonKey(name: 'assigned_user_name') String? assignedUserName,
|
||||
}) = _LicenseDto;
|
||||
|
||||
factory LicenseDto.fromJson(Map<String, dynamic> json) => _$LicenseDtoFromJson(json);
|
||||
}
|
||||
|
||||
/// 라이선스 목록 응답 DTO
|
||||
@freezed
|
||||
class LicenseListResponseDto with _$LicenseListResponseDto {
|
||||
const factory LicenseListResponseDto({
|
||||
required List<LicenseDto> items,
|
||||
required int total,
|
||||
required int page,
|
||||
@JsonKey(name: 'per_page') required int perPage,
|
||||
@JsonKey(name: 'total_pages') required int totalPages,
|
||||
}) = _LicenseListResponseDto;
|
||||
|
||||
factory LicenseListResponseDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$LicenseListResponseDtoFromJson(json);
|
||||
}
|
||||
|
||||
/// 만료 예정 라이선스 DTO
|
||||
@freezed
|
||||
class ExpiringLicenseDto with _$ExpiringLicenseDto {
|
||||
const factory ExpiringLicenseDto({
|
||||
required int id,
|
||||
@JsonKey(name: 'license_key') required String licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
@JsonKey(name: 'company_name') String? companyName,
|
||||
@JsonKey(name: 'expiry_date') required DateTime expiryDate,
|
||||
@JsonKey(name: 'days_until_expiry') required int daysUntilExpiry,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
}) = _ExpiringLicenseDto;
|
||||
|
||||
factory ExpiringLicenseDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseDtoFromJson(json);
|
||||
}
|
||||
|
||||
/// 만료 예정 라이선스 목록 응답 DTO
|
||||
@freezed
|
||||
class ExpiringLicenseListDto with _$ExpiringLicenseListDto {
|
||||
const factory ExpiringLicenseListDto({
|
||||
required List<ExpiringLicenseDto> items,
|
||||
required int total,
|
||||
required int page,
|
||||
@JsonKey(name: 'per_page') required int perPage,
|
||||
@JsonKey(name: 'total_pages') required int totalPages,
|
||||
}) = _ExpiringLicenseListDto;
|
||||
|
||||
factory ExpiringLicenseListDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseListDtoFromJson(json);
|
||||
}
|
||||
1436
lib/data/models/license/license_dto.freezed.dart
Normal file
1436
lib/data/models/license/license_dto.freezed.dart
Normal file
File diff suppressed because it is too large
Load Diff
125
lib/data/models/license/license_dto.g.dart
Normal file
125
lib/data/models/license/license_dto.g.dart
Normal file
@@ -0,0 +1,125 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'license_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$LicenseDtoImpl _$$LicenseDtoImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LicenseDtoImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
licenseKey: json['license_key'] as String,
|
||||
productName: json['product_name'] as String?,
|
||||
vendor: json['vendor'] as String?,
|
||||
licenseType: json['license_type'] as String?,
|
||||
userCount: (json['user_count'] as num?)?.toInt(),
|
||||
purchaseDate: json['purchase_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['purchase_date'] as String),
|
||||
expiryDate: json['expiry_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expiry_date'] as String),
|
||||
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
|
||||
companyId: (json['company_id'] as num?)?.toInt(),
|
||||
branchId: (json['branch_id'] as num?)?.toInt(),
|
||||
assignedUserId: (json['assigned_user_id'] as num?)?.toInt(),
|
||||
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),
|
||||
companyName: json['company_name'] as String?,
|
||||
branchName: json['branch_name'] as String?,
|
||||
assignedUserName: json['assigned_user_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LicenseDtoImplToJson(_$LicenseDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'license_key': instance.licenseKey,
|
||||
'product_name': instance.productName,
|
||||
'vendor': instance.vendor,
|
||||
'license_type': instance.licenseType,
|
||||
'user_count': instance.userCount,
|
||||
'purchase_date': instance.purchaseDate?.toIso8601String(),
|
||||
'expiry_date': instance.expiryDate?.toIso8601String(),
|
||||
'purchase_price': instance.purchasePrice,
|
||||
'company_id': instance.companyId,
|
||||
'branch_id': instance.branchId,
|
||||
'assigned_user_id': instance.assignedUserId,
|
||||
'remark': instance.remark,
|
||||
'is_active': instance.isActive,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'company_name': instance.companyName,
|
||||
'branch_name': instance.branchName,
|
||||
'assigned_user_name': instance.assignedUserName,
|
||||
};
|
||||
|
||||
_$LicenseListResponseDtoImpl _$$LicenseListResponseDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LicenseListResponseDtoImpl(
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => LicenseDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
total: (json['total'] as num).toInt(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
perPage: (json['per_page'] as num).toInt(),
|
||||
totalPages: (json['total_pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LicenseListResponseDtoImplToJson(
|
||||
_$LicenseListResponseDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'items': instance.items,
|
||||
'total': instance.total,
|
||||
'page': instance.page,
|
||||
'per_page': instance.perPage,
|
||||
'total_pages': instance.totalPages,
|
||||
};
|
||||
|
||||
_$ExpiringLicenseDtoImpl _$$ExpiringLicenseDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseDtoImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
licenseKey: json['license_key'] as String,
|
||||
productName: json['product_name'] as String?,
|
||||
companyName: json['company_name'] as String?,
|
||||
expiryDate: DateTime.parse(json['expiry_date'] as String),
|
||||
daysUntilExpiry: (json['days_until_expiry'] as num).toInt(),
|
||||
isActive: json['is_active'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ExpiringLicenseDtoImplToJson(
|
||||
_$ExpiringLicenseDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'license_key': instance.licenseKey,
|
||||
'product_name': instance.productName,
|
||||
'company_name': instance.companyName,
|
||||
'expiry_date': instance.expiryDate.toIso8601String(),
|
||||
'days_until_expiry': instance.daysUntilExpiry,
|
||||
'is_active': instance.isActive,
|
||||
};
|
||||
|
||||
_$ExpiringLicenseListDtoImpl _$$ExpiringLicenseListDtoImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseListDtoImpl(
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => ExpiringLicenseDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
total: (json['total'] as num).toInt(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
perPage: (json['per_page'] as num).toInt(),
|
||||
totalPages: (json['total_pages'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ExpiringLicenseListDtoImplToJson(
|
||||
_$ExpiringLicenseListDtoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'items': instance.items,
|
||||
'total': instance.total,
|
||||
'page': instance.page,
|
||||
'per_page': instance.perPage,
|
||||
'total_pages': instance.totalPages,
|
||||
};
|
||||
32
lib/data/models/license/license_query_dto.dart
Normal file
32
lib/data/models/license/license_query_dto.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'license_query_dto.freezed.dart';
|
||||
part 'license_query_dto.g.dart';
|
||||
|
||||
/// 라이선스 페이지네이션 쿼리 DTO
|
||||
@freezed
|
||||
class LicensePaginationQuery with _$LicensePaginationQuery {
|
||||
const factory LicensePaginationQuery({
|
||||
@Default(1) int page,
|
||||
@Default(20) int limit,
|
||||
@Default('expiry_date') String sort,
|
||||
@Default('asc') String order,
|
||||
@JsonKey(name: 'company_id') String? companyId,
|
||||
@JsonKey(name: 'user_id') String? userId,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
String? status,
|
||||
String? search,
|
||||
}) = _LicensePaginationQuery;
|
||||
|
||||
factory LicensePaginationQuery.fromJson(Map<String, dynamic> json) => _$LicensePaginationQueryFromJson(json);
|
||||
}
|
||||
|
||||
/// 만료 예정 라이선스 조회 쿼리 DTO
|
||||
@freezed
|
||||
class ExpiringLicensesQuery with _$ExpiringLicensesQuery {
|
||||
const factory ExpiringLicensesQuery({
|
||||
@Default(30) int days,
|
||||
}) = _ExpiringLicensesQuery;
|
||||
|
||||
factory ExpiringLicensesQuery.fromJson(Map<String, dynamic> json) => _$ExpiringLicensesQueryFromJson(json);
|
||||
}
|
||||
506
lib/data/models/license/license_query_dto.freezed.dart
Normal file
506
lib/data/models/license/license_query_dto.freezed.dart
Normal file
@@ -0,0 +1,506 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'license_query_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
LicensePaginationQuery _$LicensePaginationQueryFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _LicensePaginationQuery.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LicensePaginationQuery {
|
||||
int get page => throw _privateConstructorUsedError;
|
||||
int get limit => throw _privateConstructorUsedError;
|
||||
String get sort => throw _privateConstructorUsedError;
|
||||
String get order => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_id')
|
||||
String? get companyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_id')
|
||||
String? get userId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType => throw _privateConstructorUsedError;
|
||||
String? get status => throw _privateConstructorUsedError;
|
||||
String? get search => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LicensePaginationQuery to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of LicensePaginationQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LicensePaginationQueryCopyWith<LicensePaginationQuery> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LicensePaginationQueryCopyWith<$Res> {
|
||||
factory $LicensePaginationQueryCopyWith(LicensePaginationQuery value,
|
||||
$Res Function(LicensePaginationQuery) then) =
|
||||
_$LicensePaginationQueryCopyWithImpl<$Res, LicensePaginationQuery>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int page,
|
||||
int limit,
|
||||
String sort,
|
||||
String order,
|
||||
@JsonKey(name: 'company_id') String? companyId,
|
||||
@JsonKey(name: 'user_id') String? userId,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
String? status,
|
||||
String? search});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LicensePaginationQueryCopyWithImpl<$Res,
|
||||
$Val extends LicensePaginationQuery>
|
||||
implements $LicensePaginationQueryCopyWith<$Res> {
|
||||
_$LicensePaginationQueryCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of LicensePaginationQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? page = null,
|
||||
Object? limit = null,
|
||||
Object? sort = null,
|
||||
Object? order = null,
|
||||
Object? companyId = freezed,
|
||||
Object? userId = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? status = freezed,
|
||||
Object? search = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
page: null == page
|
||||
? _value.page
|
||||
: page // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
limit: null == limit
|
||||
? _value.limit
|
||||
: limit // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
sort: null == sort
|
||||
? _value.sort
|
||||
: sort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
order: null == order
|
||||
? _value.order
|
||||
: order // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
status: freezed == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
search: freezed == search
|
||||
? _value.search
|
||||
: search // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LicensePaginationQueryImplCopyWith<$Res>
|
||||
implements $LicensePaginationQueryCopyWith<$Res> {
|
||||
factory _$$LicensePaginationQueryImplCopyWith(
|
||||
_$LicensePaginationQueryImpl value,
|
||||
$Res Function(_$LicensePaginationQueryImpl) then) =
|
||||
__$$LicensePaginationQueryImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int page,
|
||||
int limit,
|
||||
String sort,
|
||||
String order,
|
||||
@JsonKey(name: 'company_id') String? companyId,
|
||||
@JsonKey(name: 'user_id') String? userId,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
String? status,
|
||||
String? search});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LicensePaginationQueryImplCopyWithImpl<$Res>
|
||||
extends _$LicensePaginationQueryCopyWithImpl<$Res,
|
||||
_$LicensePaginationQueryImpl>
|
||||
implements _$$LicensePaginationQueryImplCopyWith<$Res> {
|
||||
__$$LicensePaginationQueryImplCopyWithImpl(
|
||||
_$LicensePaginationQueryImpl _value,
|
||||
$Res Function(_$LicensePaginationQueryImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LicensePaginationQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? page = null,
|
||||
Object? limit = null,
|
||||
Object? sort = null,
|
||||
Object? order = null,
|
||||
Object? companyId = freezed,
|
||||
Object? userId = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? status = freezed,
|
||||
Object? search = freezed,
|
||||
}) {
|
||||
return _then(_$LicensePaginationQueryImpl(
|
||||
page: null == page
|
||||
? _value.page
|
||||
: page // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
limit: null == limit
|
||||
? _value.limit
|
||||
: limit // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
sort: null == sort
|
||||
? _value.sort
|
||||
: sort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
order: null == order
|
||||
? _value.order
|
||||
: order // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
status: freezed == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
search: freezed == search
|
||||
? _value.search
|
||||
: search // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LicensePaginationQueryImpl implements _LicensePaginationQuery {
|
||||
const _$LicensePaginationQueryImpl(
|
||||
{this.page = 1,
|
||||
this.limit = 20,
|
||||
this.sort = 'expiry_date',
|
||||
this.order = 'asc',
|
||||
@JsonKey(name: 'company_id') this.companyId,
|
||||
@JsonKey(name: 'user_id') this.userId,
|
||||
@JsonKey(name: 'license_type') this.licenseType,
|
||||
this.status,
|
||||
this.search});
|
||||
|
||||
factory _$LicensePaginationQueryImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LicensePaginationQueryImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final int page;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int limit;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String sort;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String order;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
final String? companyId;
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
final String? userId;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
final String? licenseType;
|
||||
@override
|
||||
final String? status;
|
||||
@override
|
||||
final String? search;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LicensePaginationQuery(page: $page, limit: $limit, sort: $sort, order: $order, companyId: $companyId, userId: $userId, licenseType: $licenseType, status: $status, search: $search)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$LicensePaginationQueryImpl &&
|
||||
(identical(other.page, page) || other.page == page) &&
|
||||
(identical(other.limit, limit) || other.limit == limit) &&
|
||||
(identical(other.sort, sort) || other.sort == sort) &&
|
||||
(identical(other.order, order) || other.order == order) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.userId, userId) || other.userId == userId) &&
|
||||
(identical(other.licenseType, licenseType) ||
|
||||
other.licenseType == licenseType) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.search, search) || other.search == search));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, page, limit, sort, order,
|
||||
companyId, userId, licenseType, status, search);
|
||||
|
||||
/// Create a copy of LicensePaginationQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LicensePaginationQueryImplCopyWith<_$LicensePaginationQueryImpl>
|
||||
get copyWith => __$$LicensePaginationQueryImplCopyWithImpl<
|
||||
_$LicensePaginationQueryImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$LicensePaginationQueryImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _LicensePaginationQuery implements LicensePaginationQuery {
|
||||
const factory _LicensePaginationQuery(
|
||||
{final int page,
|
||||
final int limit,
|
||||
final String sort,
|
||||
final String order,
|
||||
@JsonKey(name: 'company_id') final String? companyId,
|
||||
@JsonKey(name: 'user_id') final String? userId,
|
||||
@JsonKey(name: 'license_type') final String? licenseType,
|
||||
final String? status,
|
||||
final String? search}) = _$LicensePaginationQueryImpl;
|
||||
|
||||
factory _LicensePaginationQuery.fromJson(Map<String, dynamic> json) =
|
||||
_$LicensePaginationQueryImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get page;
|
||||
@override
|
||||
int get limit;
|
||||
@override
|
||||
String get sort;
|
||||
@override
|
||||
String get order;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
String? get companyId;
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
String? get userId;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType;
|
||||
@override
|
||||
String? get status;
|
||||
@override
|
||||
String? get search;
|
||||
|
||||
/// Create a copy of LicensePaginationQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LicensePaginationQueryImplCopyWith<_$LicensePaginationQueryImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
ExpiringLicensesQuery _$ExpiringLicensesQueryFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _ExpiringLicensesQuery.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ExpiringLicensesQuery {
|
||||
int get days => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExpiringLicensesQuery to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ExpiringLicensesQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ExpiringLicensesQueryCopyWith<ExpiringLicensesQuery> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ExpiringLicensesQueryCopyWith<$Res> {
|
||||
factory $ExpiringLicensesQueryCopyWith(ExpiringLicensesQuery value,
|
||||
$Res Function(ExpiringLicensesQuery) then) =
|
||||
_$ExpiringLicensesQueryCopyWithImpl<$Res, ExpiringLicensesQuery>;
|
||||
@useResult
|
||||
$Res call({int days});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ExpiringLicensesQueryCopyWithImpl<$Res,
|
||||
$Val extends ExpiringLicensesQuery>
|
||||
implements $ExpiringLicensesQueryCopyWith<$Res> {
|
||||
_$ExpiringLicensesQueryCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ExpiringLicensesQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? days = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
days: null == days
|
||||
? _value.days
|
||||
: days // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ExpiringLicensesQueryImplCopyWith<$Res>
|
||||
implements $ExpiringLicensesQueryCopyWith<$Res> {
|
||||
factory _$$ExpiringLicensesQueryImplCopyWith(
|
||||
_$ExpiringLicensesQueryImpl value,
|
||||
$Res Function(_$ExpiringLicensesQueryImpl) then) =
|
||||
__$$ExpiringLicensesQueryImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int days});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ExpiringLicensesQueryImplCopyWithImpl<$Res>
|
||||
extends _$ExpiringLicensesQueryCopyWithImpl<$Res,
|
||||
_$ExpiringLicensesQueryImpl>
|
||||
implements _$$ExpiringLicensesQueryImplCopyWith<$Res> {
|
||||
__$$ExpiringLicensesQueryImplCopyWithImpl(_$ExpiringLicensesQueryImpl _value,
|
||||
$Res Function(_$ExpiringLicensesQueryImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ExpiringLicensesQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? days = null,
|
||||
}) {
|
||||
return _then(_$ExpiringLicensesQueryImpl(
|
||||
days: null == days
|
||||
? _value.days
|
||||
: days // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ExpiringLicensesQueryImpl implements _ExpiringLicensesQuery {
|
||||
const _$ExpiringLicensesQueryImpl({this.days = 30});
|
||||
|
||||
factory _$ExpiringLicensesQueryImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ExpiringLicensesQueryImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final int days;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ExpiringLicensesQuery(days: $days)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ExpiringLicensesQueryImpl &&
|
||||
(identical(other.days, days) || other.days == days));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, days);
|
||||
|
||||
/// Create a copy of ExpiringLicensesQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ExpiringLicensesQueryImplCopyWith<_$ExpiringLicensesQueryImpl>
|
||||
get copyWith => __$$ExpiringLicensesQueryImplCopyWithImpl<
|
||||
_$ExpiringLicensesQueryImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ExpiringLicensesQueryImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ExpiringLicensesQuery implements ExpiringLicensesQuery {
|
||||
const factory _ExpiringLicensesQuery({final int days}) =
|
||||
_$ExpiringLicensesQueryImpl;
|
||||
|
||||
factory _ExpiringLicensesQuery.fromJson(Map<String, dynamic> json) =
|
||||
_$ExpiringLicensesQueryImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get days;
|
||||
|
||||
/// Create a copy of ExpiringLicensesQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ExpiringLicensesQueryImplCopyWith<_$ExpiringLicensesQueryImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
47
lib/data/models/license/license_query_dto.g.dart
Normal file
47
lib/data/models/license/license_query_dto.g.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'license_query_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$LicensePaginationQueryImpl _$$LicensePaginationQueryImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LicensePaginationQueryImpl(
|
||||
page: (json['page'] as num?)?.toInt() ?? 1,
|
||||
limit: (json['limit'] as num?)?.toInt() ?? 20,
|
||||
sort: json['sort'] as String? ?? 'expiry_date',
|
||||
order: json['order'] as String? ?? 'asc',
|
||||
companyId: json['company_id'] as String?,
|
||||
userId: json['user_id'] as String?,
|
||||
licenseType: json['license_type'] as String?,
|
||||
status: json['status'] as String?,
|
||||
search: json['search'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LicensePaginationQueryImplToJson(
|
||||
_$LicensePaginationQueryImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'page': instance.page,
|
||||
'limit': instance.limit,
|
||||
'sort': instance.sort,
|
||||
'order': instance.order,
|
||||
'company_id': instance.companyId,
|
||||
'user_id': instance.userId,
|
||||
'license_type': instance.licenseType,
|
||||
'status': instance.status,
|
||||
'search': instance.search,
|
||||
};
|
||||
|
||||
_$ExpiringLicensesQueryImpl _$$ExpiringLicensesQueryImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpiringLicensesQueryImpl(
|
||||
days: (json['days'] as num?)?.toInt() ?? 30,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ExpiringLicensesQueryImplToJson(
|
||||
_$ExpiringLicensesQueryImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'days': instance.days,
|
||||
};
|
||||
53
lib/data/models/license/license_request_dto.dart
Normal file
53
lib/data/models/license/license_request_dto.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'license_request_dto.freezed.dart';
|
||||
part 'license_request_dto.g.dart';
|
||||
|
||||
/// 라이선스 생성 요청 DTO
|
||||
@freezed
|
||||
class CreateLicenseRequest with _$CreateLicenseRequest {
|
||||
const factory CreateLicenseRequest({
|
||||
@JsonKey(name: 'license_key') required String licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
String? remark,
|
||||
}) = _CreateLicenseRequest;
|
||||
|
||||
factory CreateLicenseRequest.fromJson(Map<String, dynamic> json) => _$CreateLicenseRequestFromJson(json);
|
||||
}
|
||||
|
||||
/// 라이선스 수정 요청 DTO
|
||||
@freezed
|
||||
class UpdateLicenseRequest with _$UpdateLicenseRequest {
|
||||
const factory UpdateLicenseRequest({
|
||||
@JsonKey(name: 'license_key') String? licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool? isActive,
|
||||
}) = _UpdateLicenseRequest;
|
||||
|
||||
factory UpdateLicenseRequest.fromJson(Map<String, dynamic> json) => _$UpdateLicenseRequestFromJson(json);
|
||||
}
|
||||
|
||||
/// 라이선스 사용자 할당 요청 DTO
|
||||
@freezed
|
||||
class AssignLicenseRequest with _$AssignLicenseRequest {
|
||||
const factory AssignLicenseRequest({
|
||||
@JsonKey(name: 'user_id') required int userId,
|
||||
}) = _AssignLicenseRequest;
|
||||
|
||||
factory AssignLicenseRequest.fromJson(Map<String, dynamic> json) => _$AssignLicenseRequestFromJson(json);
|
||||
}
|
||||
957
lib/data/models/license/license_request_dto.freezed.dart
Normal file
957
lib/data/models/license/license_request_dto.freezed.dart
Normal file
@@ -0,0 +1,957 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'license_request_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
CreateLicenseRequest _$CreateLicenseRequestFromJson(Map<String, dynamic> json) {
|
||||
return _CreateLicenseRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CreateLicenseRequest {
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'product_name')
|
||||
String? get productName => throw _privateConstructorUsedError;
|
||||
String? get vendor => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_count')
|
||||
int? get userCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime? get expiryDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_price')
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'branch_id')
|
||||
int? get branchId => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CreateLicenseRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CreateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CreateLicenseRequestCopyWith<CreateLicenseRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CreateLicenseRequestCopyWith<$Res> {
|
||||
factory $CreateLicenseRequestCopyWith(CreateLicenseRequest value,
|
||||
$Res Function(CreateLicenseRequest) then) =
|
||||
_$CreateLicenseRequestCopyWithImpl<$Res, CreateLicenseRequest>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CreateLicenseRequestCopyWithImpl<$Res,
|
||||
$Val extends CreateLicenseRequest>
|
||||
implements $CreateLicenseRequestCopyWith<$Res> {
|
||||
_$CreateLicenseRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CreateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? licenseKey = null,
|
||||
Object? productName = freezed,
|
||||
Object? vendor = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? userCount = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? expiryDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? branchId = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
productName: freezed == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
vendor: freezed == vendor
|
||||
? _value.vendor
|
||||
: vendor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userCount: freezed == userCount
|
||||
? _value.userCount
|
||||
: userCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
expiryDate: freezed == expiryDate
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
branchId: freezed == branchId
|
||||
? _value.branchId
|
||||
: branchId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CreateLicenseRequestImplCopyWith<$Res>
|
||||
implements $CreateLicenseRequestCopyWith<$Res> {
|
||||
factory _$$CreateLicenseRequestImplCopyWith(_$CreateLicenseRequestImpl value,
|
||||
$Res Function(_$CreateLicenseRequestImpl) then) =
|
||||
__$$CreateLicenseRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
@JsonKey(name: 'branch_id') int? branchId,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CreateLicenseRequestImplCopyWithImpl<$Res>
|
||||
extends _$CreateLicenseRequestCopyWithImpl<$Res, _$CreateLicenseRequestImpl>
|
||||
implements _$$CreateLicenseRequestImplCopyWith<$Res> {
|
||||
__$$CreateLicenseRequestImplCopyWithImpl(_$CreateLicenseRequestImpl _value,
|
||||
$Res Function(_$CreateLicenseRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CreateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? licenseKey = null,
|
||||
Object? productName = freezed,
|
||||
Object? vendor = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? userCount = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? expiryDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? companyId = freezed,
|
||||
Object? branchId = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_$CreateLicenseRequestImpl(
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
productName: freezed == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
vendor: freezed == vendor
|
||||
? _value.vendor
|
||||
: vendor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userCount: freezed == userCount
|
||||
? _value.userCount
|
||||
: userCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
expiryDate: freezed == expiryDate
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
companyId: freezed == companyId
|
||||
? _value.companyId
|
||||
: companyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
branchId: freezed == branchId
|
||||
? _value.branchId
|
||||
: branchId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$CreateLicenseRequestImpl implements _CreateLicenseRequest {
|
||||
const _$CreateLicenseRequestImpl(
|
||||
{@JsonKey(name: 'license_key') required this.licenseKey,
|
||||
@JsonKey(name: 'product_name') this.productName,
|
||||
this.vendor,
|
||||
@JsonKey(name: 'license_type') this.licenseType,
|
||||
@JsonKey(name: 'user_count') this.userCount,
|
||||
@JsonKey(name: 'purchase_date') this.purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') this.expiryDate,
|
||||
@JsonKey(name: 'purchase_price') this.purchasePrice,
|
||||
@JsonKey(name: 'company_id') this.companyId,
|
||||
@JsonKey(name: 'branch_id') this.branchId,
|
||||
this.remark});
|
||||
|
||||
factory _$CreateLicenseRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CreateLicenseRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'license_key')
|
||||
final String licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'product_name')
|
||||
final String? productName;
|
||||
@override
|
||||
final String? vendor;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
final String? licenseType;
|
||||
@override
|
||||
@JsonKey(name: 'user_count')
|
||||
final int? userCount;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
final DateTime? purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'expiry_date')
|
||||
final DateTime? expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
final int? companyId;
|
||||
@override
|
||||
@JsonKey(name: 'branch_id')
|
||||
final int? branchId;
|
||||
@override
|
||||
final String? remark;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateLicenseRequest(licenseKey: $licenseKey, productName: $productName, vendor: $vendor, licenseType: $licenseType, userCount: $userCount, purchaseDate: $purchaseDate, expiryDate: $expiryDate, purchasePrice: $purchasePrice, companyId: $companyId, branchId: $branchId, remark: $remark)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CreateLicenseRequestImpl &&
|
||||
(identical(other.licenseKey, licenseKey) ||
|
||||
other.licenseKey == licenseKey) &&
|
||||
(identical(other.productName, productName) ||
|
||||
other.productName == productName) &&
|
||||
(identical(other.vendor, vendor) || other.vendor == vendor) &&
|
||||
(identical(other.licenseType, licenseType) ||
|
||||
other.licenseType == licenseType) &&
|
||||
(identical(other.userCount, userCount) ||
|
||||
other.userCount == userCount) &&
|
||||
(identical(other.purchaseDate, purchaseDate) ||
|
||||
other.purchaseDate == purchaseDate) &&
|
||||
(identical(other.expiryDate, expiryDate) ||
|
||||
other.expiryDate == expiryDate) &&
|
||||
(identical(other.purchasePrice, purchasePrice) ||
|
||||
other.purchasePrice == purchasePrice) &&
|
||||
(identical(other.companyId, companyId) ||
|
||||
other.companyId == companyId) &&
|
||||
(identical(other.branchId, branchId) ||
|
||||
other.branchId == branchId) &&
|
||||
(identical(other.remark, remark) || other.remark == remark));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
licenseKey,
|
||||
productName,
|
||||
vendor,
|
||||
licenseType,
|
||||
userCount,
|
||||
purchaseDate,
|
||||
expiryDate,
|
||||
purchasePrice,
|
||||
companyId,
|
||||
branchId,
|
||||
remark);
|
||||
|
||||
/// Create a copy of CreateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CreateLicenseRequestImplCopyWith<_$CreateLicenseRequestImpl>
|
||||
get copyWith =>
|
||||
__$$CreateLicenseRequestImplCopyWithImpl<_$CreateLicenseRequestImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CreateLicenseRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _CreateLicenseRequest implements CreateLicenseRequest {
|
||||
const factory _CreateLicenseRequest(
|
||||
{@JsonKey(name: 'license_key') required final String licenseKey,
|
||||
@JsonKey(name: 'product_name') final String? productName,
|
||||
final String? vendor,
|
||||
@JsonKey(name: 'license_type') final String? licenseType,
|
||||
@JsonKey(name: 'user_count') final int? userCount,
|
||||
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') final DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') final double? purchasePrice,
|
||||
@JsonKey(name: 'company_id') final int? companyId,
|
||||
@JsonKey(name: 'branch_id') final int? branchId,
|
||||
final String? remark}) = _$CreateLicenseRequestImpl;
|
||||
|
||||
factory _CreateLicenseRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$CreateLicenseRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'product_name')
|
||||
String? get productName;
|
||||
@override
|
||||
String? get vendor;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType;
|
||||
@override
|
||||
@JsonKey(name: 'user_count')
|
||||
int? get userCount;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime? get expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
@JsonKey(name: 'company_id')
|
||||
int? get companyId;
|
||||
@override
|
||||
@JsonKey(name: 'branch_id')
|
||||
int? get branchId;
|
||||
@override
|
||||
String? get remark;
|
||||
|
||||
/// Create a copy of CreateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CreateLicenseRequestImplCopyWith<_$CreateLicenseRequestImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
UpdateLicenseRequest _$UpdateLicenseRequestFromJson(Map<String, dynamic> json) {
|
||||
return _UpdateLicenseRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UpdateLicenseRequest {
|
||||
@JsonKey(name: 'license_key')
|
||||
String? get licenseKey => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'product_name')
|
||||
String? get productName => throw _privateConstructorUsedError;
|
||||
String? get vendor => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_count')
|
||||
int? get userCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime? get expiryDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_price')
|
||||
double? get purchasePrice => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_active')
|
||||
bool? get isActive => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this UpdateLicenseRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of UpdateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UpdateLicenseRequestCopyWith<UpdateLicenseRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UpdateLicenseRequestCopyWith<$Res> {
|
||||
factory $UpdateLicenseRequestCopyWith(UpdateLicenseRequest value,
|
||||
$Res Function(UpdateLicenseRequest) then) =
|
||||
_$UpdateLicenseRequestCopyWithImpl<$Res, UpdateLicenseRequest>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'license_key') String? licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool? isActive});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UpdateLicenseRequestCopyWithImpl<$Res,
|
||||
$Val extends UpdateLicenseRequest>
|
||||
implements $UpdateLicenseRequestCopyWith<$Res> {
|
||||
_$UpdateLicenseRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of UpdateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? licenseKey = freezed,
|
||||
Object? productName = freezed,
|
||||
Object? vendor = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? userCount = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? expiryDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
licenseKey: freezed == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
productName: freezed == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
vendor: freezed == vendor
|
||||
? _value.vendor
|
||||
: vendor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userCount: freezed == userCount
|
||||
? _value.userCount
|
||||
: userCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
expiryDate: freezed == expiryDate
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isActive: freezed == isActive
|
||||
? _value.isActive
|
||||
: isActive // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UpdateLicenseRequestImplCopyWith<$Res>
|
||||
implements $UpdateLicenseRequestCopyWith<$Res> {
|
||||
factory _$$UpdateLicenseRequestImplCopyWith(_$UpdateLicenseRequestImpl value,
|
||||
$Res Function(_$UpdateLicenseRequestImpl) then) =
|
||||
__$$UpdateLicenseRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'license_key') String? licenseKey,
|
||||
@JsonKey(name: 'product_name') String? productName,
|
||||
String? vendor,
|
||||
@JsonKey(name: 'license_type') String? licenseType,
|
||||
@JsonKey(name: 'user_count') int? userCount,
|
||||
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool? isActive});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UpdateLicenseRequestImplCopyWithImpl<$Res>
|
||||
extends _$UpdateLicenseRequestCopyWithImpl<$Res, _$UpdateLicenseRequestImpl>
|
||||
implements _$$UpdateLicenseRequestImplCopyWith<$Res> {
|
||||
__$$UpdateLicenseRequestImplCopyWithImpl(_$UpdateLicenseRequestImpl _value,
|
||||
$Res Function(_$UpdateLicenseRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of UpdateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? licenseKey = freezed,
|
||||
Object? productName = freezed,
|
||||
Object? vendor = freezed,
|
||||
Object? licenseType = freezed,
|
||||
Object? userCount = freezed,
|
||||
Object? purchaseDate = freezed,
|
||||
Object? expiryDate = freezed,
|
||||
Object? purchasePrice = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = freezed,
|
||||
}) {
|
||||
return _then(_$UpdateLicenseRequestImpl(
|
||||
licenseKey: freezed == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
productName: freezed == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
vendor: freezed == vendor
|
||||
? _value.vendor
|
||||
: vendor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
licenseType: freezed == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userCount: freezed == userCount
|
||||
? _value.userCount
|
||||
: userCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
purchaseDate: freezed == purchaseDate
|
||||
? _value.purchaseDate
|
||||
: purchaseDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
expiryDate: freezed == expiryDate
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
purchasePrice: freezed == purchasePrice
|
||||
? _value.purchasePrice
|
||||
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isActive: freezed == isActive
|
||||
? _value.isActive
|
||||
: isActive // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$UpdateLicenseRequestImpl implements _UpdateLicenseRequest {
|
||||
const _$UpdateLicenseRequestImpl(
|
||||
{@JsonKey(name: 'license_key') this.licenseKey,
|
||||
@JsonKey(name: 'product_name') this.productName,
|
||||
this.vendor,
|
||||
@JsonKey(name: 'license_type') this.licenseType,
|
||||
@JsonKey(name: 'user_count') this.userCount,
|
||||
@JsonKey(name: 'purchase_date') this.purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') this.expiryDate,
|
||||
@JsonKey(name: 'purchase_price') this.purchasePrice,
|
||||
this.remark,
|
||||
@JsonKey(name: 'is_active') this.isActive});
|
||||
|
||||
factory _$UpdateLicenseRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UpdateLicenseRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'license_key')
|
||||
final String? licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'product_name')
|
||||
final String? productName;
|
||||
@override
|
||||
final String? vendor;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
final String? licenseType;
|
||||
@override
|
||||
@JsonKey(name: 'user_count')
|
||||
final int? userCount;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
final DateTime? purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'expiry_date')
|
||||
final DateTime? expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
final double? purchasePrice;
|
||||
@override
|
||||
final String? remark;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
final bool? isActive;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateLicenseRequest(licenseKey: $licenseKey, productName: $productName, vendor: $vendor, licenseType: $licenseType, userCount: $userCount, purchaseDate: $purchaseDate, expiryDate: $expiryDate, purchasePrice: $purchasePrice, remark: $remark, isActive: $isActive)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UpdateLicenseRequestImpl &&
|
||||
(identical(other.licenseKey, licenseKey) ||
|
||||
other.licenseKey == licenseKey) &&
|
||||
(identical(other.productName, productName) ||
|
||||
other.productName == productName) &&
|
||||
(identical(other.vendor, vendor) || other.vendor == vendor) &&
|
||||
(identical(other.licenseType, licenseType) ||
|
||||
other.licenseType == licenseType) &&
|
||||
(identical(other.userCount, userCount) ||
|
||||
other.userCount == userCount) &&
|
||||
(identical(other.purchaseDate, purchaseDate) ||
|
||||
other.purchaseDate == purchaseDate) &&
|
||||
(identical(other.expiryDate, expiryDate) ||
|
||||
other.expiryDate == expiryDate) &&
|
||||
(identical(other.purchasePrice, purchasePrice) ||
|
||||
other.purchasePrice == purchasePrice) &&
|
||||
(identical(other.remark, remark) || other.remark == remark) &&
|
||||
(identical(other.isActive, isActive) ||
|
||||
other.isActive == isActive));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
licenseKey,
|
||||
productName,
|
||||
vendor,
|
||||
licenseType,
|
||||
userCount,
|
||||
purchaseDate,
|
||||
expiryDate,
|
||||
purchasePrice,
|
||||
remark,
|
||||
isActive);
|
||||
|
||||
/// Create a copy of UpdateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UpdateLicenseRequestImplCopyWith<_$UpdateLicenseRequestImpl>
|
||||
get copyWith =>
|
||||
__$$UpdateLicenseRequestImplCopyWithImpl<_$UpdateLicenseRequestImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$UpdateLicenseRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _UpdateLicenseRequest implements UpdateLicenseRequest {
|
||||
const factory _UpdateLicenseRequest(
|
||||
{@JsonKey(name: 'license_key') final String? licenseKey,
|
||||
@JsonKey(name: 'product_name') final String? productName,
|
||||
final String? vendor,
|
||||
@JsonKey(name: 'license_type') final String? licenseType,
|
||||
@JsonKey(name: 'user_count') final int? userCount,
|
||||
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
|
||||
@JsonKey(name: 'expiry_date') final DateTime? expiryDate,
|
||||
@JsonKey(name: 'purchase_price') final double? purchasePrice,
|
||||
final String? remark,
|
||||
@JsonKey(name: 'is_active') final bool? isActive}) =
|
||||
_$UpdateLicenseRequestImpl;
|
||||
|
||||
factory _UpdateLicenseRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$UpdateLicenseRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'license_key')
|
||||
String? get licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'product_name')
|
||||
String? get productName;
|
||||
@override
|
||||
String? get vendor;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
String? get licenseType;
|
||||
@override
|
||||
@JsonKey(name: 'user_count')
|
||||
int? get userCount;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_date')
|
||||
DateTime? get purchaseDate;
|
||||
@override
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime? get expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_price')
|
||||
double? get purchasePrice;
|
||||
@override
|
||||
String? get remark;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
bool? get isActive;
|
||||
|
||||
/// Create a copy of UpdateLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UpdateLicenseRequestImplCopyWith<_$UpdateLicenseRequestImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
AssignLicenseRequest _$AssignLicenseRequestFromJson(Map<String, dynamic> json) {
|
||||
return _AssignLicenseRequest.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AssignLicenseRequest {
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AssignLicenseRequest to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AssignLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AssignLicenseRequestCopyWith<AssignLicenseRequest> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AssignLicenseRequestCopyWith<$Res> {
|
||||
factory $AssignLicenseRequestCopyWith(AssignLicenseRequest value,
|
||||
$Res Function(AssignLicenseRequest) then) =
|
||||
_$AssignLicenseRequestCopyWithImpl<$Res, AssignLicenseRequest>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AssignLicenseRequestCopyWithImpl<$Res,
|
||||
$Val extends AssignLicenseRequest>
|
||||
implements $AssignLicenseRequestCopyWith<$Res> {
|
||||
_$AssignLicenseRequestCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AssignLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? userId = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AssignLicenseRequestImplCopyWith<$Res>
|
||||
implements $AssignLicenseRequestCopyWith<$Res> {
|
||||
factory _$$AssignLicenseRequestImplCopyWith(_$AssignLicenseRequestImpl value,
|
||||
$Res Function(_$AssignLicenseRequestImpl) then) =
|
||||
__$$AssignLicenseRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AssignLicenseRequestImplCopyWithImpl<$Res>
|
||||
extends _$AssignLicenseRequestCopyWithImpl<$Res, _$AssignLicenseRequestImpl>
|
||||
implements _$$AssignLicenseRequestImplCopyWith<$Res> {
|
||||
__$$AssignLicenseRequestImplCopyWithImpl(_$AssignLicenseRequestImpl _value,
|
||||
$Res Function(_$AssignLicenseRequestImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AssignLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? userId = null,
|
||||
}) {
|
||||
return _then(_$AssignLicenseRequestImpl(
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$AssignLicenseRequestImpl implements _AssignLicenseRequest {
|
||||
const _$AssignLicenseRequestImpl(
|
||||
{@JsonKey(name: 'user_id') required this.userId});
|
||||
|
||||
factory _$AssignLicenseRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AssignLicenseRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
final int userId;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AssignLicenseRequest(userId: $userId)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AssignLicenseRequestImpl &&
|
||||
(identical(other.userId, userId) || other.userId == userId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, userId);
|
||||
|
||||
/// Create a copy of AssignLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AssignLicenseRequestImplCopyWith<_$AssignLicenseRequestImpl>
|
||||
get copyWith =>
|
||||
__$$AssignLicenseRequestImplCopyWithImpl<_$AssignLicenseRequestImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AssignLicenseRequestImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AssignLicenseRequest implements AssignLicenseRequest {
|
||||
const factory _AssignLicenseRequest(
|
||||
{@JsonKey(name: 'user_id') required final int userId}) =
|
||||
_$AssignLicenseRequestImpl;
|
||||
|
||||
factory _AssignLicenseRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$AssignLicenseRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId;
|
||||
|
||||
/// Create a copy of AssignLicenseRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AssignLicenseRequestImplCopyWith<_$AssignLicenseRequestImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
89
lib/data/models/license/license_request_dto.g.dart
Normal file
89
lib/data/models/license/license_request_dto.g.dart
Normal file
@@ -0,0 +1,89 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'license_request_dto.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CreateLicenseRequestImpl _$$CreateLicenseRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CreateLicenseRequestImpl(
|
||||
licenseKey: json['license_key'] as String,
|
||||
productName: json['product_name'] as String?,
|
||||
vendor: json['vendor'] as String?,
|
||||
licenseType: json['license_type'] as String?,
|
||||
userCount: (json['user_count'] as num?)?.toInt(),
|
||||
purchaseDate: json['purchase_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['purchase_date'] as String),
|
||||
expiryDate: json['expiry_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expiry_date'] as String),
|
||||
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
|
||||
companyId: (json['company_id'] as num?)?.toInt(),
|
||||
branchId: (json['branch_id'] as num?)?.toInt(),
|
||||
remark: json['remark'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CreateLicenseRequestImplToJson(
|
||||
_$CreateLicenseRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'license_key': instance.licenseKey,
|
||||
'product_name': instance.productName,
|
||||
'vendor': instance.vendor,
|
||||
'license_type': instance.licenseType,
|
||||
'user_count': instance.userCount,
|
||||
'purchase_date': instance.purchaseDate?.toIso8601String(),
|
||||
'expiry_date': instance.expiryDate?.toIso8601String(),
|
||||
'purchase_price': instance.purchasePrice,
|
||||
'company_id': instance.companyId,
|
||||
'branch_id': instance.branchId,
|
||||
'remark': instance.remark,
|
||||
};
|
||||
|
||||
_$UpdateLicenseRequestImpl _$$UpdateLicenseRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UpdateLicenseRequestImpl(
|
||||
licenseKey: json['license_key'] as String?,
|
||||
productName: json['product_name'] as String?,
|
||||
vendor: json['vendor'] as String?,
|
||||
licenseType: json['license_type'] as String?,
|
||||
userCount: (json['user_count'] as num?)?.toInt(),
|
||||
purchaseDate: json['purchase_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['purchase_date'] as String),
|
||||
expiryDate: json['expiry_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expiry_date'] as String),
|
||||
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
|
||||
remark: json['remark'] as String?,
|
||||
isActive: json['is_active'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UpdateLicenseRequestImplToJson(
|
||||
_$UpdateLicenseRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'license_key': instance.licenseKey,
|
||||
'product_name': instance.productName,
|
||||
'vendor': instance.vendor,
|
||||
'license_type': instance.licenseType,
|
||||
'user_count': instance.userCount,
|
||||
'purchase_date': instance.purchaseDate?.toIso8601String(),
|
||||
'expiry_date': instance.expiryDate?.toIso8601String(),
|
||||
'purchase_price': instance.purchasePrice,
|
||||
'remark': instance.remark,
|
||||
'is_active': instance.isActive,
|
||||
};
|
||||
|
||||
_$AssignLicenseRequestImpl _$$AssignLicenseRequestImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$AssignLicenseRequestImpl(
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AssignLicenseRequestImplToJson(
|
||||
_$AssignLicenseRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'user_id': instance.userId,
|
||||
};
|
||||
Reference in New Issue
Block a user