You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
statping/types/incidents/database_updates.go

23 lines
443 B

package incidents
//func (i Incident) Updates() []*IncidentUpdate {
// var updates []*IncidentUpdate
// dbUpdate.Where("incident = ?", i.Id).Find(&updates)
// return updates
//}
func (i *IncidentUpdate) Create() error {
q := dbUpdate.Create(i)
return q.Error()
}
func (i *IncidentUpdate) Update() error {
q := dbUpdate.Update(i)
return q.Error()
}
func (i *IncidentUpdate) Delete() error {
q := dbUpdate.Delete(i)
return q.Error()
}