Skip to content

Instantly share code, notes, and snippets.

@BK1031
Created July 15, 2024 17:59
Show Gist options
  • Save BK1031/7660954415b118524710dfb6e31e7712 to your computer and use it in GitHub Desktop.
Save BK1031/7660954415b118524710dfb6e31e7712 to your computer and use it in GitHub Desktop.
singlestore-go-bookstore
package model
import "time"
type Book struct {
ID int `json:"id" gorm:"primaryKey"`
Title string `json:"title"`
Author string `json:"author"`
Genre string `json:"genre"`
Price float64 `json:"price"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime,precision:6"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime,precision:6"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment