fix: readers and linting issues
This commit is contained in:
18
tests/assets/gorm/simple.go
Normal file
18
tests/assets/gorm/simple.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user