NewFragNote presents the given note as a SyncFragNote
(note database.Note)
| 77 | |
| 78 | // NewFragNote presents the given note as a SyncFragNote |
| 79 | func NewFragNote(note database.Note) SyncFragNote { |
| 80 | return SyncFragNote{ |
| 81 | UUID: note.UUID, |
| 82 | USN: note.USN, |
| 83 | CreatedAt: note.CreatedAt, |
| 84 | UpdatedAt: note.UpdatedAt, |
| 85 | AddedOn: note.AddedOn, |
| 86 | EditedOn: note.EditedOn, |
| 87 | Body: note.Body, |
| 88 | Deleted: note.Deleted, |
| 89 | BookUUID: note.BookUUID, |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | // SyncFragBook represents a book in a sync fragment and contains only the necessary information |
| 94 | // for the client to sync the note locally |