forked from free-lancers/electricity_bill_calc_service
		
	refactor(types):将日期时间类型提取到公共的类型定义包中。
This commit is contained in:
		| @@ -3,6 +3,7 @@ package vo | ||||
| import ( | ||||
| 	"electricity_bill_calc/model" | ||||
| 	"electricity_bill_calc/tools/time" | ||||
| 	"electricity_bill_calc/types" | ||||
| 	st "time" | ||||
|  | ||||
| 	"github.com/shopspring/decimal" | ||||
| @@ -29,6 +30,7 @@ func (u MGTAndOPSAccountCreationForm) IntoUser() *model.User { | ||||
|  | ||||
| func (u MGTAndOPSAccountCreationForm) IntoUserDetail() *model.UserDetail { | ||||
| 	return &model.UserDetail{ | ||||
| 		Id:                "", | ||||
| 		Name:              &u.Name, | ||||
| 		Abbr:              nil, | ||||
| 		Region:            nil, | ||||
| @@ -36,7 +38,7 @@ func (u MGTAndOPSAccountCreationForm) IntoUserDetail() *model.UserDetail { | ||||
| 		Contact:           u.Contact, | ||||
| 		Phone:             u.Phone, | ||||
| 		UnitServiceFee:    decimal.Zero, | ||||
| 		ServiceExpiration: model.SpecificDate(2099, st.December, 31), | ||||
| 		ServiceExpiration: types.NewDate(2099, st.December, 31), | ||||
| 		CreatedAt:         time.Now(), | ||||
| 		CreatedBy:         nil, | ||||
| 		LastModifiedAt:    time.Now(), | ||||
| @@ -80,7 +82,7 @@ func (u EnterpriseAccountCreationForm) IntoUserDetail() (*model.UserDetail, erro | ||||
| 		Contact:           u.Contact, | ||||
| 		Phone:             u.Phone, | ||||
| 		UnitServiceFee:    unitServiceFee, | ||||
| 		ServiceExpiration: model.SpecificDate(2000, st.January, 1), | ||||
| 		ServiceExpiration: types.NewDate(2000, st.January, 1), | ||||
| 		CreatedAt:         time.Now(), | ||||
| 		CreatedBy:         nil, | ||||
| 		LastModifiedAt:    time.Now(), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user