forked from free-lancers/electricity_bill_calc_service
		
	refactor(time):彻底重构time类型。
This commit is contained in:
		
							
								
								
									
										15
									
								
								vo/user.go
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								vo/user.go
									
									
									
									
									
								
							| @@ -2,9 +2,8 @@ package vo | ||||
|  | ||||
| import ( | ||||
| 	"electricity_bill_calc/model" | ||||
| 	"electricity_bill_calc/tools/time" | ||||
| 	"electricity_bill_calc/types" | ||||
| 	st "time" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/shopspring/decimal" | ||||
| ) | ||||
| @@ -38,10 +37,10 @@ func (u MGTAndOPSAccountCreationForm) IntoUserDetail() *model.UserDetail { | ||||
| 		Contact:           u.Contact, | ||||
| 		Phone:             u.Phone, | ||||
| 		UnitServiceFee:    decimal.Zero, | ||||
| 		ServiceExpiration: types.NewDate(2099, st.December, 31), | ||||
| 		CreatedAt:         time.Now(), | ||||
| 		ServiceExpiration: types.NewDate(2099, time.December, 31), | ||||
| 		CreatedAt:         types.Now(), | ||||
| 		CreatedBy:         nil, | ||||
| 		LastModifiedAt:    time.Now(), | ||||
| 		LastModifiedAt:    types.Now(), | ||||
| 		LastModifiedBy:    nil, | ||||
| 		DeletedAt:         nil, | ||||
| 		DeletedBy:         nil, | ||||
| @@ -82,10 +81,10 @@ func (u EnterpriseAccountCreationForm) IntoUserDetail() (*model.UserDetail, erro | ||||
| 		Contact:           u.Contact, | ||||
| 		Phone:             u.Phone, | ||||
| 		UnitServiceFee:    unitServiceFee, | ||||
| 		ServiceExpiration: types.NewDate(2000, st.January, 1), | ||||
| 		CreatedAt:         time.Now(), | ||||
| 		ServiceExpiration: types.NewDate(2000, time.January, 1), | ||||
| 		CreatedAt:         types.Now(), | ||||
| 		CreatedBy:         nil, | ||||
| 		LastModifiedAt:    time.Now(), | ||||
| 		LastModifiedAt:    types.Now(), | ||||
| 		LastModifiedBy:    nil, | ||||
| 		DeletedAt:         nil, | ||||
| 		DeletedBy:         nil, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user