feat: 代码生成
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package order
|
||||
|
||||
import "sundynix-go/global"
|
||||
|
||||
// Order
|
||||
type Order struct {
|
||||
global.BaseModel
|
||||
UserId string `gorm:"column:user_id;size:50" json:"userId"` //
|
||||
}
|
||||
|
||||
func (Order) TableName() string {
|
||||
return "sundynix_order"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package order
|
||||
|
||||
import "sundynix-go/global"
|
||||
|
||||
// Refund
|
||||
type Refund struct {
|
||||
global.BaseModel
|
||||
UserId string `gorm:"column:user_id;size:50" json:"userId"` //
|
||||
}
|
||||
|
||||
func (Refund) TableName() string {
|
||||
return "sundynix_refund"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package request
|
||||
|
||||
// ---- ----
|
||||
|
||||
// SaveRefundReq 新增请求
|
||||
type SaveRefundReq struct {
|
||||
UserId string `json:"userId" form:"userId"` //
|
||||
}
|
||||
|
||||
// UpdateRefundReq 更新请求
|
||||
type UpdateRefundReq struct {
|
||||
Id string `json:"id" binding:"required"` // ID
|
||||
UserId string `json:"userId" form:"userId"` //
|
||||
}
|
||||
|
||||
// ListRefundReq 分页查询请求
|
||||
type ListRefundReq struct {
|
||||
Current int `json:"current" form:"current"` // 页码
|
||||
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
|
||||
Keyword string `json:"keyword" form:"keyword"` // 关键字搜索
|
||||
}
|
||||
|
||||
// ---- ----
|
||||
|
||||
// SaveStockReq 新增请求
|
||||
type SaveStockReq struct {
|
||||
Amount int64 `json:"amount" form:"amount"` //
|
||||
}
|
||||
|
||||
// UpdateStockReq 更新请求
|
||||
type UpdateStockReq struct {
|
||||
Id string `json:"id" binding:"required"` // ID
|
||||
Amount int64 `json:"amount" form:"amount"` //
|
||||
}
|
||||
|
||||
// ListStockReq 分页查询请求
|
||||
type ListStockReq struct {
|
||||
Current int `json:"current" form:"current"` // 页码
|
||||
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
|
||||
Keyword string `json:"keyword" form:"keyword"` // 关键字搜索
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package order
|
||||
|
||||
import "sundynix-go/global"
|
||||
|
||||
// Stock
|
||||
type Stock struct {
|
||||
global.BaseModel
|
||||
Amount int64 `gorm:"column:amount" json:"amount"` //
|
||||
}
|
||||
|
||||
func (Stock) TableName() string {
|
||||
return "sundynix_stock"
|
||||
}
|
||||
Reference in New Issue
Block a user