forked from goffee/todoapp
17 lines
221 B
Go
17 lines
221 B
Go
|
package models
|
||
|
|
||
|
import "gorm.io/gorm"
|
||
|
|
||
|
type Todo struct {
|
||
|
gorm.Model
|
||
|
Title string
|
||
|
Body string
|
||
|
IsDone bool
|
||
|
// add your field here...
|
||
|
}
|
||
|
|
||
|
// Override the table name
|
||
|
func (Todo) TableName() string {
|
||
|
return "todos"
|
||
|
}
|