Documentation
¶
Index ¶
- type Address
- type CartForm
- type CheckAllForm
- type CommentListByProductForm
- type ComplaintForm
- type DelCartForm
- type FindOrderListForm
- type IdForm
- type LoginForm
- type NewOrderForm
- type OrderPkgItem
- type OrderSendOutForm
- type PageForm
- type PaginationForm
- type ProductListForm
- type PswForm
- type RefundForm
- type RegisterForm
- type SellerGetOrderListForm
- type UserFormWithRole
- type UserUpdateForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { ID uint64 `form:"id"` Name string `form:"name"` // 收件人姓名 Address string `form:"address"` // 地址 Phone string `form:"phone"` // 手机号 Default bool `form:"default"` // 是否设为默认 }
地址表单 TODO 表单验证 默认地址
type CartForm ¶
type CartForm struct { //UserId uint64 `form:"user_id"` // 用户 ID ProductPackageId uint64 `json:"product_package_id" form:"product_package_id"` // 套餐 ID Nums int `json:"nums" form:"nums"` //数量 Checked bool `json:"checked" form:"checked"` //是否勾选 }
购物车表单
type CheckAllForm ¶
type CheckAllForm struct {
Checked bool `json:"checked" form:"checked"`
}
type CommentListByProductForm ¶
type CommentListByProductForm struct { ProductId uint64 `json:"product_id" form:"product_id"` PageForm }
请求评论信息表单
type ComplaintForm ¶
type ComplaintForm struct { ID uint64 `json:"id"` // 订单ID ComplaintReason string `json:"complaint_reason"` // 投诉原因 }
退款申请表单(带退款原因)
type DelCartForm ¶
type DelCartForm struct {
ProductPackageId uint64 `json:"product_package_id" form:"product_package_id"` // 套餐 ID
}
删除购物车 item 表单
type FindOrderListForm ¶
type FindOrderListForm struct { }
//////////////// 管理系统相关 /////////////////// 获取订单列表的表单(包含页码信息,以及订单号,买家/买家ID筛选)
type NewOrderForm ¶
type NewOrderForm struct { Name string `form:"name"` // 收件人姓名 Address string `form:"address"` // 地址 Phone string `form:"phone"` // 手机号 OrderPkgList []OrderPkgItem `json:"order_pkg_list"` OrderTotal float64 `json:"order_total"` }
新订单表单
type OrderPkgItem ¶
type OrderPkgItem struct { BuyerId uint64 `json:"buyer_id"` // 购买者 ID SellerID uint64 `json:"seller_id"` // 卖家 ID ProductID uint64 `json:"product_id"` // 产品 ID ProductPackageID uint64 `json:"product_package_id"` // 套餐 ID Price float64 `json:"price"` // 单价 Nums int `json:"nums"` // 数量 }
单个订单
type OrderSendOutForm ¶
type OrderSendOutForm struct { OrderId uint64 `json:"order_id"` // 订单ID CheckingNumber string `json:"checking_number"` // 物流单号 }
发货请求的表单
type PaginationForm ¶
type PaginationForm struct { CurrentPage int `json:"currentPage" form:"currentPage"` PageSize int `json:"pageSize" form:"pageSize"` }
管理系统的页码信息
type ProductListForm ¶
type ProductListForm struct { Page int `form:"page"` // 页码 PageSize int `form:"page_size"` // 每页数量 Name string `form:"name"` // 产品名称 Type int `form:"type"` // 产品类型 Sort string `form:"sort"` // 按照 products 中哪个字段排序 Asc bool `form:"asc"` // 升序 FundingStatus int `form:"funding_status"` // 众筹状态 }
获取产品列表的表单
type RefundForm ¶
type RefundForm struct { ID uint64 `json:"id"` // 订单ID RefundReason string `json:"refund_reason"` // 退款原因 }
退款申请表单(带退款原因)
type RegisterForm ¶
type RegisterForm struct { Username string `json:"username" form:"username"` Password string `json:"password" form:"password"` Nickname string `json:"nickname" form:"nickname"` Email string `json:"email" form:"email"` Phone string `json:"phone" form:"phone"` }
注册表单 //TODO valid 数据验证
type SellerGetOrderListForm ¶
type SellerGetOrderListForm struct { PageForm // 页码信息 OrderStatus enums.OrderStatus `json:"order_status" form:"order_status"` // 订单状态 FundingStatus enums.FundingStatus `json:"funding_status" form:"funding_status"` // 众筹状态 (0 :全部 ,1:众筹成功,2:失败,3:正在进行) ProductId uint64 `json:"product_id"` // 商品ID }
卖家获取订单的 Form
type UserFormWithRole ¶
type UserFormWithRole struct { ID uint64 `json:"id" form:"id"` Username string `json:"username" form:"username"` Password string `json:"password" form:"password"` Nickname string `json:"nickname" form:"nickname"` RoleId int `json:"role_id" gorm:"default:0"` //角色 ( 0:普通用户(默认) ) Email string `json:"email" form:"email"` Phone string `json:"phone" form:"phone"` }
注册表单 带角色
type UserUpdateForm ¶
type UserUpdateForm struct { ID uint64 `json:"id"` // ID Username string `json:"username"` // 账号 Password string `json:"password"` // 密码 Nickname string `json:"nickname"` // 昵称 Email string `json:"email"` // 邮箱 Phone string `json:"phone"` // 手机号 IconUrl string `json:"icon_url"` // 头像 }
用户表
Source Files
¶
Click to show internal directories.
Click to hide internal directories.