purchase

package
v0.0.0-...-5cfecba Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

func (*Date) UnmarshalJSON

func (t *Date) UnmarshalJSON(data []byte) (err error)

type DayTime

type DayTime struct {
	time.Time
}

func (*DayTime) UnmarshalJSON

func (t *DayTime) UnmarshalJSON(data []byte) (err error)

type Journey

type Journey struct {
	ID          bson.ObjectId `json:"id" form:"id" query:"id" bson:"_id,omitempty" binding:"-"`
	StartDate   time.Time     `` /* 126-byte string literal not displayed */
	EndDate     time.Time     `json:"endDate" form:"endDate" query:"endDate" bson:"endDate" binding:"required" time_format:"2006-01-02" time_utc:"1" `
	Destination string        `json:"destination" form:"destination" query:"destination" bson:"destination" binding:"required"`
	Products    []string      `json:"products" form:"products[]" query:"products" bson:"products" binding:"required"`
	Remarks     string        `json:"remarks" form:"remarks" query:"remarks" bson:"remarks" binding:"-"`
	ChargeType  string        `json:"chargeType" form:"chargeType" query:"chargeType" bson:"chargeType" binding:"-"`
	ChargeValue float64       `json:"chargeValue" form:"chargeValue" query:"chargeValue" bson:"chargeValue" binding:"-"`
	CreateBy    string        `json:"createBy" form:"createBy" query:"createBy" bson:"createBy" binding:"-"`
	CreateAt    time.Time     `json:"createAt" form:"-" query:"createAt" bson:"createAt" binding:"-"`
	UpdateAt    time.Time     `json:"updateAt" form:"-" query:"updateAt" bson:"updateAt" binding:"-"`
	State       string        `json:"state" form:"state" query:"state" bson:"state" binding:"-"`
}

func (Journey) Find

func (Journey) Find(sort string, limit int, selectM bson.M, condition bson.M) ([]Journey, error)

func (*Journey) Insert

func (jy *Journey) Insert() error

Insert func 更新代购单

func (Journey) Remove

func (Journey) Remove(selector bson.M) error

Remove func 删除

func (Journey) Update

func (Journey) Update(selector bson.M, update bson.M) error

Update 更新代购单

type Product

type Product struct {
	ID       bson.ObjectId `json:"id" form:"id" query:"id" bson:"_id,omitempty" binding:"-"`              //商品编号
	Name     string        `json:"name" form:"name" query:"name" bson:"name" binding:"-"`                 //商品名称
	Price    float64       `json:"price" form:"price" query:"price" bson:"price" binding:"-"`             //商品参考价格
	Describe string        `json:"describe" form:"describe" query:"describe" bson:"describe" binding:"-"` //商品描述
	Images   string        `json:"images" form:"images" query:"images" bson:"images" binding:"-"`         //商品图片
	ShopName string        `json:"shopName" form:"shopName" query:"shopName" bson:"shopName" binding:"-"` //购买平台
	Quantity int64         `json:"quantity" form:"quantity" query:"quantity" bson:"quantity" binding:"-"`
}

type Purchase

type Purchase struct {
	ID          bson.ObjectId  `json:"id" form:"id" query:"id" bson:"_id,omitempty" binding:"-"`
	Content     string         `json:"content" form:"content" query:"content" bson:"content" binding:"required"` //内容描述
	Amount      float64        `json:"amount" form:"amount" query:"amount" bson:"amount" binding:"exists"`       //内容描述
	Products    []Product      `json:"products" form:"products[]" query:"products" bson:"products" binding:"required"`
	Address     models.Address `json:"address" form:"address" query:"address" bson:"address" binding:"required"`
	Destination string         `json:"destination" form:"destination" query:"destination" bson:"destination" binding:"required"` //目的地
	CreateBy    string         `json:"createBy" form:"createBy" query:"createBy" bson:"createBy" binding:"-"`                    //创建人
	Creator     string         `json:"creator" form:"creator" query:"creator" bson:"creator" binding:"-"`
	CreateAt    time.Time      `json:"createAt" form:"createAt" query:"createAt" bson:"createAt" binding:"-"` //创建时间
	UpdateAt    time.Time      `json:"updateAt" form:"updateAt" query:"updateAt" bson:"updateAt" binding:"-"` //更新时间
	State       string         `json:"state" form:"state" query:"state" bson:"state" binding:"-"`
	Views       int64          `json:"views" form:"views" query:"views" bson:"views" binding:"-"`
	QuotationID string         `json:"quotationID" form:"quotationID" query:"quotationID" bson:"quotationID" binding:"-"`
	// QuotationOrders []QuotationOrder `json:"quotationOrders" form:"-" query:"-" bson:"-" binding:"-"`
	Inviters []string `json:"inviters" form:"-" query:"-" bson:"inviters" binding:"-"`
}

代购发起人信息

func (Purchase) Find

func (Purchase) Find(sort []string, limit int, selectM bson.M, condition bson.M) ([]Purchase, error)

func (*Purchase) Insert

func (p *Purchase) Insert() error

Update 更新代购单

func (Purchase) Update

func (Purchase) Update(selector bson.M, update bson.M) error

Update 更新代购单

type QuotationOrder

type QuotationOrder struct {
	ID           bson.ObjectId `json:"id" form:"id" query:"id" bson:"_id" binding:"-"`
	PurchaseID   string        `json:"purchaseID" form:"purchaseID" query:"purchaseID" bson:"purchaseID" binding:"required"` //代购单号
	Amount       float64       `json:"amount" form:"amount" query:"amount" bson:"amount" binding:"-"`                        //总金额
	Products     []Product     `json:"products" form:"products[]" query:"products[]" bson:"products" binding:"checkProducts"`
	Charge       float64       `json:"charge" form:"charge" query:"charge" bson:"charge" binding:"required"`                  //服务费
	CreateBy     string        `json:"createBy" form:"createBy" query:"createBy" bson:"createBy" binding:"-"`                 //报价人ID
	Creator      string        `json:"creator" form:"creator" query:"creator" bson:"creator" binding:"-"`                     //报价人昵称
	CreateAt     time.Time     `json:"createAt" form:"-" query:"createAt" bson:"createAt" binding:"-"`                        //报价时间
	State        string        `json:"state" form:"state" query:"state" bson:"state" binding:"-"`                             //报价单状态
	ReasonType   string        `json:"reasonType" form:"reasonType" query:"reasonType" bson:"reasonType" binding:"-"`         //拒绝原因
	RefuseReason string        `json:"refuseReason" form:"refuseReason" query:"refuseReason" bson:"refuseReason" binding:"-"` //拒绝理由
	ExpiryTime   DayTime       `json:"expiryTime" form:"-" query:"expiryTime" bson:"expiryTime" binding:"required"`           //失效时间
	DeliveryTime Date          `json:"deliveryTime" form:"-" query:"deliveryTime" bson:"deliveryTime" binding:"required"`     //失效时间
	AllowRepeat  bool          `json:"allowRepeat" form:"allowRepeat" query:"allowRepeat" bson:"allowRepeat"`                 //是否允许再次报价
}

报价单

func (QuotationOrder) Delete

func (qo QuotationOrder) Delete() error

新增文章

func (QuotationOrder) Find

func (QuotationOrder) Find(sort string, limit int, selectM bson.M, condition bson.M) ([]QuotationOrder, error)

func (*QuotationOrder) Insert

func (qo *QuotationOrder) Insert() error

新增文章

func (QuotationOrder) Update

func (QuotationOrder) Update(selector bson.M, update bson.M) error

Update 更新代购单

Jump to

Keyboard shortcuts

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