1. Home
  2. Docs
  3. golang
  4. gorm

gorm

Q&A

如何去除自动维护 created_at、updated_at deleted_at字段?

不内嵌gorm.Model也行,可以自己指定primary key global.GVA_MODEL


如何自定义created_at updated_at 字段名称?

CreatedAt time.Time gorm:"column:creation_time"
UpdatedAt time.Time gorm:"column:update_time"

相关资料

官方文档

Was this article helpful to you? Yes No

How can we help?