package DB // BaseModel 普通表基类 — 嵌入后自动获得 _id 主键 // // type User struct { // DB.BaseModel // Name string `tsdb:"32byte"` // Age int // } type BaseModel struct { ID uint64 `tsdb:"_id"` } // TimeSeriesModel 时序表基类 — 嵌入后自动获得 _ts 主键 // // type Sensor struct { // DB.TimeSeriesModel // Value float64 // } type TimeSeriesModel struct { TS uint64 `tsdb:"_ts"` }