generated from PenaSide/GolangTemplate
944 lines
29 KiB
Go
944 lines
29 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.7
|
|
// protoc (unknown)
|
|
// source: discount/discount.model.proto
|
|
|
|
package discount
|
|
|
|
import (
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
_ "google.golang.org/protobuf/types/known/emptypb"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type TargetScope int32
|
|
|
|
const (
|
|
TargetScope_Sum TargetScope = 0
|
|
TargetScope_Group TargetScope = 1
|
|
TargetScope_Each TargetScope = 2
|
|
)
|
|
|
|
// Enum value maps for TargetScope.
|
|
var (
|
|
TargetScope_name = map[int32]string{
|
|
0: "Sum",
|
|
1: "Group",
|
|
2: "Each",
|
|
}
|
|
TargetScope_value = map[string]int32{
|
|
"Sum": 0,
|
|
"Group": 1,
|
|
"Each": 2,
|
|
}
|
|
)
|
|
|
|
func (x TargetScope) Enum() *TargetScope {
|
|
p := new(TargetScope)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x TargetScope) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (TargetScope) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_discount_discount_model_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (TargetScope) Type() protoreflect.EnumType {
|
|
return &file_discount_discount_model_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x TargetScope) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use TargetScope.Descriptor instead.
|
|
func (TargetScope) EnumDescriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type DiscountOptional struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Name *string `protobuf:"bytes,2,opt,name=Name,proto3,oneof" json:"Name,omitempty"`
|
|
Layer *uint32 `protobuf:"varint,3,opt,name=Layer,proto3,oneof" json:"Layer,omitempty"`
|
|
Description *string `protobuf:"bytes,4,opt,name=Description,proto3,oneof" json:"Description,omitempty"`
|
|
Condition *DiscountCondition `protobuf:"bytes,5,opt,name=Condition,proto3,oneof" json:"Condition,omitempty"`
|
|
Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3,oneof" json:"Target,omitempty"`
|
|
Deprecated *bool `protobuf:"varint,7,opt,name=Deprecated,proto3,oneof" json:"Deprecated,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DiscountOptional) Reset() {
|
|
*x = DiscountOptional{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DiscountOptional) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DiscountOptional) ProtoMessage() {}
|
|
|
|
func (x *DiscountOptional) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DiscountOptional.ProtoReflect.Descriptor instead.
|
|
func (*DiscountOptional) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *DiscountOptional) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountOptional) GetName() string {
|
|
if x != nil && x.Name != nil {
|
|
return *x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountOptional) GetLayer() uint32 {
|
|
if x != nil && x.Layer != nil {
|
|
return *x.Layer
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountOptional) GetDescription() string {
|
|
if x != nil && x.Description != nil {
|
|
return *x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountOptional) GetCondition() *DiscountCondition {
|
|
if x != nil {
|
|
return x.Condition
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DiscountOptional) GetTarget() *DiscountCalculationTarget {
|
|
if x != nil {
|
|
return x.Target
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DiscountOptional) GetDeprecated() bool {
|
|
if x != nil && x.Deprecated != nil {
|
|
return *x.Deprecated
|
|
}
|
|
return false
|
|
}
|
|
|
|
type Discounts struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Discounts []*Discount `protobuf:"bytes,1,rep,name=Discounts,proto3" json:"Discounts,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Discounts) Reset() {
|
|
*x = Discounts{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Discounts) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Discounts) ProtoMessage() {}
|
|
|
|
func (x *Discounts) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Discounts.ProtoReflect.Descriptor instead.
|
|
func (*Discounts) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Discounts) GetDiscounts() []*Discount {
|
|
if x != nil {
|
|
return x.Discounts
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Discount struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
Layer uint32 `protobuf:"varint,3,opt,name=Layer,proto3" json:"Layer,omitempty"`
|
|
Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"`
|
|
Condition *DiscountCondition `protobuf:"bytes,5,opt,name=Condition,proto3" json:"Condition,omitempty"`
|
|
Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3" json:"Target,omitempty"`
|
|
Audit *Audit `protobuf:"bytes,7,opt,name=Audit,proto3" json:"Audit,omitempty"`
|
|
Deprecated bool `protobuf:"varint,8,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Discount) Reset() {
|
|
*x = Discount{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Discount) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Discount) ProtoMessage() {}
|
|
|
|
func (x *Discount) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Discount.ProtoReflect.Descriptor instead.
|
|
func (*Discount) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Discount) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Discount) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Discount) GetLayer() uint32 {
|
|
if x != nil {
|
|
return x.Layer
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Discount) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Discount) GetCondition() *DiscountCondition {
|
|
if x != nil {
|
|
return x.Condition
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Discount) GetTarget() *DiscountCalculationTarget {
|
|
if x != nil {
|
|
return x.Target
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Discount) GetAudit() *Audit {
|
|
if x != nil {
|
|
return x.Audit
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Discount) GetDeprecated() bool {
|
|
if x != nil {
|
|
return x.Deprecated
|
|
}
|
|
return false
|
|
}
|
|
|
|
type DiscountCalculationTarget struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Products []*ProductTarget `protobuf:"bytes,1,rep,name=Products,proto3" json:"Products,omitempty"`
|
|
Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"`
|
|
TargetScope *TargetScope `protobuf:"varint,3,opt,name=TargetScope,proto3,enum=discount.TargetScope,oneof" json:"TargetScope,omitempty"`
|
|
TargetGroup *string `protobuf:"bytes,4,opt,name=TargetGroup,proto3,oneof" json:"TargetGroup,omitempty"`
|
|
Overhelm *bool `protobuf:"varint,5,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) Reset() {
|
|
*x = DiscountCalculationTarget{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DiscountCalculationTarget) ProtoMessage() {}
|
|
|
|
func (x *DiscountCalculationTarget) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DiscountCalculationTarget.ProtoReflect.Descriptor instead.
|
|
func (*DiscountCalculationTarget) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) GetProducts() []*ProductTarget {
|
|
if x != nil {
|
|
return x.Products
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) GetFactor() float64 {
|
|
if x != nil {
|
|
return x.Factor
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) GetTargetScope() TargetScope {
|
|
if x != nil && x.TargetScope != nil {
|
|
return *x.TargetScope
|
|
}
|
|
return TargetScope_Sum
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) GetTargetGroup() string {
|
|
if x != nil && x.TargetGroup != nil {
|
|
return *x.TargetGroup
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountCalculationTarget) GetOverhelm() bool {
|
|
if x != nil && x.Overhelm != nil {
|
|
return *x.Overhelm
|
|
}
|
|
return false
|
|
}
|
|
|
|
type DiscountCondition struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Period *PeriodCondition `protobuf:"bytes,1,opt,name=Period,proto3,oneof" json:"Period,omitempty"`
|
|
User *string `protobuf:"bytes,2,opt,name=User,proto3,oneof" json:"User,omitempty"`
|
|
UserType *string `protobuf:"bytes,3,opt,name=UserType,proto3,oneof" json:"UserType,omitempty"`
|
|
Coupon *string `protobuf:"bytes,4,opt,name=Coupon,proto3,oneof" json:"Coupon,omitempty"`
|
|
PurchasesAmount *uint64 `protobuf:"varint,5,opt,name=PurchasesAmount,proto3,oneof" json:"PurchasesAmount,omitempty"`
|
|
CartPurchasesAmount *uint64 `protobuf:"varint,6,opt,name=CartPurchasesAmount,proto3,oneof" json:"CartPurchasesAmount,omitempty"`
|
|
Product *string `protobuf:"bytes,7,opt,name=Product,proto3,oneof" json:"Product,omitempty"`
|
|
Term *uint64 `protobuf:"varint,8,opt,name=Term,proto3,oneof" json:"Term,omitempty"`
|
|
Usage *uint64 `protobuf:"varint,9,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"`
|
|
PriceFrom *uint64 `protobuf:"varint,10,opt,name=PriceFrom,proto3,oneof" json:"PriceFrom,omitempty"`
|
|
Group *string `protobuf:"bytes,11,opt,name=Group,proto3,oneof" json:"Group,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DiscountCondition) Reset() {
|
|
*x = DiscountCondition{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DiscountCondition) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DiscountCondition) ProtoMessage() {}
|
|
|
|
func (x *DiscountCondition) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DiscountCondition.ProtoReflect.Descriptor instead.
|
|
func (*DiscountCondition) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *DiscountCondition) GetPeriod() *PeriodCondition {
|
|
if x != nil {
|
|
return x.Period
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DiscountCondition) GetUser() string {
|
|
if x != nil && x.User != nil {
|
|
return *x.User
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountCondition) GetUserType() string {
|
|
if x != nil && x.UserType != nil {
|
|
return *x.UserType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountCondition) GetCoupon() string {
|
|
if x != nil && x.Coupon != nil {
|
|
return *x.Coupon
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountCondition) GetPurchasesAmount() uint64 {
|
|
if x != nil && x.PurchasesAmount != nil {
|
|
return *x.PurchasesAmount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCondition) GetCartPurchasesAmount() uint64 {
|
|
if x != nil && x.CartPurchasesAmount != nil {
|
|
return *x.CartPurchasesAmount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCondition) GetProduct() string {
|
|
if x != nil && x.Product != nil {
|
|
return *x.Product
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DiscountCondition) GetTerm() uint64 {
|
|
if x != nil && x.Term != nil {
|
|
return *x.Term
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCondition) GetUsage() uint64 {
|
|
if x != nil && x.Usage != nil {
|
|
return *x.Usage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCondition) GetPriceFrom() uint64 {
|
|
if x != nil && x.PriceFrom != nil {
|
|
return *x.PriceFrom
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DiscountCondition) GetGroup() string {
|
|
if x != nil && x.Group != nil {
|
|
return *x.Group
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ProductTarget struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"`
|
|
Overhelm *bool `protobuf:"varint,3,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ProductTarget) Reset() {
|
|
*x = ProductTarget{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ProductTarget) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ProductTarget) ProtoMessage() {}
|
|
|
|
func (x *ProductTarget) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ProductTarget.ProtoReflect.Descriptor instead.
|
|
func (*ProductTarget) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *ProductTarget) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ProductTarget) GetFactor() float64 {
|
|
if x != nil {
|
|
return x.Factor
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ProductTarget) GetOverhelm() bool {
|
|
if x != nil && x.Overhelm != nil {
|
|
return *x.Overhelm
|
|
}
|
|
return false
|
|
}
|
|
|
|
type PeriodCondition struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
From *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"`
|
|
To *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PeriodCondition) Reset() {
|
|
*x = PeriodCondition{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PeriodCondition) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PeriodCondition) ProtoMessage() {}
|
|
|
|
func (x *PeriodCondition) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use PeriodCondition.ProtoReflect.Descriptor instead.
|
|
func (*PeriodCondition) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *PeriodCondition) GetFrom() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.From
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PeriodCondition) GetTo() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.To
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UserInformation struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
|
|
PurchasesAmount uint64 `protobuf:"varint,3,opt,name=PurchasesAmount,proto3" json:"PurchasesAmount,omitempty"`
|
|
CartPurchasesAmount uint64 `protobuf:"varint,4,opt,name=CartPurchasesAmount,proto3" json:"CartPurchasesAmount,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserInformation) Reset() {
|
|
*x = UserInformation{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserInformation) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserInformation) ProtoMessage() {}
|
|
|
|
func (x *UserInformation) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UserInformation.ProtoReflect.Descriptor instead.
|
|
func (*UserInformation) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *UserInformation) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInformation) GetType() string {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserInformation) GetPurchasesAmount() uint64 {
|
|
if x != nil {
|
|
return x.PurchasesAmount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UserInformation) GetCartPurchasesAmount() uint64 {
|
|
if x != nil {
|
|
return x.CartPurchasesAmount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ProductInformation struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
|
Price uint64 `protobuf:"varint,2,opt,name=Price,proto3" json:"Price,omitempty"`
|
|
Term *uint64 `protobuf:"varint,3,opt,name=Term,proto3,oneof" json:"Term,omitempty"`
|
|
Usage *uint64 `protobuf:"varint,4,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"`
|
|
Group *string `protobuf:"bytes,5,opt,name=Group,proto3,oneof" json:"Group,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ProductInformation) Reset() {
|
|
*x = ProductInformation{}
|
|
mi := &file_discount_discount_model_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ProductInformation) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ProductInformation) ProtoMessage() {}
|
|
|
|
func (x *ProductInformation) ProtoReflect() protoreflect.Message {
|
|
mi := &file_discount_discount_model_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ProductInformation.ProtoReflect.Descriptor instead.
|
|
func (*ProductInformation) Descriptor() ([]byte, []int) {
|
|
return file_discount_discount_model_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *ProductInformation) GetID() string {
|
|
if x != nil {
|
|
return x.ID
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ProductInformation) GetPrice() uint64 {
|
|
if x != nil {
|
|
return x.Price
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ProductInformation) GetTerm() uint64 {
|
|
if x != nil && x.Term != nil {
|
|
return *x.Term
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ProductInformation) GetUsage() uint64 {
|
|
if x != nil && x.Usage != nil {
|
|
return *x.Usage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ProductInformation) GetGroup() string {
|
|
if x != nil && x.Group != nil {
|
|
return *x.Group
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_discount_discount_model_proto protoreflect.FileDescriptor
|
|
|
|
const file_discount_discount_model_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1ddiscount/discount.model.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1adiscount/audit.model.proto\"\xef\x02\n" +
|
|
"\x10DiscountOptional\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x17\n" +
|
|
"\x04Name\x18\x02 \x01(\tH\x00R\x04Name\x88\x01\x01\x12\x19\n" +
|
|
"\x05Layer\x18\x03 \x01(\rH\x01R\x05Layer\x88\x01\x01\x12%\n" +
|
|
"\vDescription\x18\x04 \x01(\tH\x02R\vDescription\x88\x01\x01\x12>\n" +
|
|
"\tCondition\x18\x05 \x01(\v2\x1b.discount.DiscountConditionH\x03R\tCondition\x88\x01\x01\x12@\n" +
|
|
"\x06Target\x18\x06 \x01(\v2#.discount.DiscountCalculationTargetH\x04R\x06Target\x88\x01\x01\x12#\n" +
|
|
"\n" +
|
|
"Deprecated\x18\a \x01(\bH\x05R\n" +
|
|
"Deprecated\x88\x01\x01B\a\n" +
|
|
"\x05_NameB\b\n" +
|
|
"\x06_LayerB\x0e\n" +
|
|
"\f_DescriptionB\f\n" +
|
|
"\n" +
|
|
"_ConditionB\t\n" +
|
|
"\a_TargetB\r\n" +
|
|
"\v_Deprecated\"=\n" +
|
|
"\tDiscounts\x120\n" +
|
|
"\tDiscounts\x18\x01 \x03(\v2\x12.discount.DiscountR\tDiscounts\"\xa5\x02\n" +
|
|
"\bDiscount\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
|
|
"\x04Name\x18\x02 \x01(\tR\x04Name\x12\x14\n" +
|
|
"\x05Layer\x18\x03 \x01(\rR\x05Layer\x12 \n" +
|
|
"\vDescription\x18\x04 \x01(\tR\vDescription\x129\n" +
|
|
"\tCondition\x18\x05 \x01(\v2\x1b.discount.DiscountConditionR\tCondition\x12;\n" +
|
|
"\x06Target\x18\x06 \x01(\v2#.discount.DiscountCalculationTargetR\x06Target\x12%\n" +
|
|
"\x05Audit\x18\a \x01(\v2\x0f.discount.AuditR\x05Audit\x12\x1e\n" +
|
|
"\n" +
|
|
"Deprecated\x18\b \x01(\bR\n" +
|
|
"Deprecated\"\x9b\x02\n" +
|
|
"\x19DiscountCalculationTarget\x123\n" +
|
|
"\bProducts\x18\x01 \x03(\v2\x17.discount.ProductTargetR\bProducts\x12\x16\n" +
|
|
"\x06Factor\x18\x02 \x01(\x01R\x06Factor\x12<\n" +
|
|
"\vTargetScope\x18\x03 \x01(\x0e2\x15.discount.TargetScopeH\x00R\vTargetScope\x88\x01\x01\x12%\n" +
|
|
"\vTargetGroup\x18\x04 \x01(\tH\x01R\vTargetGroup\x88\x01\x01\x12\x1f\n" +
|
|
"\bOverhelm\x18\x05 \x01(\bH\x02R\bOverhelm\x88\x01\x01B\x0e\n" +
|
|
"\f_TargetScopeB\x0e\n" +
|
|
"\f_TargetGroupB\v\n" +
|
|
"\t_Overhelm\"\xa8\x04\n" +
|
|
"\x11DiscountCondition\x126\n" +
|
|
"\x06Period\x18\x01 \x01(\v2\x19.discount.PeriodConditionH\x00R\x06Period\x88\x01\x01\x12\x17\n" +
|
|
"\x04User\x18\x02 \x01(\tH\x01R\x04User\x88\x01\x01\x12\x1f\n" +
|
|
"\bUserType\x18\x03 \x01(\tH\x02R\bUserType\x88\x01\x01\x12\x1b\n" +
|
|
"\x06Coupon\x18\x04 \x01(\tH\x03R\x06Coupon\x88\x01\x01\x12-\n" +
|
|
"\x0fPurchasesAmount\x18\x05 \x01(\x04H\x04R\x0fPurchasesAmount\x88\x01\x01\x125\n" +
|
|
"\x13CartPurchasesAmount\x18\x06 \x01(\x04H\x05R\x13CartPurchasesAmount\x88\x01\x01\x12\x1d\n" +
|
|
"\aProduct\x18\a \x01(\tH\x06R\aProduct\x88\x01\x01\x12\x17\n" +
|
|
"\x04Term\x18\b \x01(\x04H\aR\x04Term\x88\x01\x01\x12\x19\n" +
|
|
"\x05Usage\x18\t \x01(\x04H\bR\x05Usage\x88\x01\x01\x12!\n" +
|
|
"\tPriceFrom\x18\n" +
|
|
" \x01(\x04H\tR\tPriceFrom\x88\x01\x01\x12\x19\n" +
|
|
"\x05Group\x18\v \x01(\tH\n" +
|
|
"R\x05Group\x88\x01\x01B\t\n" +
|
|
"\a_PeriodB\a\n" +
|
|
"\x05_UserB\v\n" +
|
|
"\t_UserTypeB\t\n" +
|
|
"\a_CouponB\x12\n" +
|
|
"\x10_PurchasesAmountB\x16\n" +
|
|
"\x14_CartPurchasesAmountB\n" +
|
|
"\n" +
|
|
"\b_ProductB\a\n" +
|
|
"\x05_TermB\b\n" +
|
|
"\x06_UsageB\f\n" +
|
|
"\n" +
|
|
"_PriceFromB\b\n" +
|
|
"\x06_Group\"e\n" +
|
|
"\rProductTarget\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x16\n" +
|
|
"\x06Factor\x18\x02 \x01(\x01R\x06Factor\x12\x1f\n" +
|
|
"\bOverhelm\x18\x03 \x01(\bH\x00R\bOverhelm\x88\x01\x01B\v\n" +
|
|
"\t_Overhelm\"m\n" +
|
|
"\x0fPeriodCondition\x12.\n" +
|
|
"\x04From\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x04From\x12*\n" +
|
|
"\x02To\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02To\"\x91\x01\n" +
|
|
"\x0fUserInformation\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
|
|
"\x04Type\x18\x02 \x01(\tR\x04Type\x12(\n" +
|
|
"\x0fPurchasesAmount\x18\x03 \x01(\x04R\x0fPurchasesAmount\x120\n" +
|
|
"\x13CartPurchasesAmount\x18\x04 \x01(\x04R\x13CartPurchasesAmount\"\xa6\x01\n" +
|
|
"\x12ProductInformation\x12\x0e\n" +
|
|
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x14\n" +
|
|
"\x05Price\x18\x02 \x01(\x04R\x05Price\x12\x17\n" +
|
|
"\x04Term\x18\x03 \x01(\x04H\x00R\x04Term\x88\x01\x01\x12\x19\n" +
|
|
"\x05Usage\x18\x04 \x01(\x04H\x01R\x05Usage\x88\x01\x01\x12\x19\n" +
|
|
"\x05Group\x18\x05 \x01(\tH\x02R\x05Group\x88\x01\x01B\a\n" +
|
|
"\x05_TermB\b\n" +
|
|
"\x06_UsageB\b\n" +
|
|
"\x06_Group*+\n" +
|
|
"\vTargetScope\x12\a\n" +
|
|
"\x03Sum\x10\x00\x12\t\n" +
|
|
"\x05Group\x10\x01\x12\b\n" +
|
|
"\x04Each\x10\x02B\fZ\n" +
|
|
"./discountb\x06proto3"
|
|
|
|
var (
|
|
file_discount_discount_model_proto_rawDescOnce sync.Once
|
|
file_discount_discount_model_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_discount_discount_model_proto_rawDescGZIP() []byte {
|
|
file_discount_discount_model_proto_rawDescOnce.Do(func() {
|
|
file_discount_discount_model_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_discount_model_proto_rawDesc), len(file_discount_discount_model_proto_rawDesc)))
|
|
})
|
|
return file_discount_discount_model_proto_rawDescData
|
|
}
|
|
|
|
var file_discount_discount_model_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_discount_discount_model_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
|
var file_discount_discount_model_proto_goTypes = []any{
|
|
(TargetScope)(0), // 0: discount.TargetScope
|
|
(*DiscountOptional)(nil), // 1: discount.DiscountOptional
|
|
(*Discounts)(nil), // 2: discount.Discounts
|
|
(*Discount)(nil), // 3: discount.Discount
|
|
(*DiscountCalculationTarget)(nil), // 4: discount.DiscountCalculationTarget
|
|
(*DiscountCondition)(nil), // 5: discount.DiscountCondition
|
|
(*ProductTarget)(nil), // 6: discount.ProductTarget
|
|
(*PeriodCondition)(nil), // 7: discount.PeriodCondition
|
|
(*UserInformation)(nil), // 8: discount.UserInformation
|
|
(*ProductInformation)(nil), // 9: discount.ProductInformation
|
|
(*Audit)(nil), // 10: discount.Audit
|
|
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
|
}
|
|
var file_discount_discount_model_proto_depIdxs = []int32{
|
|
5, // 0: discount.DiscountOptional.Condition:type_name -> discount.DiscountCondition
|
|
4, // 1: discount.DiscountOptional.Target:type_name -> discount.DiscountCalculationTarget
|
|
3, // 2: discount.Discounts.Discounts:type_name -> discount.Discount
|
|
5, // 3: discount.Discount.Condition:type_name -> discount.DiscountCondition
|
|
4, // 4: discount.Discount.Target:type_name -> discount.DiscountCalculationTarget
|
|
10, // 5: discount.Discount.Audit:type_name -> discount.Audit
|
|
6, // 6: discount.DiscountCalculationTarget.Products:type_name -> discount.ProductTarget
|
|
0, // 7: discount.DiscountCalculationTarget.TargetScope:type_name -> discount.TargetScope
|
|
7, // 8: discount.DiscountCondition.Period:type_name -> discount.PeriodCondition
|
|
11, // 9: discount.PeriodCondition.From:type_name -> google.protobuf.Timestamp
|
|
11, // 10: discount.PeriodCondition.To:type_name -> google.protobuf.Timestamp
|
|
11, // [11:11] is the sub-list for method output_type
|
|
11, // [11:11] is the sub-list for method input_type
|
|
11, // [11:11] is the sub-list for extension type_name
|
|
11, // [11:11] is the sub-list for extension extendee
|
|
0, // [0:11] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_discount_discount_model_proto_init() }
|
|
func file_discount_discount_model_proto_init() {
|
|
if File_discount_discount_model_proto != nil {
|
|
return
|
|
}
|
|
file_discount_audit_model_proto_init()
|
|
file_discount_discount_model_proto_msgTypes[0].OneofWrappers = []any{}
|
|
file_discount_discount_model_proto_msgTypes[3].OneofWrappers = []any{}
|
|
file_discount_discount_model_proto_msgTypes[4].OneofWrappers = []any{}
|
|
file_discount_discount_model_proto_msgTypes[5].OneofWrappers = []any{}
|
|
file_discount_discount_model_proto_msgTypes[8].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_discount_model_proto_rawDesc), len(file_discount_discount_model_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 9,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_discount_discount_model_proto_goTypes,
|
|
DependencyIndexes: file_discount_discount_model_proto_depIdxs,
|
|
EnumInfos: file_discount_discount_model_proto_enumTypes,
|
|
MessageInfos: file_discount_discount_model_proto_msgTypes,
|
|
}.Build()
|
|
File_discount_discount_model_proto = out.File
|
|
file_discount_discount_model_proto_goTypes = nil
|
|
file_discount_discount_model_proto_depIdxs = nil
|
|
}
|