Tài khoản ok
This commit is contained in:
parent
5d86cfa542
commit
3e8bf01018
@ -444,6 +444,11 @@ abstract class HraRepository {
|
||||
@POST('/api/v1/class/save')
|
||||
Future<int> classSave(@Body() ClassEntity body);
|
||||
|
||||
///
|
||||
@POST('/api/v1/class/link-product')
|
||||
Future<BooleanApiResponse> classLinkProduct(
|
||||
@Body() ClassLinkProductCommand body);
|
||||
|
||||
///
|
||||
///@param id
|
||||
@DELETE('/api/v1/class/delete')
|
||||
@ -944,7 +949,7 @@ abstract class HraRepository {
|
||||
|
||||
///
|
||||
@POST('/api/v1/order/create')
|
||||
Future<OrderDtoApiResponse> orderCreate(@Body() OrderCreateDto body);
|
||||
Future<OrderPaymentDtoApiResponse> orderCreate(@Body() OrderCreateDto body);
|
||||
|
||||
///
|
||||
@POST('/api/v1/order/list')
|
||||
@ -990,6 +995,20 @@ abstract class HraRepository {
|
||||
Future<OrderEntityApiResponse> orderCreateWithClass(
|
||||
@Body() OrderCreateWithClassDto body);
|
||||
|
||||
///
|
||||
///@param id
|
||||
@GET('/api/v1/order/check-paid/{id}')
|
||||
Future<BooleanApiResponse> orderCheckPaidId(@Path('id') int id);
|
||||
|
||||
///
|
||||
///@param id
|
||||
@GET('/api/v1/order/payment/{id}')
|
||||
Future<OrderPaymentDtoApiResponse> orderPaymentId(@Path('id') int id);
|
||||
|
||||
///
|
||||
@POST('/api/v1/order/sepay-webhook')
|
||||
Future<String> orderSepayWebhook(@Body() SePayNotifyResource body);
|
||||
|
||||
///
|
||||
///@param id
|
||||
@GET('/api/v1/product/{id}')
|
||||
@ -997,8 +1016,12 @@ abstract class HraRepository {
|
||||
|
||||
///
|
||||
///@param id
|
||||
///@param classId
|
||||
@GET('/api/v1/product/detail/{id}')
|
||||
Future<ProductDetailDtoApiResponse> productDetailId(@Path('id') int id);
|
||||
Future<ProductDetailDtoApiResponse> productDetailId(
|
||||
@Path('id') int id,
|
||||
@Query('classId') int classId,
|
||||
);
|
||||
|
||||
///
|
||||
@POST('/api/v1/product')
|
||||
|
||||
@ -1985,6 +1985,30 @@ class _HraRepository implements HraRepository {
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BooleanApiResponse> classLinkProduct(body) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
_data.addAll(body.toJson());
|
||||
final _result = await _dio
|
||||
.fetch<Map<String, dynamic>>(_setStreamType<BooleanApiResponse>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/v1/class/link-product',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
|
||||
final value = BooleanApiResponse.fromJson(_result.data!);
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<dynamic> classDelete(id) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
@ -4256,14 +4280,14 @@ class _HraRepository implements HraRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<OrderDtoApiResponse> orderCreate(body) async {
|
||||
Future<OrderPaymentDtoApiResponse> orderCreate(body) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
_data.addAll(body.toJson());
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(
|
||||
_setStreamType<OrderDtoApiResponse>(Options(
|
||||
_setStreamType<OrderPaymentDtoApiResponse>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
@ -4275,7 +4299,7 @@ class _HraRepository implements HraRepository {
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
|
||||
final value = OrderDtoApiResponse.fromJson(_result.data!);
|
||||
final value = OrderPaymentDtoApiResponse.fromJson(_result.data!);
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -4453,6 +4477,75 @@ class _HraRepository implements HraRepository {
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BooleanApiResponse> orderCheckPaidId(id) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
final _result = await _dio
|
||||
.fetch<Map<String, dynamic>>(_setStreamType<BooleanApiResponse>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/v1/order/check-paid/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
|
||||
final value = BooleanApiResponse.fromJson(_result.data!);
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<OrderPaymentDtoApiResponse> orderPaymentId(id) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(
|
||||
_setStreamType<OrderPaymentDtoApiResponse>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/v1/order/payment/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
|
||||
final value = OrderPaymentDtoApiResponse.fromJson(_result.data!);
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String> orderSepayWebhook(body) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
_data.addAll(body.toJson());
|
||||
final _result = await _dio.fetch<String>(_setStreamType<String>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/v1/order/sepay-webhook',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
|
||||
final value = _result.data!;
|
||||
return value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ProductSaveDtoApiResponse> productId(id) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
@ -4477,9 +4570,12 @@ class _HraRepository implements HraRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ProductDetailDtoApiResponse> productDetailId(id) async {
|
||||
Future<ProductDetailDtoApiResponse> productDetailId(
|
||||
id,
|
||||
classId,
|
||||
) async {
|
||||
const _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'classId': classId};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(
|
||||
|
||||
@ -96,6 +96,27 @@ const $ClassListSearchTypeEnumMap = {
|
||||
ClassListSearchTypeEnum.swaggerGeneratedUnknown: ''
|
||||
};
|
||||
|
||||
enum ClassProductStatusEnum {
|
||||
@JsonValue('swaggerGeneratedUnknown')
|
||||
swaggerGeneratedUnknown,
|
||||
@JsonValue('1')
|
||||
value_1,
|
||||
@JsonValue('2')
|
||||
value_2,
|
||||
@JsonValue('3')
|
||||
value_3,
|
||||
@JsonValue('4')
|
||||
value_4
|
||||
}
|
||||
|
||||
const $ClassProductStatusEnumMap = {
|
||||
ClassProductStatusEnum.value_1: '1',
|
||||
ClassProductStatusEnum.value_2: '2',
|
||||
ClassProductStatusEnum.value_3: '3',
|
||||
ClassProductStatusEnum.value_4: '4',
|
||||
ClassProductStatusEnum.swaggerGeneratedUnknown: ''
|
||||
};
|
||||
|
||||
enum ClassStatusEnum {
|
||||
@JsonValue('swaggerGeneratedUnknown')
|
||||
swaggerGeneratedUnknown,
|
||||
@ -157,7 +178,9 @@ enum ClassUserStatusEnum {
|
||||
@JsonValue('3')
|
||||
value_3,
|
||||
@JsonValue('4')
|
||||
value_4
|
||||
value_4,
|
||||
@JsonValue('5')
|
||||
value_5
|
||||
}
|
||||
|
||||
const $ClassUserStatusEnumMap = {
|
||||
@ -165,6 +188,7 @@ const $ClassUserStatusEnumMap = {
|
||||
ClassUserStatusEnum.value_2: '2',
|
||||
ClassUserStatusEnum.value_3: '3',
|
||||
ClassUserStatusEnum.value_4: '4',
|
||||
ClassUserStatusEnum.value_5: '5',
|
||||
ClassUserStatusEnum.swaggerGeneratedUnknown: ''
|
||||
};
|
||||
|
||||
@ -731,7 +755,9 @@ enum OrderStatusEnum {
|
||||
@JsonValue('4')
|
||||
value_4,
|
||||
@JsonValue('5')
|
||||
value_5
|
||||
value_5,
|
||||
@JsonValue('6')
|
||||
value_6
|
||||
}
|
||||
|
||||
const $OrderStatusEnumMap = {
|
||||
@ -741,6 +767,7 @@ const $OrderStatusEnumMap = {
|
||||
OrderStatusEnum.value_3: '3',
|
||||
OrderStatusEnum.value_4: '4',
|
||||
OrderStatusEnum.value_5: '5',
|
||||
OrderStatusEnum.value_6: '6',
|
||||
OrderStatusEnum.swaggerGeneratedUnknown: ''
|
||||
};
|
||||
|
||||
|
||||
@ -3369,6 +3369,7 @@ class ClassDetailDto {
|
||||
this.zoomMeetingId,
|
||||
this.zoomPassword,
|
||||
this.description,
|
||||
this.allowRegistration,
|
||||
this.zoomHostVideo,
|
||||
this.zoomParticipantVideo,
|
||||
this.zoomJoinBeforeHost,
|
||||
@ -3377,7 +3378,9 @@ class ClassDetailDto {
|
||||
this.classUsers,
|
||||
this.assignExams,
|
||||
this.classSessions,
|
||||
this.classProducts,
|
||||
this.currentRole,
|
||||
this.products,
|
||||
});
|
||||
|
||||
factory ClassDetailDto.fromJson(Map<String, dynamic> json) =>
|
||||
@ -3433,6 +3436,8 @@ class ClassDetailDto {
|
||||
String? zoomPassword;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
@JsonKey(name: 'allowRegistration', includeIfNull: true)
|
||||
bool? allowRegistration;
|
||||
@JsonKey(name: 'zoomHostVideo', includeIfNull: true)
|
||||
bool? zoomHostVideo;
|
||||
@JsonKey(name: 'zoomParticipantVideo', includeIfNull: true)
|
||||
@ -3458,12 +3463,20 @@ class ClassDetailDto {
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassSessionEntity>[])
|
||||
List<ClassSessionEntity>? classSessions;
|
||||
@JsonKey(
|
||||
name: 'classProducts',
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassProductEntity>[])
|
||||
List<ClassProductEntity>? classProducts;
|
||||
@JsonKey(
|
||||
name: 'currentRole',
|
||||
includeIfNull: true,
|
||||
toJson: classUserRoleEnumToJson,
|
||||
fromJson: classUserRoleEnumFromJson)
|
||||
enums.ClassUserRoleEnum? currentRole;
|
||||
@JsonKey(
|
||||
name: 'products', includeIfNull: true, defaultValue: <ProductListDto>[])
|
||||
List<ProductListDto>? products;
|
||||
static const fromJsonFactory = _$ClassDetailDtoFromJson;
|
||||
static const toJsonFactory = _$ClassDetailDtoToJson;
|
||||
Map<String, dynamic> toJson() => _$ClassDetailDtoToJson(this);
|
||||
@ -3493,6 +3506,7 @@ class ClassEntity {
|
||||
this.zoomMeetingId,
|
||||
this.zoomPassword,
|
||||
this.description,
|
||||
this.allowRegistration,
|
||||
this.zoomHostVideo,
|
||||
this.zoomParticipantVideo,
|
||||
this.zoomJoinBeforeHost,
|
||||
@ -3501,6 +3515,7 @@ class ClassEntity {
|
||||
this.classUsers,
|
||||
this.assignExams,
|
||||
this.classSessions,
|
||||
this.classProducts,
|
||||
});
|
||||
|
||||
factory ClassEntity.fromJson(Map<String, dynamic> json) =>
|
||||
@ -3556,6 +3571,8 @@ class ClassEntity {
|
||||
String? zoomPassword;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
@JsonKey(name: 'allowRegistration', includeIfNull: true)
|
||||
bool? allowRegistration;
|
||||
@JsonKey(name: 'zoomHostVideo', includeIfNull: true)
|
||||
bool? zoomHostVideo;
|
||||
@JsonKey(name: 'zoomParticipantVideo', includeIfNull: true)
|
||||
@ -3581,6 +3598,11 @@ class ClassEntity {
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassSessionEntity>[])
|
||||
List<ClassSessionEntity>? classSessions;
|
||||
@JsonKey(
|
||||
name: 'classProducts',
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassProductEntity>[])
|
||||
List<ClassProductEntity>? classProducts;
|
||||
static const fromJsonFactory = _$ClassEntityFromJson;
|
||||
static const toJsonFactory = _$ClassEntityToJson;
|
||||
Map<String, dynamic> toJson() => _$ClassEntityToJson(this);
|
||||
@ -3675,6 +3697,31 @@ class ClassLevel {
|
||||
Map<String, dynamic> toJson() => _$ClassLevelToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassLinkProductCommand {
|
||||
ClassLinkProductCommand({
|
||||
this.classId,
|
||||
this.productId,
|
||||
this.classSessions,
|
||||
});
|
||||
|
||||
factory ClassLinkProductCommand.fromJson(Map<String, dynamic> json) =>
|
||||
_$ClassLinkProductCommandFromJson(json);
|
||||
|
||||
@JsonKey(name: 'classId', includeIfNull: true)
|
||||
int? classId;
|
||||
@JsonKey(name: 'productId', includeIfNull: true)
|
||||
int? productId;
|
||||
@JsonKey(
|
||||
name: 'classSessions',
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassSessionEntity>[])
|
||||
List<ClassSessionEntity>? classSessions;
|
||||
static const fromJsonFactory = _$ClassLinkProductCommandFromJson;
|
||||
static const toJsonFactory = _$ClassLinkProductCommandToJson;
|
||||
Map<String, dynamic> toJson() => _$ClassLinkProductCommandToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassListDto {
|
||||
ClassListDto({
|
||||
@ -3699,6 +3746,7 @@ class ClassListDto {
|
||||
this.zoomMeetingId,
|
||||
this.zoomPassword,
|
||||
this.description,
|
||||
this.allowRegistration,
|
||||
this.zoomHostVideo,
|
||||
this.zoomParticipantVideo,
|
||||
this.zoomJoinBeforeHost,
|
||||
@ -3707,6 +3755,7 @@ class ClassListDto {
|
||||
this.classUsers,
|
||||
this.assignExams,
|
||||
this.classSessions,
|
||||
this.classProducts,
|
||||
this.countPupil,
|
||||
this.countExercise,
|
||||
this.countTest,
|
||||
@ -3773,6 +3822,8 @@ class ClassListDto {
|
||||
String? zoomPassword;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
@JsonKey(name: 'allowRegistration', includeIfNull: true)
|
||||
bool? allowRegistration;
|
||||
@JsonKey(name: 'zoomHostVideo', includeIfNull: true)
|
||||
bool? zoomHostVideo;
|
||||
@JsonKey(name: 'zoomParticipantVideo', includeIfNull: true)
|
||||
@ -3798,6 +3849,11 @@ class ClassListDto {
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassSessionEntity>[])
|
||||
List<ClassSessionEntity>? classSessions;
|
||||
@JsonKey(
|
||||
name: 'classProducts',
|
||||
includeIfNull: true,
|
||||
defaultValue: <ClassProductEntity>[])
|
||||
List<ClassProductEntity>? classProducts;
|
||||
@JsonKey(name: 'countPupil', includeIfNull: true)
|
||||
int? countPupil;
|
||||
@JsonKey(name: 'countExercise', includeIfNull: true)
|
||||
@ -3948,6 +4004,71 @@ class ClassListOfSchoolFilter {
|
||||
Map<String, dynamic> toJson() => _$ClassListOfSchoolFilterToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassProductEntity {
|
||||
ClassProductEntity({
|
||||
this.id,
|
||||
this.createdBy,
|
||||
this.createdDate,
|
||||
this.lastModifiedBy,
|
||||
this.lastModifiedDate,
|
||||
this.isDeleted,
|
||||
this.classId,
|
||||
this.productId,
|
||||
this.maxStudents,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.status,
|
||||
this.zoomMeetingId,
|
||||
this.zoomPassword,
|
||||
this.description,
|
||||
this.sortOrder,
|
||||
});
|
||||
|
||||
factory ClassProductEntity.fromJson(Map<String, dynamic> json) =>
|
||||
_$ClassProductEntityFromJson(json);
|
||||
|
||||
@JsonKey(name: 'id', includeIfNull: true)
|
||||
int? id;
|
||||
@JsonKey(name: 'createdBy', includeIfNull: true)
|
||||
int? createdBy;
|
||||
@JsonKey(name: 'createdDate', includeIfNull: true)
|
||||
DateTime? createdDate;
|
||||
@JsonKey(name: 'lastModifiedBy', includeIfNull: true)
|
||||
int? lastModifiedBy;
|
||||
@JsonKey(name: 'lastModifiedDate', includeIfNull: true)
|
||||
DateTime? lastModifiedDate;
|
||||
@JsonKey(name: 'isDeleted', includeIfNull: true)
|
||||
bool? isDeleted;
|
||||
@JsonKey(name: 'classId', includeIfNull: true)
|
||||
int? classId;
|
||||
@JsonKey(name: 'productId', includeIfNull: true)
|
||||
int? productId;
|
||||
@JsonKey(name: 'maxStudents', includeIfNull: true)
|
||||
int? maxStudents;
|
||||
@JsonKey(name: 'startDate', includeIfNull: true)
|
||||
DateTime? startDate;
|
||||
@JsonKey(name: 'endDate', includeIfNull: true)
|
||||
DateTime? endDate;
|
||||
@JsonKey(
|
||||
name: 'status',
|
||||
includeIfNull: true,
|
||||
toJson: classProductStatusEnumToJson,
|
||||
fromJson: classProductStatusEnumFromJson)
|
||||
enums.ClassProductStatusEnum? status;
|
||||
@JsonKey(name: 'zoomMeetingId', includeIfNull: true)
|
||||
String? zoomMeetingId;
|
||||
@JsonKey(name: 'zoomPassword', includeIfNull: true)
|
||||
String? zoomPassword;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
@JsonKey(name: 'sortOrder', includeIfNull: true)
|
||||
int? sortOrder;
|
||||
static const fromJsonFactory = _$ClassProductEntityFromJson;
|
||||
static const toJsonFactory = _$ClassProductEntityToJson;
|
||||
Map<String, dynamic> toJson() => _$ClassProductEntityToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassProgramTypeEntity {
|
||||
ClassProgramTypeEntity({
|
||||
@ -4298,6 +4419,65 @@ class ClassSessionEntity {
|
||||
Map<String, dynamic> toJson() => _$ClassSessionEntityToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassSessionInfoDto {
|
||||
ClassSessionInfoDto({
|
||||
this.id,
|
||||
this.sessionNumber,
|
||||
this.sessionName,
|
||||
this.description,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
this.zoomMeetingId,
|
||||
this.zoomJoinLink,
|
||||
this.zoomStartLink,
|
||||
this.zoomPassword,
|
||||
this.recordingUrl,
|
||||
this.actualDurationMinutes,
|
||||
this.status,
|
||||
this.notes,
|
||||
});
|
||||
|
||||
factory ClassSessionInfoDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$ClassSessionInfoDtoFromJson(json);
|
||||
|
||||
@JsonKey(name: 'id', includeIfNull: true)
|
||||
int? id;
|
||||
@JsonKey(name: 'sessionNumber', includeIfNull: true)
|
||||
int? sessionNumber;
|
||||
@JsonKey(name: 'sessionName', includeIfNull: true)
|
||||
String? sessionName;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
@JsonKey(name: 'startTime', includeIfNull: true)
|
||||
DateTime? startTime;
|
||||
@JsonKey(name: 'endTime', includeIfNull: true)
|
||||
DateTime? endTime;
|
||||
@JsonKey(name: 'zoomMeetingId', includeIfNull: true)
|
||||
String? zoomMeetingId;
|
||||
@JsonKey(name: 'zoomJoinLink', includeIfNull: true)
|
||||
String? zoomJoinLink;
|
||||
@JsonKey(name: 'zoomStartLink', includeIfNull: true)
|
||||
String? zoomStartLink;
|
||||
@JsonKey(name: 'zoomPassword', includeIfNull: true)
|
||||
String? zoomPassword;
|
||||
@JsonKey(name: 'recordingUrl', includeIfNull: true)
|
||||
String? recordingUrl;
|
||||
@JsonKey(name: 'actualDurationMinutes', includeIfNull: true)
|
||||
int? actualDurationMinutes;
|
||||
@JsonKey(
|
||||
name: 'status',
|
||||
includeIfNull: true,
|
||||
toJson: sessionStatusEnumToJson,
|
||||
fromJson: sessionStatusEnumFromJson)
|
||||
enums.SessionStatusEnum? status;
|
||||
@JsonKey(name: 'notes', includeIfNull: true)
|
||||
String? notes;
|
||||
static const fromJsonFactory = _$ClassSessionInfoDtoFromJson;
|
||||
static const toJsonFactory = _$ClassSessionInfoDtoToJson;
|
||||
Map<String, dynamic> toJson() => _$ClassSessionInfoDtoToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ClassShortDto {
|
||||
ClassShortDto({
|
||||
@ -9815,6 +9995,8 @@ class OrderDto {
|
||||
this.address,
|
||||
this.notes,
|
||||
this.totalAmount,
|
||||
this.paidDate,
|
||||
this.paymentLog,
|
||||
this.status,
|
||||
this.items,
|
||||
});
|
||||
@ -9846,6 +10028,10 @@ class OrderDto {
|
||||
String? notes;
|
||||
@JsonKey(name: 'totalAmount', includeIfNull: true)
|
||||
double? totalAmount;
|
||||
@JsonKey(name: 'paidDate', includeIfNull: true)
|
||||
DateTime? paidDate;
|
||||
@JsonKey(name: 'paymentLog', includeIfNull: true)
|
||||
String? paymentLog;
|
||||
@JsonKey(
|
||||
name: 'status',
|
||||
includeIfNull: true,
|
||||
@ -9952,6 +10138,8 @@ class OrderEntity {
|
||||
this.address,
|
||||
this.notes,
|
||||
this.totalAmount,
|
||||
this.paidDate,
|
||||
this.paymentLog,
|
||||
this.status,
|
||||
this.items,
|
||||
});
|
||||
@ -9983,6 +10171,10 @@ class OrderEntity {
|
||||
String? notes;
|
||||
@JsonKey(name: 'totalAmount', includeIfNull: true)
|
||||
double? totalAmount;
|
||||
@JsonKey(name: 'paidDate', includeIfNull: true)
|
||||
DateTime? paidDate;
|
||||
@JsonKey(name: 'paymentLog', includeIfNull: true)
|
||||
String? paymentLog;
|
||||
@JsonKey(
|
||||
name: 'status',
|
||||
includeIfNull: true,
|
||||
@ -10160,6 +10352,116 @@ class OrderItemEntity {
|
||||
Map<String, dynamic> toJson() => _$OrderItemEntityToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class OrderPaymentDto {
|
||||
OrderPaymentDto({
|
||||
this.id,
|
||||
this.createdBy,
|
||||
this.createdDate,
|
||||
this.lastModifiedBy,
|
||||
this.lastModifiedDate,
|
||||
this.isDeleted,
|
||||
this.userId,
|
||||
this.fullName,
|
||||
this.phone,
|
||||
this.address,
|
||||
this.notes,
|
||||
this.totalAmount,
|
||||
this.paidDate,
|
||||
this.paymentLog,
|
||||
this.status,
|
||||
this.items,
|
||||
this.bankName,
|
||||
this.bankNumber,
|
||||
this.accountName,
|
||||
this.content,
|
||||
this.gatewayUrl,
|
||||
});
|
||||
|
||||
factory OrderPaymentDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$OrderPaymentDtoFromJson(json);
|
||||
|
||||
@JsonKey(name: 'id', includeIfNull: true)
|
||||
int? id;
|
||||
@JsonKey(name: 'createdBy', includeIfNull: true)
|
||||
int? createdBy;
|
||||
@JsonKey(name: 'createdDate', includeIfNull: true)
|
||||
DateTime? createdDate;
|
||||
@JsonKey(name: 'lastModifiedBy', includeIfNull: true)
|
||||
int? lastModifiedBy;
|
||||
@JsonKey(name: 'lastModifiedDate', includeIfNull: true)
|
||||
DateTime? lastModifiedDate;
|
||||
@JsonKey(name: 'isDeleted', includeIfNull: true)
|
||||
bool? isDeleted;
|
||||
@JsonKey(name: 'userId', includeIfNull: true)
|
||||
int? userId;
|
||||
@JsonKey(name: 'fullName', includeIfNull: true)
|
||||
String? fullName;
|
||||
@JsonKey(name: 'phone', includeIfNull: true)
|
||||
String? phone;
|
||||
@JsonKey(name: 'address', includeIfNull: true)
|
||||
String? address;
|
||||
@JsonKey(name: 'notes', includeIfNull: true)
|
||||
String? notes;
|
||||
@JsonKey(name: 'totalAmount', includeIfNull: true)
|
||||
double? totalAmount;
|
||||
@JsonKey(name: 'paidDate', includeIfNull: true)
|
||||
DateTime? paidDate;
|
||||
@JsonKey(name: 'paymentLog', includeIfNull: true)
|
||||
String? paymentLog;
|
||||
@JsonKey(
|
||||
name: 'status',
|
||||
includeIfNull: true,
|
||||
toJson: orderStatusEnumToJson,
|
||||
fromJson: orderStatusEnumFromJson)
|
||||
enums.OrderStatusEnum? status;
|
||||
@JsonKey(
|
||||
name: 'items', includeIfNull: true, defaultValue: <OrderItemEntity>[])
|
||||
List<OrderItemEntity>? items;
|
||||
@JsonKey(name: 'bankName', includeIfNull: true)
|
||||
String? bankName;
|
||||
@JsonKey(name: 'bankNumber', includeIfNull: true)
|
||||
String? bankNumber;
|
||||
@JsonKey(name: 'accountName', includeIfNull: true)
|
||||
String? accountName;
|
||||
@JsonKey(name: 'content', includeIfNull: true)
|
||||
String? content;
|
||||
@JsonKey(name: 'gatewayUrl', includeIfNull: true)
|
||||
String? gatewayUrl;
|
||||
static const fromJsonFactory = _$OrderPaymentDtoFromJson;
|
||||
static const toJsonFactory = _$OrderPaymentDtoToJson;
|
||||
Map<String, dynamic> toJson() => _$OrderPaymentDtoToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class OrderPaymentDtoApiResponse {
|
||||
OrderPaymentDtoApiResponse({
|
||||
this.data,
|
||||
this.message,
|
||||
this.success,
|
||||
this.code,
|
||||
});
|
||||
|
||||
factory OrderPaymentDtoApiResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$OrderPaymentDtoApiResponseFromJson(json);
|
||||
|
||||
@JsonKey(name: 'data', includeIfNull: true)
|
||||
OrderPaymentDto? data;
|
||||
@JsonKey(name: 'message', includeIfNull: true)
|
||||
String? message;
|
||||
@JsonKey(name: 'success', includeIfNull: true)
|
||||
bool? success;
|
||||
@JsonKey(
|
||||
name: 'code',
|
||||
includeIfNull: true,
|
||||
toJson: errorCodeEnumToJson,
|
||||
fromJson: errorCodeEnumFromJson)
|
||||
enums.ErrorCodeEnum? code;
|
||||
static const fromJsonFactory = _$OrderPaymentDtoApiResponseFromJson;
|
||||
static const toJsonFactory = _$OrderPaymentDtoApiResponseToJson;
|
||||
Map<String, dynamic> toJson() => _$OrderPaymentDtoApiResponseToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class OrderUpdateDto {
|
||||
OrderUpdateDto({
|
||||
@ -10812,6 +11114,7 @@ class ProductLessonDetailDto {
|
||||
this.content,
|
||||
this.sortOrder,
|
||||
this.isFree,
|
||||
this.classSession,
|
||||
});
|
||||
|
||||
factory ProductLessonDetailDto.fromJson(Map<String, dynamic> json) =>
|
||||
@ -10847,6 +11150,8 @@ class ProductLessonDetailDto {
|
||||
int? sortOrder;
|
||||
@JsonKey(name: 'isFree', includeIfNull: true)
|
||||
bool? isFree;
|
||||
@JsonKey(name: 'classSession', includeIfNull: true)
|
||||
ClassSessionInfoDto? classSession;
|
||||
static const fromJsonFactory = _$ProductLessonDetailDtoFromJson;
|
||||
static const toJsonFactory = _$ProductLessonDetailDtoToJson;
|
||||
Map<String, dynamic> toJson() => _$ProductLessonDetailDtoToJson(this);
|
||||
@ -12661,6 +12966,7 @@ class RefreshTokenRequestDto {
|
||||
class RefreshTokenResponseDto {
|
||||
RefreshTokenResponseDto({
|
||||
this.token,
|
||||
this.refreshToken,
|
||||
});
|
||||
|
||||
factory RefreshTokenResponseDto.fromJson(Map<String, dynamic> json) =>
|
||||
@ -12668,6 +12974,8 @@ class RefreshTokenResponseDto {
|
||||
|
||||
@JsonKey(name: 'token', includeIfNull: true)
|
||||
String? token;
|
||||
@JsonKey(name: 'refreshToken', includeIfNull: true)
|
||||
String? refreshToken;
|
||||
static const fromJsonFactory = _$RefreshTokenResponseDtoFromJson;
|
||||
static const toJsonFactory = _$RefreshTokenResponseDtoToJson;
|
||||
Map<String, dynamic> toJson() => _$RefreshTokenResponseDtoToJson(this);
|
||||
@ -13803,6 +14111,49 @@ class SchoolStaticCountDtoApiResponse {
|
||||
_$SchoolStaticCountDtoApiResponseToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class SePayNotifyResource {
|
||||
SePayNotifyResource({
|
||||
this.id,
|
||||
this.gateway,
|
||||
this.transactionDate,
|
||||
this.accountNumber,
|
||||
this.code,
|
||||
this.content,
|
||||
this.transferType,
|
||||
this.transferAmount,
|
||||
this.referenceCode,
|
||||
this.description,
|
||||
});
|
||||
|
||||
factory SePayNotifyResource.fromJson(Map<String, dynamic> json) =>
|
||||
_$SePayNotifyResourceFromJson(json);
|
||||
|
||||
@JsonKey(name: 'id', includeIfNull: true)
|
||||
int? id;
|
||||
@JsonKey(name: 'gateway', includeIfNull: true)
|
||||
String? gateway;
|
||||
@JsonKey(name: 'transactionDate', includeIfNull: true)
|
||||
String? transactionDate;
|
||||
@JsonKey(name: 'accountNumber', includeIfNull: true)
|
||||
String? accountNumber;
|
||||
@JsonKey(name: 'code', includeIfNull: true)
|
||||
String? code;
|
||||
@JsonKey(name: 'content', includeIfNull: true)
|
||||
String? content;
|
||||
@JsonKey(name: 'transferType', includeIfNull: true)
|
||||
String? transferType;
|
||||
@JsonKey(name: 'transferAmount', includeIfNull: true)
|
||||
int? transferAmount;
|
||||
@JsonKey(name: 'referenceCode', includeIfNull: true)
|
||||
String? referenceCode;
|
||||
@JsonKey(name: 'description', includeIfNull: true)
|
||||
String? description;
|
||||
static const fromJsonFactory = _$SePayNotifyResourceFromJson;
|
||||
static const toJsonFactory = _$SePayNotifyResourceToJson;
|
||||
Map<String, dynamic> toJson() => _$SePayNotifyResourceToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class SessionAttendanceEntity {
|
||||
SessionAttendanceEntity({
|
||||
@ -16442,6 +16793,49 @@ List<enums.ClassListSearchTypeEnum> classListSearchTypeEnumListFromJson(
|
||||
.toList();
|
||||
}
|
||||
|
||||
int? classProductStatusEnumToJson(
|
||||
enums.ClassProductStatusEnum? classProductStatusEnum) {
|
||||
return classProductStatusEnum?.index;
|
||||
}
|
||||
|
||||
enums.ClassProductStatusEnum classProductStatusEnumFromJson(
|
||||
int? classProductStatusEnum) {
|
||||
if (classProductStatusEnum == null) {
|
||||
return enums.ClassProductStatusEnum.swaggerGeneratedUnknown;
|
||||
}
|
||||
|
||||
return enums.$ClassProductStatusEnumMap.entries
|
||||
.firstWhere(
|
||||
(element) =>
|
||||
element.value.toString().toLowerCase() ==
|
||||
classProductStatusEnum.toString().toLowerCase(),
|
||||
orElse: () => const MapEntry(
|
||||
enums.ClassProductStatusEnum.swaggerGeneratedUnknown, ''))
|
||||
.key;
|
||||
}
|
||||
|
||||
List<int> classProductStatusEnumListToJson(
|
||||
List<enums.ClassProductStatusEnum>? classProductStatusEnum) {
|
||||
if (classProductStatusEnum == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return classProductStatusEnum
|
||||
.map((e) => e.index) //enums.$ClassProductStatusEnumMap[e]!
|
||||
.toList();
|
||||
}
|
||||
|
||||
List<enums.ClassProductStatusEnum> classProductStatusEnumListFromJson(
|
||||
List? classProductStatusEnum) {
|
||||
if (classProductStatusEnum == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return classProductStatusEnum
|
||||
.map((e) => classProductStatusEnumFromJson(e)) //.toString()
|
||||
.toList();
|
||||
}
|
||||
|
||||
int? classStatusEnumToJson(enums.ClassStatusEnum? classStatusEnum) {
|
||||
return classStatusEnum?.index;
|
||||
}
|
||||
|
||||
@ -2445,6 +2445,7 @@ ClassDetailDto _$ClassDetailDtoFromJson(Map<String, dynamic> json) =>
|
||||
zoomMeetingId: json['zoomMeetingId'] as String?,
|
||||
zoomPassword: json['zoomPassword'] as String?,
|
||||
description: json['description'] as String?,
|
||||
allowRegistration: json['allowRegistration'] as bool?,
|
||||
zoomHostVideo: json['zoomHostVideo'] as bool?,
|
||||
zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
|
||||
zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
|
||||
@ -2463,8 +2464,17 @@ ClassDetailDto _$ClassDetailDtoFromJson(Map<String, dynamic> json) =>
|
||||
(e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
classProducts: (json['classProducts'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => ClassProductEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
currentRole:
|
||||
classUserRoleEnumFromJson((json['currentRole'] as num?)?.toInt()),
|
||||
products: (json['products'] as List<dynamic>?)
|
||||
?.map((e) => ProductListDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClassDetailDtoToJson(ClassDetailDto instance) =>
|
||||
@ -2490,6 +2500,7 @@ Map<String, dynamic> _$ClassDetailDtoToJson(ClassDetailDto instance) =>
|
||||
'zoomMeetingId': instance.zoomMeetingId,
|
||||
'zoomPassword': instance.zoomPassword,
|
||||
'description': instance.description,
|
||||
'allowRegistration': instance.allowRegistration,
|
||||
'zoomHostVideo': instance.zoomHostVideo,
|
||||
'zoomParticipantVideo': instance.zoomParticipantVideo,
|
||||
'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
|
||||
@ -2498,7 +2509,9 @@ Map<String, dynamic> _$ClassDetailDtoToJson(ClassDetailDto instance) =>
|
||||
'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
|
||||
'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
|
||||
'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
|
||||
'classProducts': instance.classProducts?.map((e) => e.toJson()).toList(),
|
||||
'currentRole': classUserRoleEnumToJson(instance.currentRole),
|
||||
'products': instance.products?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
ClassEntity _$ClassEntityFromJson(Map<String, dynamic> json) => ClassEntity(
|
||||
@ -2534,6 +2547,7 @@ ClassEntity _$ClassEntityFromJson(Map<String, dynamic> json) => ClassEntity(
|
||||
zoomMeetingId: json['zoomMeetingId'] as String?,
|
||||
zoomPassword: json['zoomPassword'] as String?,
|
||||
description: json['description'] as String?,
|
||||
allowRegistration: json['allowRegistration'] as bool?,
|
||||
zoomHostVideo: json['zoomHostVideo'] as bool?,
|
||||
zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
|
||||
zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
|
||||
@ -2552,6 +2566,11 @@ ClassEntity _$ClassEntityFromJson(Map<String, dynamic> json) => ClassEntity(
|
||||
(e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
classProducts: (json['classProducts'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => ClassProductEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClassEntityToJson(ClassEntity instance) =>
|
||||
@ -2577,6 +2596,7 @@ Map<String, dynamic> _$ClassEntityToJson(ClassEntity instance) =>
|
||||
'zoomMeetingId': instance.zoomMeetingId,
|
||||
'zoomPassword': instance.zoomPassword,
|
||||
'description': instance.description,
|
||||
'allowRegistration': instance.allowRegistration,
|
||||
'zoomHostVideo': instance.zoomHostVideo,
|
||||
'zoomParticipantVideo': instance.zoomParticipantVideo,
|
||||
'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
|
||||
@ -2585,6 +2605,7 @@ Map<String, dynamic> _$ClassEntityToJson(ClassEntity instance) =>
|
||||
'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
|
||||
'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
|
||||
'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
|
||||
'classProducts': instance.classProducts?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
ClassGetListFilter _$ClassGetListFilterFromJson(Map<String, dynamic> json) =>
|
||||
@ -2645,6 +2666,26 @@ Map<String, dynamic> _$ClassLevelToJson(ClassLevel instance) =>
|
||||
'subjects': instance.subjects?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
ClassLinkProductCommand _$ClassLinkProductCommandFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ClassLinkProductCommand(
|
||||
classId: (json['classId'] as num?)?.toInt(),
|
||||
productId: (json['productId'] as num?)?.toInt(),
|
||||
classSessions: (json['classSessions'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClassLinkProductCommandToJson(
|
||||
ClassLinkProductCommand instance) =>
|
||||
<String, dynamic>{
|
||||
'classId': instance.classId,
|
||||
'productId': instance.productId,
|
||||
'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
ClassListDto _$ClassListDtoFromJson(Map<String, dynamic> json) => ClassListDto(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
createdBy: (json['createdBy'] as num?)?.toInt(),
|
||||
@ -2678,6 +2719,7 @@ ClassListDto _$ClassListDtoFromJson(Map<String, dynamic> json) => ClassListDto(
|
||||
zoomMeetingId: json['zoomMeetingId'] as String?,
|
||||
zoomPassword: json['zoomPassword'] as String?,
|
||||
description: json['description'] as String?,
|
||||
allowRegistration: json['allowRegistration'] as bool?,
|
||||
zoomHostVideo: json['zoomHostVideo'] as bool?,
|
||||
zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
|
||||
zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
|
||||
@ -2696,6 +2738,11 @@ ClassListDto _$ClassListDtoFromJson(Map<String, dynamic> json) => ClassListDto(
|
||||
(e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
classProducts: (json['classProducts'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => ClassProductEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
countPupil: (json['countPupil'] as num?)?.toInt(),
|
||||
countExercise: (json['countExercise'] as num?)?.toInt(),
|
||||
countTest: (json['countTest'] as num?)?.toInt(),
|
||||
@ -2733,6 +2780,7 @@ Map<String, dynamic> _$ClassListDtoToJson(ClassListDto instance) =>
|
||||
'zoomMeetingId': instance.zoomMeetingId,
|
||||
'zoomPassword': instance.zoomPassword,
|
||||
'description': instance.description,
|
||||
'allowRegistration': instance.allowRegistration,
|
||||
'zoomHostVideo': instance.zoomHostVideo,
|
||||
'zoomParticipantVideo': instance.zoomParticipantVideo,
|
||||
'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
|
||||
@ -2741,6 +2789,7 @@ Map<String, dynamic> _$ClassListDtoToJson(ClassListDto instance) =>
|
||||
'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
|
||||
'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
|
||||
'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
|
||||
'classProducts': instance.classProducts?.map((e) => e.toJson()).toList(),
|
||||
'countPupil': instance.countPupil,
|
||||
'countExercise': instance.countExercise,
|
||||
'countTest': instance.countTest,
|
||||
@ -2846,6 +2895,54 @@ Map<String, dynamic> _$ClassListOfSchoolFilterToJson(
|
||||
'grade': instance.grade,
|
||||
};
|
||||
|
||||
ClassProductEntity _$ClassProductEntityFromJson(Map<String, dynamic> json) =>
|
||||
ClassProductEntity(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
createdBy: (json['createdBy'] as num?)?.toInt(),
|
||||
createdDate: json['createdDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['createdDate'] as String),
|
||||
lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
|
||||
lastModifiedDate: json['lastModifiedDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['lastModifiedDate'] as String),
|
||||
isDeleted: json['isDeleted'] as bool?,
|
||||
classId: (json['classId'] as num?)?.toInt(),
|
||||
productId: (json['productId'] as num?)?.toInt(),
|
||||
maxStudents: (json['maxStudents'] as num?)?.toInt(),
|
||||
startDate: json['startDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['startDate'] as String),
|
||||
endDate: json['endDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['endDate'] as String),
|
||||
status: classProductStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
zoomMeetingId: json['zoomMeetingId'] as String?,
|
||||
zoomPassword: json['zoomPassword'] as String?,
|
||||
description: json['description'] as String?,
|
||||
sortOrder: (json['sortOrder'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClassProductEntityToJson(ClassProductEntity instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'createdBy': instance.createdBy,
|
||||
'createdDate': instance.createdDate?.toIso8601String(),
|
||||
'lastModifiedBy': instance.lastModifiedBy,
|
||||
'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
|
||||
'isDeleted': instance.isDeleted,
|
||||
'classId': instance.classId,
|
||||
'productId': instance.productId,
|
||||
'maxStudents': instance.maxStudents,
|
||||
'startDate': instance.startDate?.toIso8601String(),
|
||||
'endDate': instance.endDate?.toIso8601String(),
|
||||
'status': classProductStatusEnumToJson(instance.status),
|
||||
'zoomMeetingId': instance.zoomMeetingId,
|
||||
'zoomPassword': instance.zoomPassword,
|
||||
'description': instance.description,
|
||||
'sortOrder': instance.sortOrder,
|
||||
};
|
||||
|
||||
ClassProgramTypeEntity _$ClassProgramTypeEntityFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ClassProgramTypeEntity(
|
||||
@ -3106,6 +3203,47 @@ Map<String, dynamic> _$ClassSessionEntityToJson(ClassSessionEntity instance) =>
|
||||
'attendances': instance.attendances?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
ClassSessionInfoDto _$ClassSessionInfoDtoFromJson(Map<String, dynamic> json) =>
|
||||
ClassSessionInfoDto(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
sessionNumber: (json['sessionNumber'] as num?)?.toInt(),
|
||||
sessionName: json['sessionName'] as String?,
|
||||
description: json['description'] as String?,
|
||||
startTime: json['startTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json['startTime'] as String),
|
||||
endTime: json['endTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json['endTime'] as String),
|
||||
zoomMeetingId: json['zoomMeetingId'] as String?,
|
||||
zoomJoinLink: json['zoomJoinLink'] as String?,
|
||||
zoomStartLink: json['zoomStartLink'] as String?,
|
||||
zoomPassword: json['zoomPassword'] as String?,
|
||||
recordingUrl: json['recordingUrl'] as String?,
|
||||
actualDurationMinutes: (json['actualDurationMinutes'] as num?)?.toInt(),
|
||||
status: sessionStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
notes: json['notes'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClassSessionInfoDtoToJson(
|
||||
ClassSessionInfoDto instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'sessionNumber': instance.sessionNumber,
|
||||
'sessionName': instance.sessionName,
|
||||
'description': instance.description,
|
||||
'startTime': instance.startTime?.toIso8601String(),
|
||||
'endTime': instance.endTime?.toIso8601String(),
|
||||
'zoomMeetingId': instance.zoomMeetingId,
|
||||
'zoomJoinLink': instance.zoomJoinLink,
|
||||
'zoomStartLink': instance.zoomStartLink,
|
||||
'zoomPassword': instance.zoomPassword,
|
||||
'recordingUrl': instance.recordingUrl,
|
||||
'actualDurationMinutes': instance.actualDurationMinutes,
|
||||
'status': sessionStatusEnumToJson(instance.status),
|
||||
'notes': instance.notes,
|
||||
};
|
||||
|
||||
ClassShortDto _$ClassShortDtoFromJson(Map<String, dynamic> json) =>
|
||||
ClassShortDto(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
@ -6973,6 +7111,10 @@ OrderDto _$OrderDtoFromJson(Map<String, dynamic> json) => OrderDto(
|
||||
address: json['address'] as String?,
|
||||
notes: json['notes'] as String?,
|
||||
totalAmount: (json['totalAmount'] as num?)?.toDouble(),
|
||||
paidDate: json['paidDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['paidDate'] as String),
|
||||
paymentLog: json['paymentLog'] as String?,
|
||||
status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => OrderItemDto.fromJson(e as Map<String, dynamic>))
|
||||
@ -6993,6 +7135,8 @@ Map<String, dynamic> _$OrderDtoToJson(OrderDto instance) => <String, dynamic>{
|
||||
'address': instance.address,
|
||||
'notes': instance.notes,
|
||||
'totalAmount': instance.totalAmount,
|
||||
'paidDate': instance.paidDate?.toIso8601String(),
|
||||
'paymentLog': instance.paymentLog,
|
||||
'status': orderStatusEnumToJson(instance.status),
|
||||
'items': instance.items?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
@ -7070,6 +7214,10 @@ OrderEntity _$OrderEntityFromJson(Map<String, dynamic> json) => OrderEntity(
|
||||
address: json['address'] as String?,
|
||||
notes: json['notes'] as String?,
|
||||
totalAmount: (json['totalAmount'] as num?)?.toDouble(),
|
||||
paidDate: json['paidDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['paidDate'] as String),
|
||||
paymentLog: json['paymentLog'] as String?,
|
||||
status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => OrderItemEntity.fromJson(e as Map<String, dynamic>))
|
||||
@ -7091,6 +7239,8 @@ Map<String, dynamic> _$OrderEntityToJson(OrderEntity instance) =>
|
||||
'address': instance.address,
|
||||
'notes': instance.notes,
|
||||
'totalAmount': instance.totalAmount,
|
||||
'paidDate': instance.paidDate?.toIso8601String(),
|
||||
'paymentLog': instance.paymentLog,
|
||||
'status': orderStatusEnumToJson(instance.status),
|
||||
'items': instance.items?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
@ -7211,6 +7361,85 @@ Map<String, dynamic> _$OrderItemEntityToJson(OrderItemEntity instance) =>
|
||||
'product': instance.product?.toJson(),
|
||||
};
|
||||
|
||||
OrderPaymentDto _$OrderPaymentDtoFromJson(Map<String, dynamic> json) =>
|
||||
OrderPaymentDto(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
createdBy: (json['createdBy'] as num?)?.toInt(),
|
||||
createdDate: json['createdDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['createdDate'] as String),
|
||||
lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
|
||||
lastModifiedDate: json['lastModifiedDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['lastModifiedDate'] as String),
|
||||
isDeleted: json['isDeleted'] as bool?,
|
||||
userId: (json['userId'] as num?)?.toInt(),
|
||||
fullName: json['fullName'] as String?,
|
||||
phone: json['phone'] as String?,
|
||||
address: json['address'] as String?,
|
||||
notes: json['notes'] as String?,
|
||||
totalAmount: (json['totalAmount'] as num?)?.toDouble(),
|
||||
paidDate: json['paidDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['paidDate'] as String),
|
||||
paymentLog: json['paymentLog'] as String?,
|
||||
status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => OrderItemEntity.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
bankName: json['bankName'] as String?,
|
||||
bankNumber: json['bankNumber'] as String?,
|
||||
accountName: json['accountName'] as String?,
|
||||
content: json['content'] as String?,
|
||||
gatewayUrl: json['gatewayUrl'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OrderPaymentDtoToJson(OrderPaymentDto instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'createdBy': instance.createdBy,
|
||||
'createdDate': instance.createdDate?.toIso8601String(),
|
||||
'lastModifiedBy': instance.lastModifiedBy,
|
||||
'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
|
||||
'isDeleted': instance.isDeleted,
|
||||
'userId': instance.userId,
|
||||
'fullName': instance.fullName,
|
||||
'phone': instance.phone,
|
||||
'address': instance.address,
|
||||
'notes': instance.notes,
|
||||
'totalAmount': instance.totalAmount,
|
||||
'paidDate': instance.paidDate?.toIso8601String(),
|
||||
'paymentLog': instance.paymentLog,
|
||||
'status': orderStatusEnumToJson(instance.status),
|
||||
'items': instance.items?.map((e) => e.toJson()).toList(),
|
||||
'bankName': instance.bankName,
|
||||
'bankNumber': instance.bankNumber,
|
||||
'accountName': instance.accountName,
|
||||
'content': instance.content,
|
||||
'gatewayUrl': instance.gatewayUrl,
|
||||
};
|
||||
|
||||
OrderPaymentDtoApiResponse _$OrderPaymentDtoApiResponseFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
OrderPaymentDtoApiResponse(
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: OrderPaymentDto.fromJson(json['data'] as Map<String, dynamic>),
|
||||
message: json['message'] as String?,
|
||||
success: json['success'] as bool?,
|
||||
code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OrderPaymentDtoApiResponseToJson(
|
||||
OrderPaymentDtoApiResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data?.toJson(),
|
||||
'message': instance.message,
|
||||
'success': instance.success,
|
||||
'code': errorCodeEnumToJson(instance.code),
|
||||
};
|
||||
|
||||
OrderUpdateDto _$OrderUpdateDtoFromJson(Map<String, dynamic> json) =>
|
||||
OrderUpdateDto(
|
||||
status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
|
||||
@ -7685,6 +7914,10 @@ ProductLessonDetailDto _$ProductLessonDetailDtoFromJson(
|
||||
content: json['content'] as String?,
|
||||
sortOrder: (json['sortOrder'] as num?)?.toInt(),
|
||||
isFree: json['isFree'] as bool?,
|
||||
classSession: json['classSession'] == null
|
||||
? null
|
||||
: ClassSessionInfoDto.fromJson(
|
||||
json['classSession'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ProductLessonDetailDtoToJson(
|
||||
@ -7703,6 +7936,7 @@ Map<String, dynamic> _$ProductLessonDetailDtoToJson(
|
||||
'content': instance.content,
|
||||
'sortOrder': instance.sortOrder,
|
||||
'isFree': instance.isFree,
|
||||
'classSession': instance.classSession?.toJson(),
|
||||
};
|
||||
|
||||
ProductLessonEntity _$ProductLessonEntityFromJson(Map<String, dynamic> json) =>
|
||||
@ -8988,12 +9222,14 @@ RefreshTokenResponseDto _$RefreshTokenResponseDtoFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
RefreshTokenResponseDto(
|
||||
token: json['token'] as String?,
|
||||
refreshToken: json['refreshToken'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RefreshTokenResponseDtoToJson(
|
||||
RefreshTokenResponseDto instance) =>
|
||||
<String, dynamic>{
|
||||
'token': instance.token,
|
||||
'refreshToken': instance.refreshToken,
|
||||
};
|
||||
|
||||
RefreshTokenResponseDtoApiResponse _$RefreshTokenResponseDtoApiResponseFromJson(
|
||||
@ -9772,6 +10008,35 @@ Map<String, dynamic> _$SchoolStaticCountDtoApiResponseToJson(
|
||||
'code': errorCodeEnumToJson(instance.code),
|
||||
};
|
||||
|
||||
SePayNotifyResource _$SePayNotifyResourceFromJson(Map<String, dynamic> json) =>
|
||||
SePayNotifyResource(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
gateway: json['gateway'] as String?,
|
||||
transactionDate: json['transactionDate'] as String?,
|
||||
accountNumber: json['accountNumber'] as String?,
|
||||
code: json['code'] as String?,
|
||||
content: json['content'] as String?,
|
||||
transferType: json['transferType'] as String?,
|
||||
transferAmount: (json['transferAmount'] as num?)?.toInt(),
|
||||
referenceCode: json['referenceCode'] as String?,
|
||||
description: json['description'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SePayNotifyResourceToJson(
|
||||
SePayNotifyResource instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'gateway': instance.gateway,
|
||||
'transactionDate': instance.transactionDate,
|
||||
'accountNumber': instance.accountNumber,
|
||||
'code': instance.code,
|
||||
'content': instance.content,
|
||||
'transferType': instance.transferType,
|
||||
'transferAmount': instance.transferAmount,
|
||||
'referenceCode': instance.referenceCode,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
SessionAttendanceEntity _$SessionAttendanceEntityFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
SessionAttendanceEntity(
|
||||
|
||||
@ -77,7 +77,7 @@ class UserUseCases {
|
||||
final result = await _hraRepository.accountRefreshToken(
|
||||
RefreshTokenRequestDto(refreshToken: LocalStoreManager.getString(StorageKey.refreshToken)));
|
||||
if (result.data != null) {
|
||||
await saveToken(result.data?.token ?? '');
|
||||
await saveToken(result.data?.token ?? '', refreshToken: result.data?.refreshToken ?? '');
|
||||
}
|
||||
return Right<String, bool>(result.success ?? false);
|
||||
} catch (ex) {
|
||||
@ -104,7 +104,7 @@ class UserUseCases {
|
||||
final RefreshTokenResponseDtoApiResponse? token =
|
||||
await HraRepository(Dio(), baseUrl: ApiPath.hra).accountRefreshToken(requestModel);
|
||||
if (token != null) {
|
||||
await saveToken(token.data?.token ?? '');
|
||||
await saveToken(token.data?.token ?? '', refreshToken: token.data?.refreshToken ?? '');
|
||||
}
|
||||
|
||||
return token != null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user