family is home

This commit is contained in:
2023-08-06 22:54:08 +00:00
parent 5181aabd14
commit 5dd8de09de
5 changed files with 59 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
package models
import (
"database/sql"
"time"
)
type Snippet struct {
ID int
Title string
Content string
Created time.Time
Expires time.Time
}
type SnippetModel struct {
DB *sql.DB
}
func (m *SnippetModel) Insert(title string, content string, expires int) (int, error) {
return 0, nil
}
func (m *SnippetModel) Get(id int) (*Snippet, error) {
return nil, nil
}
func (m *SnippetModel) Latest() ([]*Snippet, error) {
return nil, nil
}