use crate::domain::entry::Entry;
use crate::persistence::entry_record::EntryRecord;
impl From<Entry> for EntryRecord {
fn from(entry: Entry) -> Self {
EntryRecord {
id: entry.id,
title: entry.title,
body: entry.body,
date: entry.date,
tags: entry.tags,
starred: entry.starred,
}
}
}
impl From<EntryRecord> for Entry {
fn from(record: EntryRecord) -> Self {
Entry {
id: record.id,
title: record.title,
body: record.body,
date: record.date,
tags: record.tags,
starred: record.starred,
}
}
}