forked from free-lancers/electricity_bill_calc_service
		
	feat(charge):基本完成用户充值管理部分接口。
This commit is contained in:
		
							
								
								
									
										30
									
								
								model/charge.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								model/charge.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| package model | ||||
|  | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/shopspring/decimal" | ||||
| ) | ||||
|  | ||||
| type UserChargeDetail struct { | ||||
| 	Seq         int64            `json:"seq"` | ||||
| 	UserId      string           `json:"user_id"` | ||||
| 	Name        string           `json:"name"` | ||||
| 	Fee         *decimal.Decimal `json:"fee"` | ||||
| 	Discount    *decimal.Decimal `json:"discount"` | ||||
| 	Amount      *decimal.Decimal `json:"amount"` | ||||
| 	ChargeTo    Date             `json:"charge_to"` | ||||
| 	Settled     bool             `json:"settled"` | ||||
| 	SettledAt   *time.Time       `json:"settled_at"` | ||||
| 	Cancelled   bool             `json:"cancelled"` | ||||
| 	CancelledAt *time.Time       `json:"cancelled_at"` | ||||
| 	CreatedAt   time.Time        `json:"created_at"` | ||||
| } | ||||
|  | ||||
| type ChargeRecordCreationForm struct { | ||||
| 	UserId   string           `json:"userId"` | ||||
| 	Fee      *decimal.Decimal `json:"fee"` | ||||
| 	Discount *decimal.Decimal `json:"discount"` | ||||
| 	Amount   *decimal.Decimal `json:"amount"` | ||||
| 	ChargeTo Date             `json:"chargeTo"` | ||||
| } | ||||
		Reference in New Issue
	
	Block a user