Documentation
¶
Index ¶
- Constants
- Variables
- type Cost
- func (*Cost) Descriptor() ([]byte, []int)deprecated
- func (x *Cost) GetPolicy() float64
- func (x *Cost) GetRealCost() float64
- func (x *Cost) GetSalePrice() float64
- func (x *Cost) GetTimeSpan() float64
- func (x *Cost) GetTimeUnit() string
- func (x *Cost) GetUnitPrice() float64
- func (x *Cost) GetVoucherPay() float64
- func (*Cost) ProtoMessage()
- func (x *Cost) ProtoReflect() protoreflect.Message
- func (x *Cost) Reset()
- func (x *Cost) String() string
- type ORDER_STATUS
- func (ORDER_STATUS) Descriptor() protoreflect.EnumDescriptor
- func (x ORDER_STATUS) Enum() *ORDER_STATUS
- func (ORDER_STATUS) EnumDescriptor() ([]byte, []int)deprecated
- func (t ORDER_STATUS) Equal(target ORDER_STATUS) bool
- func (t ORDER_STATUS) IsIn(targets ...ORDER_STATUS) bool
- func (t ORDER_STATUS) MarshalJSON() ([]byte, error)
- func (x ORDER_STATUS) Number() protoreflect.EnumNumber
- func (x ORDER_STATUS) String() string
- func (ORDER_STATUS) Type() protoreflect.EnumType
- func (t *ORDER_STATUS) UnmarshalJSON(b []byte) error
- type ORDER_TYPE
- func (ORDER_TYPE) Descriptor() protoreflect.EnumDescriptor
- func (x ORDER_TYPE) Enum() *ORDER_TYPE
- func (ORDER_TYPE) EnumDescriptor() ([]byte, []int)deprecated
- func (t ORDER_TYPE) Equal(target ORDER_TYPE) bool
- func (t ORDER_TYPE) IsIn(targets ...ORDER_TYPE) bool
- func (t ORDER_TYPE) MarshalJSON() ([]byte, error)
- func (x ORDER_TYPE) Number() protoreflect.EnumNumber
- func (x ORDER_TYPE) String() string
- func (ORDER_TYPE) Type() protoreflect.EnumType
- func (t *ORDER_TYPE) UnmarshalJSON(b []byte) error
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetBigOrderId() string
- func (x *Order) GetCost() *Cost
- func (x *Order) GetCreateAt() int64
- func (x *Order) GetCreateBy() string
- func (x *Order) GetId() string
- func (x *Order) GetOrderType() string
- func (x *Order) GetPayAt() int64
- func (x *Order) GetPayMode() resource.PAY_MODE
- func (x *Order) GetPayer() string
- func (x *Order) GetProductCode() string
- func (x *Order) GetProductInfo() string
- func (x *Order) GetProductName() string
- func (x *Order) GetResourceId() []string
- func (x *Order) GetStatus() string
- func (x *Order) GetSubProductCode() string
- func (x *Order) GetSubProductName() string
- func (x *Order) GetTaskId() string
- func (x *Order) GetVendor() resource.VENDOR
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- func (o *Order) ToJsonString() string
- type OrderSet
- func (s *OrderSet) Add(items ...any)
- func (*OrderSet) Descriptor() ([]byte, []int)deprecated
- func (x *OrderSet) GetItems() []*Order
- func (s *OrderSet) GetOrderById(orderId string) *Order
- func (x *OrderSet) GetTotal() int64
- func (s *OrderSet) Length() int64
- func (*OrderSet) ProtoMessage()
- func (x *OrderSet) ProtoReflect() protoreflect.Message
- func (x *OrderSet) Reset()
- func (x *OrderSet) String() string
- func (s *OrderSet) ToAny() (items []any)
Constants ¶
View Source
const (
AppName = "order"
)
Variables ¶
View Source
var ( ORDER_TYPE_name = map[int32]string{ 0: "NEW", 1: "RENEW", 2: "UPGRADE", 3: "DOWNGRADE", 4: "REFUND", 5: "CONVERT", 6: "MODIFY", } ORDER_TYPE_value = map[string]int32{ "NEW": 0, "RENEW": 1, "UPGRADE": 2, "DOWNGRADE": 3, "REFUND": 4, "CONVERT": 5, "MODIFY": 6, } )
Enum value maps for ORDER_TYPE.
View Source
var ( ORDER_STATUS_name = map[int32]string{ 0: "UNPAID", 1: "EXPIRED", 2: "PAYING", 3: "CANCELLED", 4: "PAID", } ORDER_STATUS_value = map[string]int32{ "UNPAID": 0, "EXPIRED": 1, "PAYING": 2, "CANCELLED": 3, "PAID": 4, } )
Enum value maps for ORDER_STATUS.
View Source
var File_apps_order_pb_order_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Cost ¶
type Cost struct { // 官网价,原价(分) // @gotags: json:"sale_price" SalePrice float64 `protobuf:"fixed64,1,opt,name=sale_price,json=salePrice,proto3" json:"sale_price"` // 折扣率 // @gotags: json:"policy" Policy float64 `protobuf:"fixed64,2,opt,name=policy,proto3" json:"policy"` // 单价(分) // @gotags: json:"unit_price" UnitPrice float64 `protobuf:"fixed64,3,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price"` // 购买时长 // @gotags: json:"time_span" TimeSpan float64 `protobuf:"fixed64,4,opt,name=time_span,json=timeSpan,proto3" json:"time_span"` // 购买时长 // @gotags: json:"time_unit" TimeUnit string `protobuf:"bytes,5,opt,name=time_unit,json=timeUnit,proto3" json:"time_unit"` // 实际支付金额(分) // @gotags: json:"real_cost" RealCost float64 `protobuf:"fixed64,6,opt,name=real_cost,json=realCost,proto3" json:"real_cost"` // 代金券抵扣金额(分) // @gotags: json:"voucher_pay" VoucherPay float64 `protobuf:"fixed64,7,opt,name=voucher_pay,json=voucherPay,proto3" json:"voucher_pay"` // contains filtered or unexported fields }
func (*Cost) Descriptor
deprecated
func (*Cost) GetRealCost ¶
func (*Cost) GetSalePrice ¶
func (*Cost) GetTimeSpan ¶
func (*Cost) GetTimeUnit ¶
func (*Cost) GetUnitPrice ¶
func (*Cost) GetVoucherPay ¶
func (*Cost) ProtoMessage ¶
func (*Cost) ProtoMessage()
func (*Cost) ProtoReflect ¶
func (x *Cost) ProtoReflect() protoreflect.Message
type ORDER_STATUS ¶
type ORDER_STATUS int32
const ( // 未支付 ORDER_STATUS_UNPAID ORDER_STATUS = 0 // 订单过期 ORDER_STATUS_EXPIRED ORDER_STATUS = 1 // 支付中 ORDER_STATUS_PAYING ORDER_STATUS = 2 // 已取消 ORDER_STATUS_CANCELLED ORDER_STATUS = 3 // 已支付 ORDER_STATUS_PAID ORDER_STATUS = 4 )
func ParseORDER_STATUSFromString ¶
func ParseORDER_STATUSFromString(str string) (ORDER_STATUS, error)
ParseORDER_STATUSFromString Parse ORDER_STATUS from string
func (ORDER_STATUS) Descriptor ¶
func (ORDER_STATUS) Descriptor() protoreflect.EnumDescriptor
func (ORDER_STATUS) Enum ¶
func (x ORDER_STATUS) Enum() *ORDER_STATUS
func (ORDER_STATUS) EnumDescriptor
deprecated
func (ORDER_STATUS) EnumDescriptor() ([]byte, []int)
Deprecated: Use ORDER_STATUS.Descriptor instead.
func (ORDER_STATUS) Equal ¶
func (t ORDER_STATUS) Equal(target ORDER_STATUS) bool
Equal type compare
func (ORDER_STATUS) MarshalJSON ¶
func (t ORDER_STATUS) MarshalJSON() ([]byte, error)
MarshalJSON todo
func (ORDER_STATUS) Number ¶
func (x ORDER_STATUS) Number() protoreflect.EnumNumber
func (ORDER_STATUS) String ¶
func (x ORDER_STATUS) String() string
func (ORDER_STATUS) Type ¶
func (ORDER_STATUS) Type() protoreflect.EnumType
func (*ORDER_STATUS) UnmarshalJSON ¶
func (t *ORDER_STATUS) UnmarshalJSON(b []byte) error
UnmarshalJSON todo
type ORDER_TYPE ¶
type ORDER_TYPE int32
const ( // 资源新增订单 ORDER_TYPE_NEW ORDER_TYPE = 0 // 续费。 ORDER_TYPE_RENEW ORDER_TYPE = 1 // 升级。 ORDER_TYPE_UPGRADE ORDER_TYPE = 2 // 降配 ORDER_TYPE_DOWNGRADE ORDER_TYPE = 3 // 退款 ORDER_TYPE_REFUND ORDER_TYPE = 4 // 付费方式转换 ORDER_TYPE_CONVERT ORDER_TYPE = 5 // 配置调整 ORDER_TYPE_MODIFY ORDER_TYPE = 6 )
func ParseORDER_TYPEFromString ¶
func ParseORDER_TYPEFromString(str string) (ORDER_TYPE, error)
ParseORDER_TYPEFromString Parse ORDER_TYPE from string
func (ORDER_TYPE) Descriptor ¶
func (ORDER_TYPE) Descriptor() protoreflect.EnumDescriptor
func (ORDER_TYPE) Enum ¶
func (x ORDER_TYPE) Enum() *ORDER_TYPE
func (ORDER_TYPE) EnumDescriptor
deprecated
func (ORDER_TYPE) EnumDescriptor() ([]byte, []int)
Deprecated: Use ORDER_TYPE.Descriptor instead.
func (ORDER_TYPE) Number ¶
func (x ORDER_TYPE) Number() protoreflect.EnumNumber
func (ORDER_TYPE) String ¶
func (x ORDER_TYPE) String() string
func (ORDER_TYPE) Type ¶
func (ORDER_TYPE) Type() protoreflect.EnumType
func (*ORDER_TYPE) UnmarshalJSON ¶
func (t *ORDER_TYPE) UnmarshalJSON(b []byte) error
UnmarshalJSON todo
type Order ¶
type Order struct { // 本次账单同步关联的任务Id // @gotags: json:"task_id" TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id"` // 厂商 // @gotags: json:"vendor" Vendor resource.VENDOR `protobuf:"varint,2,opt,name=vendor,proto3,enum=infraboard.cmdb.resource.VENDOR" json:"vendor"` // 大订单号 // @gotags: json:"big_order_id" BigOrderId string `protobuf:"bytes,3,opt,name=big_order_id,json=bigOrderId,proto3" json:"big_order_id"` // 订单Id // @gotags: json:"id" Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id"` // 订单类型 // @gotags: json:"order_type" OrderType string `protobuf:"bytes,5,opt,name=order_type,json=orderType,proto3" json:"order_type"` // 订单状态 // @gotags: json:"status" Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status"` // 支付者 // @gotags: json:"payer" Payer string `protobuf:"bytes,7,opt,name=payer,proto3" json:"payer"` // 创建时间 // @gotags: json:"create_at" CreateAt int64 `protobuf:"varint,8,opt,name=create_at,json=createAt,proto3" json:"create_at"` // 支付时间 // @gotags: json:"pay_at" PayAt int64 `protobuf:"varint,9,opt,name=pay_at,json=payAt,proto3" json:"pay_at"` // 创建人 // @gotags: json:"create_by" CreateBy string `protobuf:"bytes,10,opt,name=create_by,json=createBy,proto3" json:"create_by"` // 计费方式,比如:月95,日均峰值 // @gotags: json:"pay_mode" PayMode resource.PAY_MODE `protobuf:"varint,11,opt,name=pay_mode,json=payMode,proto3,enum=infraboard.cmdb.resource.PAY_MODE" json:"pay_mode"` // 定义费用 // @gotags: json:"cost" Cost *Cost `protobuf:"bytes,12,opt,name=cost,proto3" json:"cost"` // 产品编码 // @gotags: json:"product_code" ProductCode string `protobuf:"bytes,13,opt,name=product_code,json=productCode,proto3" json:"product_code"` // 产品编码中文名称 // @gotags: json:"product_name" ProductName string `protobuf:"bytes,14,opt,name=product_name,json=productName,proto3" json:"product_name"` // 子产品编码 // @gotags: json:"sub_product_code" SubProductCode string `protobuf:"bytes,15,opt,name=sub_product_code,json=subProductCode,proto3" json:"sub_product_code"` // 子产品编码中文名称 // @gotags: json:"sub_product_name" SubProductName string `protobuf:"bytes,16,opt,name=sub_product_name,json=subProductName,proto3" json:"sub_product_name"` // 购买产品详情 // @gotags: json:"product_info" ProductInfo string `protobuf:"bytes,17,opt,name=product_info,json=productInfo,proto3" json:"product_info"` // 订单对应的资源id // @gotags: json:"resource_id" ResourceId []string `protobuf:"bytes,18,rep,name=resource_id,json=resourceId,proto3" json:"resource_id"` // contains filtered or unexported fields }
func NewDefaultOrder ¶
func NewDefaultOrder() *Order
func (*Order) Descriptor
deprecated
func (*Order) GetBigOrderId ¶
func (*Order) GetCreateAt ¶
func (*Order) GetCreateBy ¶
func (*Order) GetOrderType ¶
func (*Order) GetPayMode ¶
func (*Order) GetProductCode ¶
func (*Order) GetProductInfo ¶
func (*Order) GetProductName ¶
func (*Order) GetResourceId ¶
func (*Order) GetSubProductCode ¶
func (*Order) GetSubProductName ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
func (*Order) ToJsonString ¶
type OrderSet ¶
type OrderSet struct { // 总数量 // @gotags: json:"total" Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` // 列表项 // @gotags: json:"items" Items []*Order `protobuf:"bytes,2,rep,name=items,proto3" json:"items"` // contains filtered or unexported fields }
func NewOrderSet ¶
func NewOrderSet() *OrderSet
func (*OrderSet) Descriptor
deprecated
func (*OrderSet) GetOrderById ¶
func (*OrderSet) ProtoMessage ¶
func (*OrderSet) ProtoMessage()
func (*OrderSet) ProtoReflect ¶
func (x *OrderSet) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.