Initial commit: 91dj android client dev_1.0.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-10-08 11:37:25 +07:00
co-authored by Claude Opus 5.5
commit 97dd6a739a
1262 changed files with 119813 additions and 0 deletions
@@ -0,0 +1,38 @@
/// 评论区置顶 Banner(GET /banner/list?scene=COMMENT_TOP)
class CommentTopBannerModel {
String? id;
String? imageUrl;
String? mediaType; // IMAGE | GIF
String? linkType; // INTERNAL | EXTERNAL | NONE
String? linkValue;
int? sort;
CommentTopBannerModel({
this.id,
this.imageUrl,
this.mediaType,
this.linkType,
this.linkValue,
this.sort,
});
bool get hasLink {
final t = linkType?.toUpperCase();
return t == 'INTERNAL' || t == 'EXTERNAL';
}
bool get isGif =>
mediaType?.toUpperCase() == 'GIF' || (imageUrl?.toLowerCase().contains('.gif') ?? false);
factory CommentTopBannerModel.fromJson(Map<String, dynamic>? json) {
json ??= {};
return CommentTopBannerModel(
id: json['id']?.toString(),
imageUrl: json['imageUrl']?.toString(),
mediaType: json['mediaType']?.toString(),
linkType: json['linkType']?.toString(),
linkValue: json['linkValue']?.toString(),
sort: json['sort'] is int ? json['sort'] as int : int.tryParse('${json['sort'] ?? ''}'),
);
}
}