{{define "model.go"}}// Code generated by summer make. DO NOT EDIT. package models import "time" // {{.Ident}} is a generated GORM model for {{.PluginID}}. type {{.Ident}} struct { ID uint `gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time } func ({{.Ident}}) TableName() string { return {{printf "%q" .Table}} } {{end}} {{define "migration.go"}}// Code generated by summer make. DO NOT EDIT. package updates import ( "github.com/go-gormigrate/gormigrate/v2" "gorm.io/gorm" ) // {{.Func}} returns the {{.MigrationID}} gormigrate entry. func {{.Func}}() *gormigrate.Migration { return &gormigrate.Migration{ ID: {{printf "%q" .MigrationID}}, Migrate: func(tx *gorm.DB) error { return tx.Exec({{printf "%q" .UpSQL}}).Error }, Rollback: func(tx *gorm.DB) error { return tx.Exec({{printf "%q" .DownSQL}}).Error }, } } {{end}} {{define "command.go"}}// Code generated by summer make. DO NOT EDIT. package console import ( "context" "git.golem15.com/golem15/summercms/bonfire" ) // {{.Func}} returns the {{.CommandName}} console command. func {{.Func}}() bonfire.Command { return bonfire.Command{ Name: {{printf "%q" .CommandName}}, Description: {{printf "%q" .Description}}, Run: func(ctx context.Context, in bonfire.Input, out bonfire.Output) error { out.Printf({{printf "%q" .CommandName}} + "\n") return nil }, } } {{end}}