business

package
v0.0.0-...-418b934 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Business

type Business struct {
	entity.Base
	EntityID       uuid.UUID `gorm:"not null"`
	AdminUserID    uuid.UUID `gorm:"not null"`
	Name           string    `grom:"not null"`
	Description    string
	BannerImageURL string
	LogoURL        string
	DeliveryFee    float32
	ReferralID     uint64 `gorm:"not null;type:serial"`

	OpenSchedule  []*OpenSchedule
	CloseSchedule []*CloseSchedule

	IsActive           bool `gorm:"not null;default:true"`
	IsFixedDeliveryFee bool `gorm:"not null;default:true"`
}

Business entity

func (*Business) MarshalBinary

func (b *Business) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*Business) ToDTO

func (b *Business) ToDTO() (*module.BusinessDetailedDTO, error)

ToDTO detailed dto

func (*Business) ToSimpleDTO

func (b *Business) ToSimpleDTO() (*module.BusinessSimpleDTO, error)

ToSimpleDTO simple dto

func (*Business) UnmarshalBinary

func (b *Business) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

type CloseSchedule

type CloseSchedule struct {
	gorm.Model
	Date     time.Time `gorm:"not null;"`
	Start    time.Time
	End      time.Time
	IsAllDay bool `gorm:"not null;default:true"`
	IsActive bool `gorm:"not null;default:true"`
}

CloseSchedule business special close dates

func (*CloseSchedule) MarshalBinary

func (c *CloseSchedule) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*CloseSchedule) ToDTO

func (c *CloseSchedule) ToDTO() (*module.CloseScheduleDTO, error)

ToDTO dto

func (*CloseSchedule) UnmarshalBinary

func (c *CloseSchedule) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

type OpenSchedule

type OpenSchedule struct {
	gorm.Model
	Day      int32     `grom:"not null"`
	IsAllDay bool      `gorm:"not null;default: false"`
	Start    time.Time `gorm:"not null"`
	End      time.Time `gorm:"not null"`

	IsActive bool `gorm:"not null"`
}

OpenSchedule entity

func (*OpenSchedule) MarshalBinary

func (o *OpenSchedule) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*OpenSchedule) ToDTO

func (o *OpenSchedule) ToDTO() (*module.OpenScheduleDTO, error)

ToDTO dto

func (*OpenSchedule) UnmarshalBinary

func (o *OpenSchedule) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

Jump to

Keyboard shortcuts

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