|
@@ -50,16 +50,19 @@ enum LabelTypeEnum {
|
|
|
class LabelLanguageConfigDTO {
|
|
|
String? name;
|
|
|
String? languageCode;
|
|
|
+ bool isShow;
|
|
|
|
|
|
LabelLanguageConfigDTO({
|
|
|
this.name,
|
|
|
this.languageCode,
|
|
|
+ this.isShow = false,
|
|
|
});
|
|
|
|
|
|
factory LabelLanguageConfigDTO.fromJson(Map<String, dynamic> map) {
|
|
|
return LabelLanguageConfigDTO(
|
|
|
name: map['Name'],
|
|
|
languageCode: map['LanguageCode'],
|
|
|
+ isShow: map['IsShow'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -71,12 +74,14 @@ class LabelLanguageConfigDTO {
|
|
|
if (languageCode != null) {
|
|
|
map['LanguageCode'] = languageCode;
|
|
|
}
|
|
|
+ map['IsShow'] = isShow;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
class CourseLabelDTO extends BaseLabelInfoDTO{
|
|
|
String? languageCode;
|
|
|
+ bool isShow;
|
|
|
LabelTypeEnum type;
|
|
|
OrganizationPatientTypeEnum useObjectType;
|
|
|
bool isLastLevel;
|
|
@@ -85,6 +90,7 @@ class CourseLabelDTO extends BaseLabelInfoDTO{
|
|
|
|
|
|
CourseLabelDTO({
|
|
|
this.languageCode,
|
|
|
+ this.isShow = false,
|
|
|
this.type = LabelTypeEnum.Unknown,
|
|
|
this.useObjectType = OrganizationPatientTypeEnum.Person,
|
|
|
this.isLastLevel = false,
|
|
@@ -106,6 +112,7 @@ class CourseLabelDTO extends BaseLabelInfoDTO{
|
|
|
factory CourseLabelDTO.fromJson(Map<String, dynamic> map) {
|
|
|
return CourseLabelDTO(
|
|
|
languageCode: map['LanguageCode'],
|
|
|
+ isShow: map['IsShow'],
|
|
|
type: LabelTypeEnum.values.firstWhere((e) => e.index == map['Type']),
|
|
|
useObjectType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['UseObjectType']),
|
|
|
isLastLevel: map['IsLastLevel'],
|
|
@@ -123,6 +130,7 @@ class CourseLabelDTO extends BaseLabelInfoDTO{
|
|
|
final map = super.toJson();
|
|
|
if (languageCode != null)
|
|
|
map['LanguageCode'] = languageCode;
|
|
|
+ map['IsShow'] = isShow;
|
|
|
map['Type'] = type.index;
|
|
|
map['UseObjectType'] = useObjectType.index;
|
|
|
map['IsLastLevel'] = isLastLevel;
|
|
@@ -214,6 +222,7 @@ class ApplyCourseRequest extends TokenRequest{
|
|
|
bool isAgentCourse;
|
|
|
List<String>? courseAlbumCodes;
|
|
|
CourseAppearTypeEnum courseAppearType;
|
|
|
+ bool isJustVideoCourse;
|
|
|
|
|
|
ApplyCourseRequest({
|
|
|
this.name,
|
|
@@ -238,6 +247,7 @@ class ApplyCourseRequest extends TokenRequest{
|
|
|
this.isAgentCourse = false,
|
|
|
this.courseAlbumCodes,
|
|
|
this.courseAppearType = CourseAppearTypeEnum.Unknown,
|
|
|
+ this.isJustVideoCourse = false,
|
|
|
String? token,
|
|
|
}) : super(
|
|
|
token: token,
|
|
@@ -267,6 +277,7 @@ class ApplyCourseRequest extends TokenRequest{
|
|
|
isAgentCourse: map['IsAgentCourse'],
|
|
|
courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
|
|
|
courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
|
|
|
+ isJustVideoCourse: map['IsJustVideoCourse'],
|
|
|
token: map['Token'],
|
|
|
);
|
|
|
}
|
|
@@ -310,6 +321,7 @@ class ApplyCourseRequest extends TokenRequest{
|
|
|
if (courseAlbumCodes != null)
|
|
|
map['CourseAlbumCodes'] = courseAlbumCodes;
|
|
|
map['CourseAppearType'] = courseAppearType.index;
|
|
|
+ map['IsJustVideoCourse'] = isJustVideoCourse;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -691,6 +703,7 @@ class BaseCourseInfoDTO {
|
|
|
String? creatorCode;
|
|
|
String? organizationCode;
|
|
|
DateTime? createTime;
|
|
|
+ DateTime? updateTime;
|
|
|
double price;
|
|
|
List<String>? courseLabelCodes;
|
|
|
List<String>? caseLabelCodes;
|
|
@@ -712,6 +725,9 @@ class BaseCourseInfoDTO {
|
|
|
LiveDataDTO? courseChannel;
|
|
|
LiveDataDTO? othersScreenSharingChannel;
|
|
|
ScreenSharingChannelDTO? rtcScreenSharingChannel;
|
|
|
+ String? languageCode;
|
|
|
+ bool isJustVideoCourse;
|
|
|
+ bool isProhibition;
|
|
|
|
|
|
BaseCourseInfoDTO({
|
|
|
this.code,
|
|
@@ -732,6 +748,7 @@ class BaseCourseInfoDTO {
|
|
|
this.creatorCode,
|
|
|
this.organizationCode,
|
|
|
this.createTime,
|
|
|
+ this.updateTime,
|
|
|
this.price = 0,
|
|
|
this.courseLabelCodes,
|
|
|
this.caseLabelCodes,
|
|
@@ -753,6 +770,9 @@ class BaseCourseInfoDTO {
|
|
|
this.courseChannel,
|
|
|
this.othersScreenSharingChannel,
|
|
|
this.rtcScreenSharingChannel,
|
|
|
+ this.languageCode,
|
|
|
+ this.isJustVideoCourse = false,
|
|
|
+ this.isProhibition = false,
|
|
|
});
|
|
|
|
|
|
factory BaseCourseInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
@@ -775,6 +795,7 @@ class BaseCourseInfoDTO {
|
|
|
creatorCode: map['CreatorCode'],
|
|
|
organizationCode: map['OrganizationCode'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
price: double.parse(map['Price'].toString()),
|
|
|
courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
|
|
|
caseLabelCodes: map['CaseLabelCodes']?.cast<String>().toList(),
|
|
@@ -796,6 +817,9 @@ class BaseCourseInfoDTO {
|
|
|
courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
|
|
|
othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
|
|
|
rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
+ isJustVideoCourse: map['IsJustVideoCourse'],
|
|
|
+ isProhibition: map['IsProhibition'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -845,6 +869,9 @@ class BaseCourseInfoDTO {
|
|
|
if (createTime != null) {
|
|
|
map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
}
|
|
|
+ if (updateTime != null) {
|
|
|
+ map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
+ }
|
|
|
map['Price'] = price;
|
|
|
if (courseLabelCodes != null) {
|
|
|
map['CourseLabelCodes'] = courseLabelCodes;
|
|
@@ -892,6 +919,11 @@ class BaseCourseInfoDTO {
|
|
|
if (rtcScreenSharingChannel != null) {
|
|
|
map['RtcScreenSharingChannel'] = rtcScreenSharingChannel;
|
|
|
}
|
|
|
+ if (languageCode != null) {
|
|
|
+ map['LanguageCode'] = languageCode;
|
|
|
+ }
|
|
|
+ map['IsJustVideoCourse'] = isJustVideoCourse;
|
|
|
+ map['IsProhibition'] = isProhibition;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -900,11 +932,13 @@ class BaseUserGroupDTO extends BaseDTO{
|
|
|
String? code;
|
|
|
String? name;
|
|
|
String? shortCode;
|
|
|
+ String? description;
|
|
|
|
|
|
BaseUserGroupDTO({
|
|
|
this.code,
|
|
|
this.name,
|
|
|
this.shortCode,
|
|
|
+ this.description,
|
|
|
DateTime? createTime,
|
|
|
DateTime? updateTime,
|
|
|
}) : super(
|
|
@@ -917,6 +951,7 @@ class BaseUserGroupDTO extends BaseDTO{
|
|
|
code: map['Code'],
|
|
|
name: map['Name'],
|
|
|
shortCode: map['ShortCode'],
|
|
|
+ description: map['Description'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
);
|
|
@@ -930,6 +965,8 @@ class BaseUserGroupDTO extends BaseDTO{
|
|
|
map['Name'] = name;
|
|
|
if (shortCode != null)
|
|
|
map['ShortCode'] = shortCode;
|
|
|
+ if (description != null)
|
|
|
+ map['Description'] = description;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -982,6 +1019,12 @@ class VideoInfoDTO {
|
|
|
CourseViewRangeEnum viewRange;
|
|
|
int playCount;
|
|
|
String? srcFileToken;
|
|
|
+ String? intro;
|
|
|
+ bool autoCreateCourse;
|
|
|
+ List<String>? userGroupCodes;
|
|
|
+ List<String>? courseLabelCodes;
|
|
|
+ CourseAudienceTypeEnum audienceType;
|
|
|
+ bool isAdminCreated;
|
|
|
|
|
|
VideoInfoDTO({
|
|
|
this.code,
|
|
@@ -999,6 +1042,12 @@ class VideoInfoDTO {
|
|
|
this.viewRange = CourseViewRangeEnum.All,
|
|
|
this.playCount = 0,
|
|
|
this.srcFileToken,
|
|
|
+ this.intro,
|
|
|
+ this.autoCreateCourse = false,
|
|
|
+ this.userGroupCodes,
|
|
|
+ this.courseLabelCodes,
|
|
|
+ this.audienceType = CourseAudienceTypeEnum.Unknown,
|
|
|
+ this.isAdminCreated = false,
|
|
|
});
|
|
|
|
|
|
factory VideoInfoDTO.fromJson(Map<String, dynamic> map) {
|
|
@@ -1018,6 +1067,12 @@ class VideoInfoDTO {
|
|
|
viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
|
|
|
playCount: map['PlayCount'],
|
|
|
srcFileToken: map['SrcFileToken'],
|
|
|
+ intro: map['Intro'],
|
|
|
+ autoCreateCourse: map['AutoCreateCourse'],
|
|
|
+ userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
|
|
|
+ courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
|
|
|
+ audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
|
|
|
+ isAdminCreated: map['IsAdminCreated'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1056,6 +1111,18 @@ class VideoInfoDTO {
|
|
|
if (srcFileToken != null) {
|
|
|
map['SrcFileToken'] = srcFileToken;
|
|
|
}
|
|
|
+ if (intro != null) {
|
|
|
+ map['Intro'] = intro;
|
|
|
+ }
|
|
|
+ map['AutoCreateCourse'] = autoCreateCourse;
|
|
|
+ if (userGroupCodes != null) {
|
|
|
+ map['UserGroupCodes'] = userGroupCodes;
|
|
|
+ }
|
|
|
+ if (courseLabelCodes != null) {
|
|
|
+ map['CourseLabelCodes'] = courseLabelCodes;
|
|
|
+ }
|
|
|
+ map['AudienceType'] = audienceType.index;
|
|
|
+ map['IsAdminCreated'] = isAdminCreated;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1135,6 +1202,7 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
String? creatorCode,
|
|
|
String? organizationCode,
|
|
|
DateTime? createTime,
|
|
|
+ DateTime? updateTime,
|
|
|
double price = 0,
|
|
|
List<String>? courseLabelCodes,
|
|
|
List<String>? caseLabelCodes,
|
|
@@ -1156,6 +1224,9 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
LiveDataDTO? courseChannel,
|
|
|
LiveDataDTO? othersScreenSharingChannel,
|
|
|
ScreenSharingChannelDTO? rtcScreenSharingChannel,
|
|
|
+ String? languageCode,
|
|
|
+ bool isJustVideoCourse = false,
|
|
|
+ bool isProhibition = false,
|
|
|
}) : super(
|
|
|
code: code,
|
|
|
name: name,
|
|
@@ -1175,6 +1246,7 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
creatorCode: creatorCode,
|
|
|
organizationCode: organizationCode,
|
|
|
createTime: createTime,
|
|
|
+ updateTime: updateTime,
|
|
|
price: price,
|
|
|
courseLabelCodes: courseLabelCodes,
|
|
|
caseLabelCodes: caseLabelCodes,
|
|
@@ -1196,6 +1268,9 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
courseChannel: courseChannel,
|
|
|
othersScreenSharingChannel: othersScreenSharingChannel,
|
|
|
rtcScreenSharingChannel: rtcScreenSharingChannel,
|
|
|
+ languageCode: languageCode,
|
|
|
+ isJustVideoCourse: isJustVideoCourse,
|
|
|
+ isProhibition: isProhibition,
|
|
|
);
|
|
|
|
|
|
factory CourseInfoDetailDTO.fromJson(Map<String, dynamic> map) {
|
|
@@ -1231,6 +1306,7 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
creatorCode: map['CreatorCode'],
|
|
|
organizationCode: map['OrganizationCode'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
price: double.parse(map['Price'].toString()),
|
|
|
courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
|
|
|
caseLabelCodes: map['CaseLabelCodes']?.cast<String>().toList(),
|
|
@@ -1252,6 +1328,9 @@ class CourseInfoDetailDTO extends BaseCourseInfoDTO{
|
|
|
courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
|
|
|
othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
|
|
|
rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
+ isJustVideoCourse: map['IsJustVideoCourse'],
|
|
|
+ isProhibition: map['IsProhibition'],
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1288,6 +1367,12 @@ enum QueryCourseApprovalStatusEnum {
|
|
|
Approved,
|
|
|
}
|
|
|
|
|
|
+enum QueryCourseTypeEnum {
|
|
|
+ All,
|
|
|
+ LiveCourse,
|
|
|
+ VideoCourse,
|
|
|
+}
|
|
|
+
|
|
|
class FindCoursePagesRequest extends PageRequest{
|
|
|
String? keyword;
|
|
|
List<String>? courseLabels;
|
|
@@ -1297,7 +1382,7 @@ class FindCoursePagesRequest extends PageRequest{
|
|
|
String? participantCode;
|
|
|
String? languageCode;
|
|
|
QueryCourseApprovalStatusEnum courseApprovalStatus;
|
|
|
- bool justPastVideo;
|
|
|
+ QueryCourseTypeEnum queryCourseType;
|
|
|
|
|
|
FindCoursePagesRequest({
|
|
|
this.keyword,
|
|
@@ -1308,7 +1393,7 @@ class FindCoursePagesRequest extends PageRequest{
|
|
|
this.participantCode,
|
|
|
this.languageCode,
|
|
|
this.courseApprovalStatus = QueryCourseApprovalStatusEnum.All,
|
|
|
- this.justPastVideo = false,
|
|
|
+ this.queryCourseType = QueryCourseTypeEnum.All,
|
|
|
int pageIndex = 0,
|
|
|
int pageSize = 0,
|
|
|
String? token,
|
|
@@ -1328,7 +1413,7 @@ class FindCoursePagesRequest extends PageRequest{
|
|
|
participantCode: map['ParticipantCode'],
|
|
|
languageCode: map['LanguageCode'],
|
|
|
courseApprovalStatus: QueryCourseApprovalStatusEnum.values.firstWhere((e) => e.index == map['CourseApprovalStatus']),
|
|
|
- justPastVideo: map['JustPastVideo'],
|
|
|
+ queryCourseType: QueryCourseTypeEnum.values.firstWhere((e) => e.index == map['QueryCourseType']),
|
|
|
pageIndex: map['PageIndex'],
|
|
|
pageSize: map['PageSize'],
|
|
|
token: map['Token'],
|
|
@@ -1352,7 +1437,7 @@ class FindCoursePagesRequest extends PageRequest{
|
|
|
if (languageCode != null)
|
|
|
map['LanguageCode'] = languageCode;
|
|
|
map['CourseApprovalStatus'] = courseApprovalStatus.index;
|
|
|
- map['JustPastVideo'] = justPastVideo;
|
|
|
+ map['QueryCourseType'] = queryCourseType.index;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1406,6 +1491,7 @@ class UpdateCourseRequest extends TokenRequest{
|
|
|
List<String>? courseAlbumCodes;
|
|
|
CourseAppearTypeEnum courseAppearType;
|
|
|
List<String>? courseMaterialCodes;
|
|
|
+ bool isJustVideoCourse;
|
|
|
|
|
|
UpdateCourseRequest({
|
|
|
this.code,
|
|
@@ -1431,6 +1517,7 @@ class UpdateCourseRequest extends TokenRequest{
|
|
|
this.courseAlbumCodes,
|
|
|
this.courseAppearType = CourseAppearTypeEnum.Unknown,
|
|
|
this.courseMaterialCodes,
|
|
|
+ this.isJustVideoCourse = false,
|
|
|
String? token,
|
|
|
}) : super(
|
|
|
token: token,
|
|
@@ -1461,6 +1548,7 @@ class UpdateCourseRequest extends TokenRequest{
|
|
|
courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
|
|
|
courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
|
|
|
courseMaterialCodes: map['CourseMaterialCodes']?.cast<String>().toList(),
|
|
|
+ isJustVideoCourse: map['IsJustVideoCourse'],
|
|
|
token: map['Token'],
|
|
|
);
|
|
|
}
|
|
@@ -1506,6 +1594,7 @@ class UpdateCourseRequest extends TokenRequest{
|
|
|
map['CourseAppearType'] = courseAppearType.index;
|
|
|
if (courseMaterialCodes != null)
|
|
|
map['CourseMaterialCodes'] = courseMaterialCodes;
|
|
|
+ map['IsJustVideoCourse'] = isJustVideoCourse;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1585,8 +1674,10 @@ class CourseAlbumDTO extends BaseCourseAlbumDTO{
|
|
|
CourseViewRangeEnum viewRange;
|
|
|
double price;
|
|
|
DateTime? createTime;
|
|
|
+ DateTime? updateTime;
|
|
|
int sort;
|
|
|
bool isStick;
|
|
|
+ String? languageCode;
|
|
|
|
|
|
CourseAlbumDTO({
|
|
|
this.cover,
|
|
@@ -1598,8 +1689,10 @@ class CourseAlbumDTO extends BaseCourseAlbumDTO{
|
|
|
this.viewRange = CourseViewRangeEnum.All,
|
|
|
this.price = 0,
|
|
|
this.createTime,
|
|
|
+ this.updateTime,
|
|
|
this.sort = 0,
|
|
|
this.isStick = false,
|
|
|
+ this.languageCode,
|
|
|
String? code,
|
|
|
String? name,
|
|
|
}) : super(
|
|
@@ -1618,8 +1711,10 @@ class CourseAlbumDTO extends BaseCourseAlbumDTO{
|
|
|
viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
|
|
|
price: double.parse(map['Price'].toString()),
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
sort: map['Sort'],
|
|
|
isStick: map['IsStick'],
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
code: map['Code'],
|
|
|
name: map['Name'],
|
|
|
);
|
|
@@ -1643,8 +1738,12 @@ class CourseAlbumDTO extends BaseCourseAlbumDTO{
|
|
|
map['Price'] = price;
|
|
|
if (createTime != null)
|
|
|
map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
+ if (updateTime != null)
|
|
|
+ map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
map['Sort'] = sort;
|
|
|
map['IsStick'] = isStick;
|
|
|
+ if (languageCode != null)
|
|
|
+ map['LanguageCode'] = languageCode;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -1686,12 +1785,14 @@ class UserGroupDTO extends BaseUserGroupDTO{
|
|
|
String? code,
|
|
|
String? name,
|
|
|
String? shortCode,
|
|
|
+ String? description,
|
|
|
DateTime? createTime,
|
|
|
DateTime? updateTime,
|
|
|
}) : super(
|
|
|
code: code,
|
|
|
name: name,
|
|
|
shortCode: shortCode,
|
|
|
+ description: description,
|
|
|
createTime: createTime,
|
|
|
updateTime: updateTime,
|
|
|
);
|
|
@@ -1714,6 +1815,7 @@ class UserGroupDTO extends BaseUserGroupDTO{
|
|
|
code: map['Code'],
|
|
|
name: map['Name'],
|
|
|
shortCode: map['ShortCode'],
|
|
|
+ description: map['Description'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
);
|
|
@@ -1896,6 +1998,11 @@ class SaveVideoRequest extends TokenRequest{
|
|
|
UploadFileTypeEnum fodderType;
|
|
|
bool isPublic;
|
|
|
CourseViewRangeEnum viewRange;
|
|
|
+ CourseAudienceTypeEnum audienceType;
|
|
|
+ bool autoCreateCourse;
|
|
|
+ List<String>? courseLabelCodes;
|
|
|
+ List<String>? userGroupCodes;
|
|
|
+ String? intro;
|
|
|
|
|
|
SaveVideoRequest({
|
|
|
this.courseCode,
|
|
@@ -1912,6 +2019,11 @@ class SaveVideoRequest extends TokenRequest{
|
|
|
this.fodderType = UploadFileTypeEnum.Unknown,
|
|
|
this.isPublic = false,
|
|
|
this.viewRange = CourseViewRangeEnum.All,
|
|
|
+ this.audienceType = CourseAudienceTypeEnum.Unknown,
|
|
|
+ this.autoCreateCourse = false,
|
|
|
+ this.courseLabelCodes,
|
|
|
+ this.userGroupCodes,
|
|
|
+ this.intro,
|
|
|
String? token,
|
|
|
}) : super(
|
|
|
token: token,
|
|
@@ -1933,6 +2045,11 @@ class SaveVideoRequest extends TokenRequest{
|
|
|
fodderType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FodderType']),
|
|
|
isPublic: map['IsPublic'],
|
|
|
viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
|
|
|
+ audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
|
|
|
+ autoCreateCourse: map['AutoCreateCourse'],
|
|
|
+ courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
|
|
|
+ userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
|
|
|
+ intro: map['Intro'],
|
|
|
token: map['Token'],
|
|
|
);
|
|
|
}
|
|
@@ -1961,6 +2078,14 @@ class SaveVideoRequest extends TokenRequest{
|
|
|
map['FodderType'] = fodderType.index;
|
|
|
map['IsPublic'] = isPublic;
|
|
|
map['ViewRange'] = viewRange.index;
|
|
|
+ map['AudienceType'] = audienceType.index;
|
|
|
+ map['AutoCreateCourse'] = autoCreateCourse;
|
|
|
+ if (courseLabelCodes != null)
|
|
|
+ map['CourseLabelCodes'] = courseLabelCodes;
|
|
|
+ if (userGroupCodes != null)
|
|
|
+ map['UserGroupCodes'] = userGroupCodes;
|
|
|
+ if (intro != null)
|
|
|
+ map['Intro'] = intro;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -3473,6 +3598,7 @@ class AddCourseAlbumRequest extends TokenRequest{
|
|
|
String? teacherName;
|
|
|
CourseViewRangeEnum viewRange;
|
|
|
double price;
|
|
|
+ String? languageCode;
|
|
|
|
|
|
AddCourseAlbumRequest({
|
|
|
this.name,
|
|
@@ -3486,6 +3612,7 @@ class AddCourseAlbumRequest extends TokenRequest{
|
|
|
this.teacherName,
|
|
|
this.viewRange = CourseViewRangeEnum.All,
|
|
|
this.price = 0,
|
|
|
+ this.languageCode,
|
|
|
String? token,
|
|
|
}) : super(
|
|
|
token: token,
|
|
@@ -3504,6 +3631,7 @@ class AddCourseAlbumRequest extends TokenRequest{
|
|
|
teacherName: map['TeacherName'],
|
|
|
viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
|
|
|
price: double.parse(map['Price'].toString()),
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
token: map['Token'],
|
|
|
);
|
|
|
}
|
|
@@ -3528,6 +3656,8 @@ class AddCourseAlbumRequest extends TokenRequest{
|
|
|
map['TeacherName'] = teacherName;
|
|
|
map['ViewRange'] = viewRange.index;
|
|
|
map['Price'] = price;
|
|
|
+ if (languageCode != null)
|
|
|
+ map['LanguageCode'] = languageCode;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -3568,6 +3698,7 @@ class CourseCommonInfoDTO extends BaseCourseAlbumDTO{
|
|
|
StudentCourseStatusEnum signCourseStatus;
|
|
|
bool isPay;
|
|
|
DateTime? createTime;
|
|
|
+ DateTime? updateTime;
|
|
|
|
|
|
CourseCommonInfoDTO({
|
|
|
this.cover,
|
|
@@ -3583,6 +3714,7 @@ class CourseCommonInfoDTO extends BaseCourseAlbumDTO{
|
|
|
this.signCourseStatus = StudentCourseStatusEnum.All,
|
|
|
this.isPay = false,
|
|
|
this.createTime,
|
|
|
+ this.updateTime,
|
|
|
String? code,
|
|
|
String? name,
|
|
|
}) : super(
|
|
@@ -3605,6 +3737,7 @@ class CourseCommonInfoDTO extends BaseCourseAlbumDTO{
|
|
|
signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
|
|
|
isPay: map['IsPay'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
code: map['Code'],
|
|
|
name: map['Name'],
|
|
|
);
|
|
@@ -3633,6 +3766,8 @@ class CourseCommonInfoDTO extends BaseCourseAlbumDTO{
|
|
|
map['IsPay'] = isPay;
|
|
|
if (createTime != null)
|
|
|
map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
+ if (updateTime != null)
|
|
|
+ map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -3967,6 +4102,7 @@ class GetUserPagesRequest extends PageRequest{
|
|
|
String? queryState;
|
|
|
List<String>? excludeUserCodes;
|
|
|
String? languageCode;
|
|
|
+ String? userCode;
|
|
|
List<String>? roleCodes;
|
|
|
bool? isAgent;
|
|
|
|
|
@@ -3976,6 +4112,7 @@ class GetUserPagesRequest extends PageRequest{
|
|
|
this.queryState,
|
|
|
this.excludeUserCodes,
|
|
|
this.languageCode,
|
|
|
+ this.userCode,
|
|
|
this.roleCodes,
|
|
|
this.isAgent,
|
|
|
int pageIndex = 0,
|
|
@@ -3994,6 +4131,7 @@ class GetUserPagesRequest extends PageRequest{
|
|
|
queryState: map['QueryState'],
|
|
|
excludeUserCodes: map['ExcludeUserCodes']?.cast<String>().toList(),
|
|
|
languageCode: map['LanguageCode'],
|
|
|
+ userCode: map['UserCode'],
|
|
|
roleCodes: map['RoleCodes']?.cast<String>().toList(),
|
|
|
isAgent: map['IsAgent'],
|
|
|
pageIndex: map['PageIndex'],
|
|
@@ -4014,6 +4152,8 @@ class GetUserPagesRequest extends PageRequest{
|
|
|
map['ExcludeUserCodes'] = excludeUserCodes;
|
|
|
if (languageCode != null)
|
|
|
map['LanguageCode'] = languageCode;
|
|
|
+ if (userCode != null)
|
|
|
+ map['UserCode'] = userCode;
|
|
|
if (roleCodes != null)
|
|
|
map['RoleCodes'] = roleCodes;
|
|
|
if (isAgent != null)
|
|
@@ -4186,6 +4326,7 @@ class UpdateCourseAlbumRequest extends TokenRequest{
|
|
|
String? teacherName;
|
|
|
CourseViewRangeEnum viewRange;
|
|
|
double price;
|
|
|
+ String? languageCode;
|
|
|
|
|
|
UpdateCourseAlbumRequest({
|
|
|
this.name,
|
|
@@ -4200,6 +4341,7 @@ class UpdateCourseAlbumRequest extends TokenRequest{
|
|
|
this.teacherName,
|
|
|
this.viewRange = CourseViewRangeEnum.All,
|
|
|
this.price = 0,
|
|
|
+ this.languageCode,
|
|
|
String? token,
|
|
|
}) : super(
|
|
|
token: token,
|
|
@@ -4219,6 +4361,7 @@ class UpdateCourseAlbumRequest extends TokenRequest{
|
|
|
teacherName: map['TeacherName'],
|
|
|
viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
|
|
|
price: double.parse(map['Price'].toString()),
|
|
|
+ languageCode: map['LanguageCode'],
|
|
|
token: map['Token'],
|
|
|
);
|
|
|
}
|
|
@@ -4245,6 +4388,8 @@ class UpdateCourseAlbumRequest extends TokenRequest{
|
|
|
map['TeacherName'] = teacherName;
|
|
|
map['ViewRange'] = viewRange.index;
|
|
|
map['Price'] = price;
|
|
|
+ if (languageCode != null)
|
|
|
+ map['LanguageCode'] = languageCode;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -4304,4 +4449,265 @@ class AddCoursePlayCountRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+enum BrowsedUserTypeEnum {
|
|
|
+ Teacher,
|
|
|
+ Assistant,
|
|
|
+ Guesting,
|
|
|
+ Student,
|
|
|
+ Visitor,
|
|
|
+}
|
|
|
+
|
|
|
+class CourseBrowsedRecordRequest extends TokenRequest{
|
|
|
+ String? relevanceCode;
|
|
|
+ String? userCode;
|
|
|
+ String? displayName;
|
|
|
+ String? fromPlatform;
|
|
|
+ bool isOnline;
|
|
|
+ BrowsedUserTypeEnum browsedUserType;
|
|
|
+
|
|
|
+ CourseBrowsedRecordRequest({
|
|
|
+ this.relevanceCode,
|
|
|
+ this.userCode,
|
|
|
+ this.displayName,
|
|
|
+ this.fromPlatform,
|
|
|
+ this.isOnline = false,
|
|
|
+ this.browsedUserType = BrowsedUserTypeEnum.Teacher,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CourseBrowsedRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CourseBrowsedRecordRequest(
|
|
|
+ relevanceCode: map['RelevanceCode'],
|
|
|
+ userCode: map['UserCode'],
|
|
|
+ displayName: map['DisplayName'],
|
|
|
+ fromPlatform: map['FromPlatform'],
|
|
|
+ isOnline: map['IsOnline'],
|
|
|
+ browsedUserType: BrowsedUserTypeEnum.values.firstWhere((e) => e.index == map['BrowsedUserType']),
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if (relevanceCode != null)
|
|
|
+ map['RelevanceCode'] = relevanceCode;
|
|
|
+ if (userCode != null)
|
|
|
+ map['UserCode'] = userCode;
|
|
|
+ if (displayName != null)
|
|
|
+ map['DisplayName'] = displayName;
|
|
|
+ if (fromPlatform != null)
|
|
|
+ map['FromPlatform'] = fromPlatform;
|
|
|
+ map['IsOnline'] = isOnline;
|
|
|
+ map['BrowsedUserType'] = browsedUserType.index;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CourseBrowsedRecordDTO {
|
|
|
+ String? courseBrowsedRecordCode;
|
|
|
+ String? relevanceCode;
|
|
|
+ String? userCode;
|
|
|
+ String? displayName;
|
|
|
+ String? fromPlatform;
|
|
|
+ int browsedCount;
|
|
|
+ bool isOnline;
|
|
|
+ BrowsedUserTypeEnum browsedUserType;
|
|
|
+ DateTime? createTime;
|
|
|
+ DateTime? updateTime;
|
|
|
+ String? avatar;
|
|
|
+
|
|
|
+ CourseBrowsedRecordDTO({
|
|
|
+ this.courseBrowsedRecordCode,
|
|
|
+ this.relevanceCode,
|
|
|
+ this.userCode,
|
|
|
+ this.displayName,
|
|
|
+ this.fromPlatform,
|
|
|
+ this.browsedCount = 0,
|
|
|
+ this.isOnline = false,
|
|
|
+ this.browsedUserType = BrowsedUserTypeEnum.Teacher,
|
|
|
+ this.createTime,
|
|
|
+ this.updateTime,
|
|
|
+ this.avatar,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory CourseBrowsedRecordDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CourseBrowsedRecordDTO(
|
|
|
+ courseBrowsedRecordCode: map['CourseBrowsedRecordCode'],
|
|
|
+ relevanceCode: map['RelevanceCode'],
|
|
|
+ userCode: map['UserCode'],
|
|
|
+ displayName: map['DisplayName'],
|
|
|
+ fromPlatform: map['FromPlatform'],
|
|
|
+ browsedCount: map['BrowsedCount'],
|
|
|
+ isOnline: map['IsOnline'],
|
|
|
+ browsedUserType: BrowsedUserTypeEnum.values.firstWhere((e) => e.index == map['BrowsedUserType']),
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ avatar: map['Avatar'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if (courseBrowsedRecordCode != null) {
|
|
|
+ map['CourseBrowsedRecordCode'] = courseBrowsedRecordCode;
|
|
|
+ }
|
|
|
+ if (relevanceCode != null) {
|
|
|
+ map['RelevanceCode'] = relevanceCode;
|
|
|
+ }
|
|
|
+ if (userCode != null) {
|
|
|
+ map['UserCode'] = userCode;
|
|
|
+ }
|
|
|
+ if (displayName != null) {
|
|
|
+ map['DisplayName'] = displayName;
|
|
|
+ }
|
|
|
+ if (fromPlatform != null) {
|
|
|
+ map['FromPlatform'] = fromPlatform;
|
|
|
+ }
|
|
|
+ map['BrowsedCount'] = browsedCount;
|
|
|
+ map['IsOnline'] = isOnline;
|
|
|
+ map['BrowsedUserType'] = browsedUserType.index;
|
|
|
+ if (createTime != null) {
|
|
|
+ map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
+ }
|
|
|
+ if (updateTime != null) {
|
|
|
+ map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
+ }
|
|
|
+ if (avatar != null) {
|
|
|
+ map['Avatar'] = avatar;
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryBrowsedRecordPageRequest extends PageRequest{
|
|
|
+ String? relevanceCode;
|
|
|
+ String? userCode;
|
|
|
+ String? displayName;
|
|
|
+
|
|
|
+ QueryBrowsedRecordPageRequest({
|
|
|
+ this.relevanceCode,
|
|
|
+ this.userCode,
|
|
|
+ this.displayName,
|
|
|
+ int pageIndex = 0,
|
|
|
+ int pageSize = 0,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ pageIndex: pageIndex,
|
|
|
+ pageSize: pageSize,
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryBrowsedRecordPageRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryBrowsedRecordPageRequest(
|
|
|
+ relevanceCode: map['RelevanceCode'],
|
|
|
+ userCode: map['UserCode'],
|
|
|
+ displayName: map['DisplayName'],
|
|
|
+ pageIndex: map['PageIndex'],
|
|
|
+ pageSize: map['PageSize'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if (relevanceCode != null)
|
|
|
+ map['RelevanceCode'] = relevanceCode;
|
|
|
+ if (userCode != null)
|
|
|
+ map['UserCode'] = userCode;
|
|
|
+ if (displayName != null)
|
|
|
+ map['DisplayName'] = displayName;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class QueryBrowsedRecordRequest extends TokenRequest{
|
|
|
+ String? relevanceCode;
|
|
|
+ String? userCode;
|
|
|
+ String? displayName;
|
|
|
+
|
|
|
+ QueryBrowsedRecordRequest({
|
|
|
+ this.relevanceCode,
|
|
|
+ this.userCode,
|
|
|
+ this.displayName,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory QueryBrowsedRecordRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return QueryBrowsedRecordRequest(
|
|
|
+ relevanceCode: map['RelevanceCode'],
|
|
|
+ userCode: map['UserCode'],
|
|
|
+ displayName: map['DisplayName'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if (relevanceCode != null)
|
|
|
+ map['RelevanceCode'] = relevanceCode;
|
|
|
+ if (userCode != null)
|
|
|
+ map['UserCode'] = userCode;
|
|
|
+ if (displayName != null)
|
|
|
+ map['DisplayName'] = displayName;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CourseLiveProhibitionRequest extends TokenRequest{
|
|
|
+ String? code;
|
|
|
+ bool isProhibition;
|
|
|
+
|
|
|
+ CourseLiveProhibitionRequest({
|
|
|
+ this.code,
|
|
|
+ this.isProhibition = false,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CourseLiveProhibitionRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CourseLiveProhibitionRequest(
|
|
|
+ code: map['Code'],
|
|
|
+ isProhibition: map['IsProhibition'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if (code != null)
|
|
|
+ map['Code'] = code;
|
|
|
+ map['IsProhibition'] = isProhibition;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CourseVisitorsStatisticResult {
|
|
|
+ int onlineCount;
|
|
|
+ int visitorCount;
|
|
|
+
|
|
|
+ CourseVisitorsStatisticResult({
|
|
|
+ this.onlineCount = 0,
|
|
|
+ this.visitorCount = 0,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory CourseVisitorsStatisticResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CourseVisitorsStatisticResult(
|
|
|
+ onlineCount: map['OnlineCount'],
|
|
|
+ visitorCount: map['VisitorCount'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['OnlineCount'] = onlineCount;
|
|
|
+ map['VisitorCount'] = visitorCount;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|