entity

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//GoodsHotTag 热销
	GoodsHotTag = "HOT"
	//GoodsNewTag 新品
	GoodsNewTag = "NEW"
	//GoodsNoneTag 默认
	GoodsNoneTag = "NONE"
)
View Source
const (
	//OrderStatusPAID 已支付
	OrderStatusPAID = "PAID"
	//OrderStatusNonPayment 未支付
	OrderStatusNonPayment = "NON_PAYMENT"
	//OrderStatusShipment 已发货
	OrderStatusShipment = "SHIPMENT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	freedom.Entity
	po.Admin
}

Admin 管理员实体

func (*Admin) Identity

func (admin *Admin) Identity() string

Identity 唯一

type Cart

type Cart struct {
	freedom.Entity
	po.Cart
}

Cart 购物车项实体

func (*Cart) Identity

func (c *Cart) Identity() string

Identity 唯一

type Delivery

type Delivery struct {
	freedom.Entity
	po.Delivery
}

Delivery .

func (*Delivery) Identity

func (d *Delivery) Identity() string

Identity 唯一

type Goods

type Goods struct {
	freedom.Entity
	po.Goods
}

Goods 商品实体

func (*Goods) Identity

func (g *Goods) Identity() string

Identity 唯一

func (*Goods) MarkedTag

func (g *Goods) MarkedTag(tag string) error

MarkedTag 为商品打tag

func (*Goods) MarshalJSON added in v1.8.9

func (g *Goods) MarshalJSON() ([]byte, error)

MarshalJSON 序列化json.

type Order

type Order struct {
	freedom.Entity
	po.Order
	Details []*po.OrderDetail
}

Order 订单实体

func (*Order) AddOrderDetail added in v1.8.7

func (o *Order) AddOrderDetail(detail *po.OrderDetail)

AddOrderDetail 增加订单详情

func (*Order) Identity

func (o *Order) Identity() string

Identity 唯一

func (*Order) IsPay

func (o *Order) IsPay() bool

IsPay 是否支付

func (*Order) Pay

func (o *Order) Pay()

Pay 实体触发付款

func (*Order) Shipment

func (o *Order) Shipment()

Shipment 实体触发发货

type User

type User struct {
	freedom.Entity
	po.User
}

User 用户实体

func (*User) ChangePassword

func (u *User) ChangePassword(newPassword, oldPassword string) error

ChangePassword 修改密码

func (*User) Identity

func (u *User) Identity() string

Identity 唯一

Jump to

Keyboard shortcuts

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