|
|
|
/// id : "1452530820865589248"
|
|
|
|
/// createTime : "2021-10-25 15:01:49"
|
|
|
|
/// createUser : "1"
|
|
|
|
/// updateTime : "2021-11-02 17:09:56"
|
|
|
|
/// updateUser : "1"
|
|
|
|
/// courseId : "1452472611438067712"
|
|
|
|
/// name : "111"
|
|
|
|
/// content : {"coverImg":"https://pos.upload.gznl.top/0000/2021/11/3e014154-57cc-441e-9d02-aa53975979f5.webp","remark":"11111111","fileUrl":"https://pos.upload.gznl.top/0000/2021/11/d87dd996-e269-46eb-b7ef-f8ceddfabef2.mp4"}
|
|
|
|
/// sort : 0
|
|
|
|
/// isDelete : 0
|
|
|
|
|
|
|
|
class Chapter {
|
|
|
|
Chapter({
|
|
|
|
String id,
|
|
|
|
String createTime,
|
|
|
|
String createUser,
|
|
|
|
String updateTime,
|
|
|
|
String updateUser,
|
|
|
|
String courseId,
|
|
|
|
String name,
|
|
|
|
Content content,
|
|
|
|
int sort,
|
|
|
|
int isDelete,}){
|
|
|
|
_id = id;
|
|
|
|
_createTime = createTime;
|
|
|
|
_createUser = createUser;
|
|
|
|
_updateTime = updateTime;
|
|
|
|
_updateUser = updateUser;
|
|
|
|
_courseId = courseId;
|
|
|
|
_name = name;
|
|
|
|
_content = content;
|
|
|
|
_sort = sort;
|
|
|
|
_isDelete = isDelete;
|
|
|
|
}
|
|
|
|
|
|
|
|
Chapter.fromJson(dynamic json) {
|
|
|
|
_id = json['id'];
|
|
|
|
_createTime = json['createTime'];
|
|
|
|
_createUser = json['createUser'];
|
|
|
|
_updateTime = json['updateTime'];
|
|
|
|
_updateUser = json['updateUser'];
|
|
|
|
_courseId = json['courseId'];
|
|
|
|
_name = json['name'];
|
|
|
|
_content = json['content'] != null ? Content.fromJson(json['content']) : null;
|
|
|
|
_sort = json['sort'];
|
|
|
|
_isDelete = json['isDelete'];
|
|
|
|
}
|
|
|
|
String _id;
|
|
|
|
String _createTime;
|
|
|
|
String _createUser;
|
|
|
|
String _updateTime;
|
|
|
|
String _updateUser;
|
|
|
|
String _courseId;
|
|
|
|
String _name;
|
|
|
|
Content _content;
|
|
|
|
int _sort;
|
|
|
|
int _isDelete;
|
|
|
|
|
|
|
|
String get id => _id;
|
|
|
|
String get createTime => _createTime;
|
|
|
|
String get createUser => _createUser;
|
|
|
|
String get updateTime => _updateTime;
|
|
|
|
String get updateUser => _updateUser;
|
|
|
|
String get courseId => _courseId;
|
|
|
|
String get name => _name;
|
|
|
|
Content get content => _content;
|
|
|
|
int get sort => _sort;
|
|
|
|
int get isDelete => _isDelete;
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['id'] = _id;
|
|
|
|
map['createTime'] = _createTime;
|
|
|
|
map['createUser'] = _createUser;
|
|
|
|
map['updateTime'] = _updateTime;
|
|
|
|
map['updateUser'] = _updateUser;
|
|
|
|
map['courseId'] = _courseId;
|
|
|
|
map['name'] = _name;
|
|
|
|
if (_content != null) {
|
|
|
|
map['content'] = _content.toJson();
|
|
|
|
}
|
|
|
|
map['sort'] = _sort;
|
|
|
|
map['isDelete'] = _isDelete;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/3e014154-57cc-441e-9d02-aa53975979f5.webp"
|
|
|
|
/// remark : "11111111"
|
|
|
|
/// fileUrl : "https://pos.upload.gznl.top/0000/2021/11/d87dd996-e269-46eb-b7ef-f8ceddfabef2.mp4"
|
|
|
|
|
|
|
|
class Content {
|
|
|
|
Content({
|
|
|
|
String coverImg,
|
|
|
|
String remark,
|
|
|
|
String fileUrl,}){
|
|
|
|
_coverImg = coverImg;
|
|
|
|
_remark = remark;
|
|
|
|
_fileUrl = fileUrl;
|
|
|
|
}
|
|
|
|
|
|
|
|
Content.fromJson(dynamic json) {
|
|
|
|
_coverImg = json['coverImg'];
|
|
|
|
_remark = json['remark'];
|
|
|
|
_fileUrl = json['fileUrl'];
|
|
|
|
}
|
|
|
|
String _coverImg;
|
|
|
|
String _remark;
|
|
|
|
String _fileUrl;
|
|
|
|
|
|
|
|
String get coverImg => _coverImg;
|
|
|
|
String get remark => _remark;
|
|
|
|
String get fileUrl => _fileUrl;
|
|
|
|
|
|
|
|
|
|
|
|
set coverImg(String value) {
|
|
|
|
_coverImg = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['coverImg'] = _coverImg;
|
|
|
|
map['remark'] = _remark;
|
|
|
|
map['fileUrl'] = _fileUrl;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
set remark(String value) {
|
|
|
|
_remark = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
set fileUrl(String value) {
|
|
|
|
_fileUrl = value;
|
|
|
|
}
|
|
|
|
}
|