I can see that gorm.Model is:

type Model struct {
    ID        uint `gorm:"primarykey"`
    CreatedAt time.Time
    UpdatedAt time.Time
    DeletedAt DeletedAt `gorm:"index"`
}

Why did you choose uint instead of int?

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 2 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: frederikhors

No answer to this?

Comment From: frederikhors

:(

Comment From: jinzhu

no specially reason, this sounds the most correct choice, but you can override the Model struct to use any type

Comment From: jcalahorro

The model defines ID as autoincremental value, and never must be a negative value, so uint is the most correct choice because it allows twice as many positive quantities as int.