package model import ( "github.com/shopspring/decimal" "github.com/uptrace/bun" ) type Meter04KV struct { bun.BaseModel `bun:"table:meter_04kv,alias:mt"` CreatedAndModified `bun:",extend"` Code string `bun:",pk,notnull" json:"code" excel:"code"` ParkId string `bun:",pk,notnull" json:"parkId"` Address *string `json:"address" excel:"address"` CustomerName *string `json:"customerName" excel:"name"` ContactName *string `json:"contactName" excel:"contact"` ContactPhone *string `json:"contactPhone" excel:"phone"` Ratio decimal.Decimal `bun:",notnull,default:1" json:"ratio" excel:"ratio"` Seq int64 `bun:"type:bigint,notnull" json:"seq" excel:"seq"` IsPublicMeter bool `bun:"public_meter,notnull,default:false" json:"isPublicMeter" excel:"public"` WillDilute bool `bun:"dilute,notnull,default:false" json:"willDilute" excel:"dilute"` Enabled bool `bun:",notnull,default:true" json:"enabled"` ParkDetail *Park `bun:"rel:belongs-to,join:park_id=id" json:"-"` }