All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
36 lines
2.8 KiB
Go
36 lines
2.8 KiB
Go
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
package domain
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const TableNameCostComponent = "cost_component"
|
|
|
|
// CostComponent mapped from table <cost_component>
|
|
type CostComponent struct {
|
|
ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"`
|
|
Name *string `gorm:"column:name;type:character varying(255);index:cost_component_name_idx,priority:1" json:"name"`
|
|
MerchantID *string `gorm:"column:merchant_id;type:character(26);index:cost_component_merchant_id_idx,priority:1" json:"merchant_id"`
|
|
CreatedBy *string `gorm:"column:created_by;type:character(26);index:cost_component_created_by_idx,priority:1" json:"created_by"`
|
|
CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone;default:now()" json:"created_on"`
|
|
UpdatedBy *string `gorm:"column:updated_by;type:character(26)" json:"updated_by"`
|
|
UpdatedOn *time.Time `gorm:"column:updated_on;type:timestamp without time zone;default:now()" json:"updated_on"`
|
|
Inc *int32 `gorm:"column:inc;type:integer" json:"inc"`
|
|
Code *string `gorm:"column:code;type:character varying(100)" json:"code"`
|
|
Value *string `gorm:"column:value;type:character varying(255)" json:"value"`
|
|
ComponentType int32 `gorm:"column:component_type;type:integer;not null;comment:0. Input 1. Formula" json:"component_type"` // 0. Input 1. Formula
|
|
UnitType int32 `gorm:"column:unit_type;type:integer;not null;comment:0 Number 1. Percent" json:"unit_type"` // 0 Number 1. Percent
|
|
BasicPricingComponent_ByCostComponent_Relation []BasicPricingComponent `gorm:"foreignKey:cost_component_id;references:id" json:"basic_pricing_component_by_cost_component_relation"`
|
|
Merchant_Relation *Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"`
|
|
Users_Relation User `gorm:"foreignKey:created_by;references:id" json:"users_relation"`
|
|
}
|
|
|
|
// TableName CostComponent's table name
|
|
func (*CostComponent) TableName() string {
|
|
return TableNameCostComponent
|
|
}
|