go-gorm / postgres

GORM PostgreSQL driver
MIT License
234 stars 123 forks source link

distinguish between schema.Time and tag time #160

Open black-06 opened 1 year ago

black-06 commented 1 year ago

What did this pull request do?

fix https://github.com/go-gorm/gorm/issues/6033

User Case Description

type Test struct {
    Date time.Time `gorm:"type:date"`
    Time time.Time `gorm:"type:time"`
    DefaultDateTime time.Time
}
CREATE TABLE `tests` (`date` date,`time` time,`default_date_time` datetime)