feat: Add check service (WIP)
This commit is contained in:
24
repository/status.go
Normal file
24
repository/status.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"git.ostiwe.com/ostiwe-com/status/model"
|
||||
"git.ostiwe.com/ostiwe-com/status/modules/db"
|
||||
)
|
||||
|
||||
type Status interface {
|
||||
Add(status model.Status) error
|
||||
}
|
||||
|
||||
type status struct {
|
||||
repository
|
||||
}
|
||||
|
||||
func NewStatusRepository() Status {
|
||||
return &status{
|
||||
repository: repository{db: db.Global},
|
||||
}
|
||||
}
|
||||
|
||||
func (s status) Add(status model.Status) error {
|
||||
return s.db.Create(&status).Error
|
||||
}
|
||||
Reference in New Issue
Block a user