36 lines
2.0 KiB
Go
36 lines
2.0 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type TenantCrmProduct struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
|
ProductNo string `orm:"column(product_no);size(50)" json:"product_no"`
|
|
ProductName string `orm:"column(product_name);size(100)" json:"product_name"`
|
|
Category string `orm:"column(category);size(20)" json:"category"`
|
|
Unit string `orm:"column(unit);size(20)" json:"unit"`
|
|
Spec string `orm:"column(spec);size(255)" json:"spec"`
|
|
Price float64 `orm:"column(price);digits(14);decimals(2);default(0)" json:"price"`
|
|
CostPrice float64 `orm:"column(cost_price);digits(14);decimals(2);default(0)" json:"cost_price"`
|
|
TaxRate float64 `orm:"column(tax_rate);digits(6);decimals(2);default(0)" json:"tax_rate"`
|
|
LineType string `orm:"column(line_type);size(20);default(product)" json:"line_type"`
|
|
DevUnitPrice float64 `orm:"column(dev_unit_price);digits(14);decimals(2);default(0)" json:"dev_unit_price"`
|
|
DevMode string `orm:"column(dev_mode);size(20);default(self)" json:"dev_mode"`
|
|
DevTree string `orm:"column(dev_tree);type(text);null" json:"dev_tree"`
|
|
Status int8 `orm:"column(status);default(1)" json:"status"`
|
|
ProjectID *uint64 `orm:"column(project_id);null" json:"project_id"`
|
|
ProjectName string `orm:"column(project_name);size(100)" json:"project_name"`
|
|
Remark string `orm:"column(remark);type(text);null" json:"remark"`
|
|
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
|
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
|
}
|
|
|
|
func (m *TenantCrmProduct) TableName() string {
|
|
return "yz_backend_crm_product"
|
|
}
|
|
|