model

package
v0.0.0-...-312e786 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UomCategory

type UomCategory struct {
	gorm.Model
	Name string `gorm:"size:32;not null"`
}

UomCategory 产品单位类别

type UomType

type UomType string

UomType 通过与参考类型计量单位比较大小

const (
	Bigger    UomType = "bigger"
	Reference UomType = "reference"
	Smaller   UomType = "smaller"
)

UOMType

type UomUom

type UomUom struct {
	gorm.Model
	Name        string `gorm:"size:60;not null"` //
	UomCategory UomCategory
	Factor      float32      `gorm:"default:1.0;check:factor <> 0"`
	FactorInv   float32      `gorm:"-"` // 计算属性
	Rounding    float32      `gorm:"check:rouding > 0"`
	Active      sql.NullBool `gorm:"default:true"`
	UomType     UomType      `gorm:"size:32;default:reference"`
}

UomUom 产品计量单位

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL