u
This commit is contained in:
1 parent
a57070f860
commit
b9f728812d
22 files changed
+2892
-391
No files matched your search
@@ -132,6 +132,14 @@ func (_u *UserInfoUpdate) SetUpdateTime(v time.Time) *UserInfoUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
|
||||
func (_u *UserInfoUpdate) SetNillableUpdateTime(v *time.Time) *UserInfoUpdate {
|
||||
if v != nil {
|
||||
_u.SetUpdateTime(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetLastLoginTime sets the "last_login_time" field.
|
||||
func (_u *UserInfoUpdate) SetLastLoginTime(v time.Time) *UserInfoUpdate {
|
||||
_u.mutation.SetLastLoginTime(v)
|
||||
@@ -159,7 +167,6 @@ func (_u *UserInfoUpdate) Mutation() *UserInfoMutation {
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (_u *UserInfoUpdate) Save(ctx context.Context) (int, error) {
|
||||
_u.defaults()
|
||||
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
||||
}
|
||||
|
||||
@@ -185,14 +192,6 @@ func (_u *UserInfoUpdate) ExecX(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (_u *UserInfoUpdate) defaults() {
|
||||
if _, ok := _u.mutation.UpdateTime(); !ok {
|
||||
v := userinfo.UpdateDefaultUpdateTime()
|
||||
_u.mutation.SetUpdateTime(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (_u *UserInfoUpdate) check() error {
|
||||
if v, ok := _u.mutation.Email(); ok {
|
||||
@@ -387,6 +386,14 @@ func (_u *UserInfoUpdateOne) SetUpdateTime(v time.Time) *UserInfoUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
|
||||
func (_u *UserInfoUpdateOne) SetNillableUpdateTime(v *time.Time) *UserInfoUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetUpdateTime(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetLastLoginTime sets the "last_login_time" field.
|
||||
func (_u *UserInfoUpdateOne) SetLastLoginTime(v time.Time) *UserInfoUpdateOne {
|
||||
_u.mutation.SetLastLoginTime(v)
|
||||
@@ -427,7 +434,6 @@ func (_u *UserInfoUpdateOne) Select(field string, fields ...string) *UserInfoUpd
|
||||
|
||||
// Save executes the query and returns the updated UserInfo entity.
|
||||
func (_u *UserInfoUpdateOne) Save(ctx context.Context) (*UserInfo, error) {
|
||||
_u.defaults()
|
||||
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
||||
}
|
||||
|
||||
@@ -453,14 +459,6 @@ func (_u *UserInfoUpdateOne) ExecX(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (_u *UserInfoUpdateOne) defaults() {
|
||||
if _, ok := _u.mutation.UpdateTime(); !ok {
|
||||
v := userinfo.UpdateDefaultUpdateTime()
|
||||
_u.mutation.SetUpdateTime(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (_u *UserInfoUpdateOne) check() error {
|
||||
if v, ok := _u.mutation.Email(); ok {
|
||||
|
||||
Reference in new issue
Block a user