Soojeong Lee

Jul 5, 2025

Soojeong Lee

Jul 5, 2025

Soojeong Lee

Jul 5, 2025

Try modeling

Try modeling

Think about it from the perspective of the object dimension.

First, I thought lightly about it.

First, let's think about the objects that the service will contain.

  • User (Account Holder)

  • The Deceased

    • Date of Death

    • Location of Memorial

    • Photos

    • Videos

    • Notes


Each photo and video object also contains additional information.

  • Photo/Video

    • Note

    • Location

    • Creation Time


I created a class based on the information needed for the service.

import 'media_item.model.dart';
import 'note.model.dart';

class LostPerson {
  final DateTime dateOfDeath;
  final String memorialLocation;
  final List<MediaItem> photos;
  final List<MediaItem> videos;
  final List<Note> notes;

  LostPerson({
    required this.dateOfDeath,
    required this.memorialLocation,
    List<MediaItem>? photos,
    List<MediaItem>? videos,
    List<Note>


Notes were created with the Note class.

class Note {
  final String content;
  final String location;
  final DateTime createdAt;

  Note({
    required this.content,
    required this.location,
    required this.createdAt,
  });
}


Photos/Videos were grouped into a class called MediaItem.

class MediaItem {
  final String url;
  final String note;
  final String location;
  final DateTime createdAt;

  MediaItem({
    required this.url,
    required this.note,
    required this.location,
    required this.createdAt,
  });
}


This is the beginning of the modeling.

Comments

Comments

Comments