Semaphore/db/View.go
2021-11-03 00:30:45 +05:00

15 lines
348 B
Go

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"`
Position int `db:"position" json:"position"`
}
func (view *View) Validate() error {
if view.Title == "" {
return &ValidationError{"title can not be empty"}
}
return nil
}