summaryrefslogtreecommitdiffstats
path: root/internal/models
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models')
-rw-r--r--internal/models/organisations.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/models/organisations.go b/internal/models/organisations.go
new file mode 100644
index 0000000..7a8898c
--- /dev/null
+++ b/internal/models/organisations.go
@@ -0,0 +1,29 @@
+package models
+
+import (
+ "database/sql"
+ "time"
+)
+
+type Organisation struct {
+ ID int
+ Name string
+ Created time.Time
+}
+
+type OrganisationModel struct {
+ DB *sql.DB
+}
+
+func (m *OrganisationModel) Insert(name string) (int, error) {
+ return 0, nil
+}
+
+func (m *OrganisationModel) Get(id int) (Organisation, error) {
+ return Organisation{}, nil
+}
+
+// Ten most recent...
+func (m *OrganisationModel) Latest() ([]Organisation, error) {
+ return nil, nil
+}