“Gorm Float64” Ответ

Gorm Float64

type TableName struct {
  Amount    decimal.Decimal `json:"amount" sql:"type:decimal(20,8);"`
}
Restu Wahyu Saputra

Gorm Float64

type Product struct {
      decimal.Decimal `gorm:"type:decimal(7,6);"`
}
Restu Wahyu Saputra

Gorm Float64

type Product struct {
Id           int
ProductName  string    `sql:"type:varchar(250);"`
Amount       float32   `sql:"type:decimal(10,2);"` 
}
Restu Wahyu Saputra

Gorm Float64

type MyStruct struct {
    Name        string `json:"name" gorm:"not null"`
    Description string `json:"description" gorm:"null"`
    Price decimal.Decimal `json:"price" gorm:"type:numeric"`
}
Restu Wahyu Saputra

Ответы похожие на “Gorm Float64”

Смотреть популярные ответы по языку

Смотреть другие языки программирования