Files
relspecgo/tests/assets/gorm/simple.go
Hein aad5db5175
Some checks failed
CI / Test (1.24) (push) Failing after -24m50s
CI / Test (1.25) (push) Failing after -24m42s
CI / Build (push) Successful in -25m49s
CI / Lint (push) Successful in -25m36s
fix: readers and linting issues
2025-12-19 22:28:24 +02:00

19 lines
499 B
Go

package models
import (
"time"
)
type User struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement;type:bigint"`
Email string `gorm:"column:email;type:varchar(255);not null"`
Name string `gorm:"column:name;type:text"`
Age *int `gorm:"column:age;type:integer"`
IsActive bool `gorm:"column:is_active;type:boolean"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:now()"`
}
func (User) TableName() string {
return "users"
}