THATMobile/lib/features/model/file/attach_file_model.dart
2026-02-26 10:39:42 +07:00

24 lines
760 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'attach_file_model.g.dart';
@JsonSerializable(explicitToJson: true)
class AttachFileModel {
AttachFileModel({
this.title = '',
this.url = '',
this.type = '',
});
factory AttachFileModel.fromJson(Map<String, dynamic> json) => _$AttachFileModelFromJson(json);
@JsonKey(name: 'title', includeIfNull: true, defaultValue: '')
String title;
@JsonKey(name: 'url', includeIfNull: true, defaultValue: '')
String url;
@JsonKey(name: 'type', includeIfNull: true, defaultValue: '')
String type;
static const fromJsonFactory = _$AttachFileModelFromJson;
static const toJsonFactory = _$AttachFileModelToJson;
Map<String, dynamic> toJson() => _$AttachFileModelToJson(this);
}