nb

package
v0.0.0-...-db9a106 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintJson

func PrintJson(obj interface{})

json方式打印结构体

func Run

func Run(dsn string) (err error)

Types

type AttrIdValue

type AttrIdValue struct {
	//产品属性ID,兼容code.
	AttrId *wrappers.StringValue `protobuf:"bytes,1,opt,name=attr_id,json=attrId,proto3" json:"attr_id,omitempty"`
	//产品属性值
	AttrValue            *wrappers.StringValue `protobuf:"bytes,2,opt,name=attr_value,json=attrValue,proto3" json:"attr_value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

type ComponentInfo

type ComponentInfo struct {
	// 计费项ID
	CompId *wrappers.StringValue `protobuf:"bytes,1,opt,name=comp_id,json=compId,proto3" json:"comp_id,omitempty"`
	//计费项的属性键值对 - 计费项由一组产品属性和属性值组成。
	Attrs                []*AttrIdValue `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

type OrderProductV2

type OrderProductV2 struct {
	//产品ID
	ProdId *wrappers.StringValue `protobuf:"bytes,1,opt,name=prod_id,json=prodId,proto3" json:"prod_id,omitempty"`
	//产品名称
	ProdName *wrappers.StringValue `protobuf:"bytes,2,opt,name=prod_name,json=prodName,proto3" json:"prod_name,omitempty"`
	//外部产品实例ID,多个代表多个实例
	ProdInstanceExtArray []*ProdInstanceExt `protobuf:"bytes,3,rep,name=prod_instance_ext_array,json=prodInstanceExtArray,proto3" json:"prod_instance_ext_array,omitempty"`
	//计费方案
	Plan                 *PlanWithAttrsV2 `protobuf:"bytes,4,opt,name=plan,proto3" json:"plan,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

type PlanWithAttrsV2

type PlanWithAttrsV2 struct {
	// 计费方案的ID
	PlanId *wrappers.StringValue `protobuf:"bytes,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"`
	//计费项 - 计费方案由不同的计费项组成,一个计费方案可以有多个计费项。
	Components           []*ComponentInfo `protobuf:"bytes,2,rep,name=components,proto3" json:"components,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

type ProdInstance

type ProdInstance struct {
	ProdInstId     string    `json:"prod_inst_id" gorm:"primaryKey"` // 产品实例ID
	AccessSysId    string    `json:"access_sys_id"`                  // 接入系统ID
	OrderId        string    `json:"order_id"`                       // 订单ID
	ProdId         string    `json:"prod_id"`                        // 产品ID
	ProdCode       string    `json:"prod_code"`                      // 产品编码
	ProdName       string    `json:"prod_name"`                      // 产品名称
	ProdInstIdExt  string    `json:"prod_inst_id_ext"`               // 接入系统产品实例ID
	ProdSnapshotId string    `json:"prod_snapshot_id"`               // 产品快照ID
	PlanId         string    `json:"plan_id"`                        // 定价方案ID
	IsAutoRenew    int64     `json:"is_auto_renew"`                  // 是否自动续订:0否,1是
	RenewDuration  string    `json:"renew_duration"`                 // 自动续约时长
	Status         string    `json:"status"`                         // 实例状态
	IsDeleted      int64     `json:"is_deleted"`                     // 是否删除:0否,1是
	CreatedBy      string    `json:"created_by"`                     // 创建人
	CreateTime     time.Time `json:"create_time"`                    // 创建时间
	UpdateTime     time.Time `json:"update_time"`                    // 更新时间
	ProdSnapshot   *ProdSnapshot
}

go run main.go nb -d="root:p@ss52Dnb@tcp(192.168.49.2:32316)/subscription?charset=utf8mb4&parseTime=true"

func (ProdInstance) TableName

func (ProdInstance) TableName() string

type ProdInstanceExt

type ProdInstanceExt struct {
	//产品实例ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	//是否自动续订- 0:否,1:是
	IsAutoRenew          int32    `protobuf:"varint,2,opt,name=is_auto_renew,json=isAutoRenew,proto3" json:"is_auto_renew,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

type ProdSnapshot

type ProdSnapshot struct {
	ProdSnapshotId string `json:"prod_snapshot_id" gorm:"primaryKey"`
	OriginRequest  string `json:"origin_request"`
	Attributes     string `json:"attributes"`
	Version        string `json:"version"`
}

func (ProdSnapshot) TableName

func (ProdSnapshot) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL