24 lines
760 B
Dart
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);
|
|
}
|