You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
2.1 KiB
35 lines
2.1 KiB
package models
|
|
|
|
import (
|
|
"ims/util/db/dts"
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// SupplyPrice 供应商价格表
|
|
// https://www.jiandaoyun.com/index/solution_center/app/21774?utm_src=fazxjxcshseo
|
|
type SupplyPrice struct {
|
|
ID uint `json:"id" gorm:"primarykey"` // 价格编号
|
|
SupplierID uint `json:"supplier_id"` // 供应商编号
|
|
ProductID uint `json:"product_id"` // 供应产品编号
|
|
ReferencePrice int `json:"reference_price"` // 标准采购单价(含税)
|
|
PurchasePriceWithTax int `json:"purchase_price_with_tax"` // 采购单价(含税)
|
|
DiscountRate int `json:"discount_rate"` // 折扣率
|
|
PurchasePrice int `json:"purchase_price"` // 采购单价(不含税)
|
|
TaxRate int `json:"tax_rate"` // 增值税税率
|
|
TaxValue int `json:"tax_value"` // 税额,单位分
|
|
SubmitterID uint `json:"submitter_id"` // 提交人编号
|
|
Submitter *Employee `json:"submitter" gorm:"foreignKey:SubmitterID"` // 提交人信息
|
|
|
|
CreatedBy uint `json:"created_by"` // 创建者(员工编号)
|
|
CreatedAt time.Time `json:"created_at"` // 创建时间
|
|
UpdatedBy dts.NullUint `json:"updated_by"` // 创建者(员工编号)
|
|
UpdatedAt time.Time `json:"updated_at"` // 上次操作时间
|
|
DeletedBy dts.NullUint `json:"deleted_by"` // 删除者(员工编号)
|
|
DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"` // 删除数据时间
|
|
|
|
Creator *Employee `json:"creator,omitempty" gorm:"foreignKey:CreatedBy"` // 创建数据的员工
|
|
Updater *Employee `json:"updater,omitempty" gorm:"foreignKey:UpdatedBy"` // 上次更新数据的员工
|
|
Deleter *Employee `json:"deleter,omitempty" gorm:"foreignKey:DeletedBy"` // 删除数据的员工
|
|
}
|
|
|