forked from free-lancers/electricity_bill_calc_service
refactor(time):彻底重构time类型。
This commit is contained in:
@@ -47,9 +47,9 @@ func (m ManagementAccountCreationForm) IntoUserDetail() *UserDetail {
|
||||
Phone: m.Phone,
|
||||
UnitServiceFee: decimal.Zero,
|
||||
ServiceExpiration: m.Expires,
|
||||
CreatedAt: time.Now(),
|
||||
CreatedAt: types.Now(),
|
||||
CreatedBy: nil,
|
||||
LastModifiedAt: time.Now(),
|
||||
LastModifiedAt: types.Now(),
|
||||
LastModifiedBy: nil,
|
||||
DeletedAt: nil,
|
||||
DeletedBy: nil,
|
||||
@@ -85,11 +85,11 @@ type UserDetail struct {
|
||||
Phone *string `json:"phone"`
|
||||
UnitServiceFee decimal.Decimal `db:"unit_service_fee" json:"unitServiceFee"`
|
||||
ServiceExpiration types.Date `json:"serviceExpiration"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
CreatedAt types.DateTime `json:"createdAt"`
|
||||
CreatedBy *string `json:"createdBy"`
|
||||
LastModifiedAt time.Time `json:"lastModifiedAt"`
|
||||
LastModifiedAt types.DateTime `json:"lastModifiedAt"`
|
||||
LastModifiedBy *string `json:"lastModifiedBy"`
|
||||
DeletedAt *time.Time `json:"deletedAt"`
|
||||
DeletedAt *types.DateTime `json:"deletedAt"`
|
||||
DeletedBy *string `json:"deletedBy"`
|
||||
}
|
||||
|
||||
@@ -107,8 +107,8 @@ type UserWithDetail struct {
|
||||
Phone *string `json:"phone"`
|
||||
UnitServiceFee decimal.Decimal `db:"unit_service_fee" json:"unitServiceFee"`
|
||||
ServiceExpiration types.Date `json:"serviceExpiration"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
CreatedAt types.DateTime `json:"createdAt"`
|
||||
CreatedBy *string `json:"createdBy"`
|
||||
LastModifiedAt time.Time `json:"lastModifiedAt"`
|
||||
LastModifiedAt types.DateTime `json:"lastModifiedAt"`
|
||||
LastModifiedBy *string `json:"lastModifiedBy"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user