model

package
v0.0.0-...-2236603 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_admin_proto protoreflect.FileDescriptor
View Source
var File_seller_proto protoreflect.FileDescriptor
View Source
var File_transaction_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Admin

type Admin struct {
	AdminId        string `protobuf:"bytes,1,opt,name=AdminId,proto3" json:"AdminId,omitempty"` // Unique identifier for the admin
	Username       string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email          string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	HashedPassword string `protobuf:"bytes,4,opt,name=hashed_password,json=hashedPassword,proto3" json:"hashed_password,omitempty"` // Password should be stored securely (e.g., hashed)
	PhoneNumber    string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

func (*Admin) DeleteAdmin

func (d *Admin) DeleteAdmin() error

func (*Admin) Descriptor deprecated

func (*Admin) Descriptor() ([]byte, []int)

Deprecated: Use Admin.ProtoReflect.Descriptor instead.

func (*Admin) GetAdmin

func (g *Admin) GetAdmin() error

func (*Admin) GetAdminId

func (x *Admin) GetAdminId() string

func (*Admin) GetEmail

func (x *Admin) GetEmail() string

func (*Admin) GetHashedPassword

func (x *Admin) GetHashedPassword() string

func (*Admin) GetPhoneNumber

func (x *Admin) GetPhoneNumber() string

func (*Admin) GetUsername

func (x *Admin) GetUsername() string

func (*Admin) ProtoMessage

func (*Admin) ProtoMessage()

func (*Admin) ProtoReflect

func (x *Admin) ProtoReflect() protoreflect.Message

func (*Admin) Reset

func (x *Admin) Reset()

func (*Admin) SaveAdmin

func (s *Admin) SaveAdmin() error

func (*Admin) String

func (x *Admin) String() string

func (*Admin) UpdateAdmin

func (u *Admin) UpdateAdmin() error

type Product

type Product struct {
	ProductId   string   `protobuf:"bytes,1,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
	ProductName string   `protobuf:"bytes,2,opt,name=ProductName,proto3" json:"ProductName,omitempty"`
	Description string   `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Price       float64  `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"`
	Category    string   `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"`
	Images      []string `protobuf:"bytes,6,rep,name=images,proto3" json:"images,omitempty"`
	Stock       int32    `protobuf:"varint,7,opt,name=stock,proto3" json:"stock,omitempty"`
	IsActive    bool     `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) DeleteProduct

func (d *Product) DeleteProduct() error

func (*Product) Descriptor deprecated

func (*Product) Descriptor() ([]byte, []int)

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetCategory

func (x *Product) GetCategory() string

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetImages

func (x *Product) GetImages() []string

func (*Product) GetIsActive

func (x *Product) GetIsActive() bool

func (*Product) GetPrice

func (x *Product) GetPrice() float64

func (*Product) GetProduct

func (g *Product) GetProduct() error

func (*Product) GetProductId

func (x *Product) GetProductId() string

func (*Product) GetProductName

func (x *Product) GetProductName() string

func (*Product) GetStock

func (x *Product) GetStock() int32

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

func (x *Product) ProtoReflect() protoreflect.Message

func (*Product) Reset

func (x *Product) Reset()

func (*Product) SaveProduct

func (s *Product) SaveProduct() error

func (*Product) String

func (x *Product) String() string

func (*Product) UpdateProduct

func (u *Product) UpdateProduct() error

type Seller

type Seller struct {
	SellerId           string   `protobuf:"bytes,1,opt,name=SellerId,proto3" json:"SellerId,omitempty"` // Unique identifier for the seller
	Name               string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ContactInformation string   `protobuf:"bytes,3,opt,name=contact_information,json=contactInformation,proto3" json:"contact_information,omitempty"` // Phone number, email, or both
	Address            string   `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	RationCategory     string   `protobuf:"bytes,5,opt,name=ration_category,json=rationCategory,proto3" json:"ration_category,omitempty"`             // Category of rations provided (e.g., grains, pulses, oil)
	RegistrationNumber string   `protobuf:"bytes,6,opt,name=registration_number,json=registrationNumber,proto3" json:"registration_number,omitempty"` // Unique registration ID (if applicable)
	Certifications     []string `protobuf:"bytes,7,rep,name=certifications,proto3" json:"certifications,omitempty"`                                   // List of certifications held by the seller
	// contains filtered or unexported fields
}

func (*Seller) DeleteSeller

func (d *Seller) DeleteSeller(SellerId string) error

func (*Seller) Descriptor deprecated

func (*Seller) Descriptor() ([]byte, []int)

Deprecated: Use Seller.ProtoReflect.Descriptor instead.

func (*Seller) GetAddress

func (x *Seller) GetAddress() string

func (*Seller) GetCertifications

func (x *Seller) GetCertifications() []string

func (*Seller) GetContactInformation

func (x *Seller) GetContactInformation() string

func (*Seller) GetName

func (x *Seller) GetName() string

func (*Seller) GetRationCategory

func (x *Seller) GetRationCategory() string

func (*Seller) GetRegistrationNumber

func (x *Seller) GetRegistrationNumber() string

func (*Seller) GetSeller

func (g *Seller) GetSeller(SellerId string) error

func (*Seller) GetSellerId

func (x *Seller) GetSellerId() string

func (*Seller) ProtoMessage

func (*Seller) ProtoMessage()

func (*Seller) ProtoReflect

func (x *Seller) ProtoReflect() protoreflect.Message

func (*Seller) Reset

func (x *Seller) Reset()

func (*Seller) SaveSeller

func (s *Seller) SaveSeller() error

func (*Seller) String

func (x *Seller) String() string

func (*Seller) UpdateSeller

func (u *Seller) UpdateSeller(SellerId string) error

type Transaction

type Transaction struct {
	TransactionId string     `protobuf:"bytes,1,opt,name=TransactionId,proto3" json:"TransactionId,omitempty"` // Unique identifier for the transaction
	PaymentMethod string     `protobuf:"bytes,2,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"`
	Timestamp     int64      `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp of the transaction
	Products      []*Product `protobuf:"bytes,4,rep,name=products,proto3" json:"products,omitempty"`
	Status        string     `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`                                   // Transaction status (e.g., issued, pending, returned)
	RationCardId  string     `protobuf:"bytes,6,opt,name=ration_card_id,json=rationCardId,proto3" json:"ration_card_id,omitempty"` // Unique identifier for the ration card
	Address       string     `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) DeleteTransaction

func (d *Transaction) DeleteTransaction() error

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetAddress

func (x *Transaction) GetAddress() string

func (*Transaction) GetPaymentMethod

func (x *Transaction) GetPaymentMethod() string

func (*Transaction) GetProducts

func (x *Transaction) GetProducts() []*Product

func (*Transaction) GetRationCardId

func (x *Transaction) GetRationCardId() string

func (*Transaction) GetStatus

func (x *Transaction) GetStatus() string

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() int64

func (*Transaction) GetTransaction

func (g *Transaction) GetTransaction() error

func (*Transaction) GetTransactionId

func (x *Transaction) GetTransactionId() string

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) SaveTransaction

