model

package
v0.0.0-...-1512f51 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Id        int64
	Name      string
	CreatorId int64
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
}

type Image

type Image struct {
	Id       int64
	Filename string
	Data     []byte
	TempDir  string
}

type Spu

type Spu struct {
	SpuId               int64
	Name                string
	CreatorId           int64
	Description         string
	CategoryId          int64
	GoodsHeadDrawing    []byte
	Price               float64
	ForSale             int
	Shipping            float64
	CreatedAt           int64
	UpdatedAt           int64
	DeletedAt           int64
	GoodsHeadDrawingUrl string
}

type SpuES

type SpuES struct {
	SpuId      string  `json:"spu_id,omitempty"`
	Name       string  `json:"name,omitempty"`
	CategoryId string  `json:"category_id,omitempty"`
	Price      float64 `json:"price,omitempty"`
	Shipping   bool    `json:"shipping,omitempty"`
}

SpuEs : SpuId 和 Category 不能是int64, 存到es里会有精度损失, ref: https://www.cnblogs.com/ahfuzhang/p/16922292.html

type SpuImage

type SpuImage struct {
	ImageID   int64
	SpuID     int64
	Url       string
	CreatedAt int64
	UpdatedAt int64
	DeletedAt int64
	Data      []byte
}

type SpuImages

type SpuImages struct {
	Images []*SpuImage
	Total  int64
}

Jump to

Keyboard shortcuts

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