You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
795 B
39 lines
795 B
import 'package:json_annotation/json_annotation.dart'; |
|
|
|
part 'chapter.g.dart'; |
|
|
|
@JsonSerializable(explicitToJson: true) |
|
class Chapter { |
|
String? id = ''; |
|
String? createTime = ''; |
|
String? createUser = ''; |
|
String? updateTime = ''; |
|
String? updateUser = ''; |
|
String? courseId = ''; |
|
String? name = ''; |
|
Content? content; |
|
int? sort = 0; |
|
int? isDelete = 0; |
|
|
|
Chapter(); |
|
|
|
factory Chapter.fromJson(Map<String, dynamic> json) => _$ChapterFromJson(json); |
|
|
|
Map<String, dynamic> toJson() => _$ChapterToJson(this); |
|
|
|
} |
|
|
|
|
|
@JsonSerializable(explicitToJson: true) |
|
class Content { |
|
String? coverImg = ''; |
|
String? remark = ''; |
|
String? fileUrl = ''; |
|
|
|
Content(); |
|
|
|
factory Content.fromJson(Map<String, dynamic> json) => _$ContentFromJson(json); |
|
|
|
Map<String, dynamic> toJson() => _$ContentToJson(this); |
|
|
|
} |