14 lines
366 B
Go
14 lines
366 B
Go
// Package model 定义数据库模型。
|
|
package model
|
|
|
|
import "time"
|
|
|
|
// Note 示例便签。
|
|
type Note struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Title string `gorm:"size:200;not null" json:"title"`
|
|
Content string `gorm:"type:text" json:"content"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|