func (s *Transaction) SaveTransaction() error

func (*Transaction) String

func (x *Transaction) String() string

func (*Transaction) UpdateTransaction

func (u *Transaction) UpdateTransaction() error

type User

type User struct {
	UserName      string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	PersonId      string `protobuf:"bytes,2,opt,name=person_id,json=personId,proto3" json:"person_id,omitempty"`
	Profile       string `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile,omitempty"`
	Password      string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Email         string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	ProfilePicUrl string `protobuf:"bytes,6,opt,name=profile_pic_url,json=profilePicUrl,proto3" json:"profile_pic_url,omitempty"`
	AccountTime   int64  `protobuf:"varint,7,opt,name=account_time,json=accountTime,proto3" json:"account_time,omitempty"`
	BirthDate     string `protobuf:"bytes,8,opt,name=birth_date,json=birthDate,proto3" json:"birth_date,omitempty"`
	Gender        string `protobuf:"bytes,9,opt,name=gender,proto3" json:"gender,omitempty"`
	LastEdit      int64  `protobuf:"varint,10,opt,name=last_edit,json=lastEdit,proto3" json:"last_edit,omitempty"`
	PhoneNumber   string `protobuf:"bytes,11,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

func (*User) DeleteUserData

func (d *User) DeleteUserData(UserName string) error

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAccountTime

func (x *User) GetAccountTime() int64

func (*User) GetBirthDate

func (x *User) GetBirthDate() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetGender

func (x *User) GetGender() string

func (*User) GetLastEdit

func (x *User) GetLastEdit() int64

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetPersonId

func (x *User) GetPersonId() string

func (*User) GetPhoneNumber

func (x *User) GetPhoneNumber() string

func (*User) GetProfile

func (x *User) GetProfile() string

func (*User) GetProfilePicUrl

func (x *User) GetProfilePicUrl() string

func (*User) GetUserData

func (g *User) GetUserData(userName string) error

func (*User) GetUserName

func (x *User) GetUserName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) SaveUserData

func (s *User) SaveUserData() error

func (*User) String

func (x *User) String() string

func (*User) UpdatedUserData

func (u *User) UpdatedUserData(UserName string) error

previous data first before calling this

Jump to

Keyboard shortcuts

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