import 'package:json_annotation/json_annotation.dart';

import 'media_image.dart';

part '../../../_generated/data/remote/models/property_intro.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class PropertyIntro {
  final int id;
  final String title;
  final String description;
  final String theme;
  final MediaImage heroImage;

  PropertyIntro({
    required this.id,
    required this.title,
    required this.description,
    required this.theme,
    required this.heroImage,
  });

  factory PropertyIntro.fromJson(Map<String, dynamic> json) =>
      _$PropertyIntroFromJson(json);

  Map<String, dynamic> toJson() => _$PropertyIntroToJson(this);
}