Semaphore/db/View.go

15 lines
348 B
Go
Raw Permalink Normal View History

2021-10-26 20:19:12 +02:00
package db
type View struct {
ID int `db:"id" json:"id"`
ProjectID int `db:"project_id" json:"project_id"`
Title string `db:"title" json:"title"`
2021-10-27 18:22:52 +02:00
Position int `db:"position" json:"position"`
2021-10-26 20:19:12 +02:00
}
func (view *View) Validate() error {
if view.Title == "" {
2021-11-02 20:30:45 +01:00
return &ValidationError{"title can not be empty"}
}
return nil
}