Documentation ¶
Index ¶
Constants ¶
View Source
const ( COL_CUSTOMERS = "customers" COL_BOOKS = "books" COL_CARTS = "carts" COL_ORDERS = "orders" COL_COMMENT = "comments" COL_PAYMENT = "payments" COL_SHIPPING_INFO = "shipping_infos" COL_STAFF = "staffs" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Book ¶
type Book struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Title string `json:"title"` Description string `json:"description"` Organization string `json:"organization"` Author string `json:"author"` Inventory uint64 `json:"inventory"` FromTime uint64 `json:"from_time"` ToTime uint64 `json:"to_time"` Price uint64 `json:"price"` DiscountPrice uint64 `json:"discount_price"` CategoryName string `json:"category_name"` Images []string `json:"images"` Comments []Comment `json:"comments"` }
Books ...
type Cart ¶
type Cart struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Amount int `json:"amount"` BookID bson.ObjectId `json:"book_id" bson:"_book_id,omitempty" form:"book_id,omitempty"` }
Cart ...
type Comment ¶
type Comment struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` ObjectID bson.ObjectId `json:"object_id" bson:"_object_id,omitempty"` ObjectType string `json:"object_type"` Content string `json:"content"` CommentDate uint64 `json:"comment_date"` StatusReply bool `json:"status_reply"` }
Comment ...
type Customer ¶
type Customer struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Email string `json:"email" form:"email,omitempty"` Password string `json:"-" form:"-" bson:"password,omitempty"` FirstName string `json:"first_name" form:"first_name,omitempty"` LastName string `json:"last_name" form:"last_name,omitempty"` Phone string `json:"phone" form:"phone,omitempty"` Username string `json:"username" form:"username,omitempty"` Avatar string `json:"avatar"` Carts []Cart `json:"carts"` }
Customer ...
func CreateCustomer ¶
CreateCustomer ...
type Order ¶
type Order struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Note string `json:"note"` OrderDate uint64 `json:"order_date"` ShippingFee uint64 `json:"shipping_fee"` Status uint64 `json:"status"` BookIDs []bson.ObjectId `json:"book_id" bson:"_book_id,omitempty"` Payment Payment `json:"payment"` CustomerID bson.ObjectId `json:"customer_id" bson:"_customer_id,omitempty"` }
Order ...
func CreateOrder ¶
type Payment ¶
type Payment struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Method string `json:"method"` }
Payment ...
type Staff ¶
type Staff struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty" form:"id,omitempty"` Email string `json:"email" form:"email,omitempty"` Password string `json:"-" form:"-" bson:"password,omitempty"` FirstName string `json:"first_name" form:"first_name,omitempty"` LastName string `json:"last_name" form:"last_name,omitempty"` Phone string `json:"phone" form:"phone,omitempty"` Username string `json:"username" form:"username,omitempty"` Position string `json:"position"` Avatar string `json:"avatar"` }
Staff ...
Click to show internal directories.
Click to hide internal directories.