From d1f7681b0b0189b49cf90d9d58c8fcf672f00cfa Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sun, 20 Oct 2019 22:30:55 +0400 Subject: [PATCH] feat: Add necessary db models --- internal/models/db/note.go | 9 +++++++++ internal/models/db/todo.go | 10 ++++++++++ internal/models/db/user.go | 8 ++++++++ 3 files changed, 27 insertions(+) create mode 100644 internal/models/db/note.go create mode 100644 internal/models/db/todo.go create mode 100644 internal/models/db/user.go diff --git a/internal/models/db/note.go b/internal/models/db/note.go new file mode 100644 index 0000000..9dd832b --- /dev/null +++ b/internal/models/db/note.go @@ -0,0 +1,9 @@ +package db + +// Note represents user note +type Note struct { + NoteID string + NoteTitle string + NoteAuthor string + NoteContent string +} diff --git a/internal/models/db/todo.go b/internal/models/db/todo.go new file mode 100644 index 0000000..ffcc08a --- /dev/null +++ b/internal/models/db/todo.go @@ -0,0 +1,10 @@ +package db + +// Todo represents TODO-list note +type Todo struct { + TodoID string + TodoTitle string + TodoUnchecked []string + TodoChecked []string + TodoAuthor string +} diff --git a/internal/models/db/user.go b/internal/models/db/user.go new file mode 100644 index 0000000..fcfa625 --- /dev/null +++ b/internal/models/db/user.go @@ -0,0 +1,8 @@ +package db + +// User represents entity that interacts with the system +type User struct { + UserID string + UserName string + Password string +}