Error 1292: Incorrect datetime value: '0000-00-00' for column 'created_at' at row 1
更多评论
```go
type User struct {
gorm.Model
Username string `gorm:"type:varchar(20);unique_index"`
Password string `gorm:"type:varchar(64)"`
Phone string `gorm:"type:char(11);unique_index"`
}
```
#2
<a href="/user/18393910396" title="@18393910396">@18393910396</a> ```go
type User struct {
gorm.Model
Username string `gorm:"type:varchar(20);unique_index"`
Password string `gorm:"type:varchar(64)"`
Phone string `gorm:"type:char(11);unique_index"`
}
```
#3