From 6b7ffb81ea0c59c19f4c9f435acf08be5af1cf10 Mon Sep 17 00:00:00 2001 From: jiahui Date: Tue, 19 Mar 2024 11:53:33 +0800 Subject: [PATCH] fix --- controllers/pkg/types/global.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/controllers/pkg/types/global.go b/controllers/pkg/types/global.go index 344b5aca847..51e67dff76b 100644 --- a/controllers/pkg/types/global.go +++ b/controllers/pkg/types/global.go @@ -25,7 +25,7 @@ type Account struct { ActivityBonus int64 `gorm:"column:activityBonus;type:bigint;not null"` EncryptBalance string `gorm:"column:encryptBalance;type:text;not null"` EncryptDeductionBalance string `gorm:"column:encryptDeductionBalance;type:text;not null"` - CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp()"` CreateRegionID string `gorm:"type:text;not null"` Balance int64 DeductionBalance int64 @@ -48,8 +48,8 @@ type RegionUserCr struct { UID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primary_key"` CrName string `gorm:"type:text;column:crName;not null;unique"` UserUID uuid.UUID `gorm:"column:userUid;type:uuid;not null"` - CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3);default:current_timestamp();not null"` - UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3);default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3);default:current_timestamp()"` + UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3);default:current_timestamp()"` } type OauthProvider struct { @@ -57,8 +57,8 @@ type OauthProvider struct { UserUID uuid.UUID `gorm:"column:userUid;type:uuid;not null"` ProviderType OauthProviderType `gorm:"column:providerType;type:text;not null"` ProviderID string `gorm:"column:providerId;type:text;not null"` - CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3);default:current_timestamp();not null"` - UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3);default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3);default:current_timestamp()"` + UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3);default:current_timestamp()"` Password string `gorm:"type:text"` } @@ -68,7 +68,7 @@ type Transfer struct { ToUserUID uuid.UUID `gorm:"column:toUserUid;type:uuid;not null"` Amount int64 `gorm:"type:bigint;not null"` Remark string `gorm:"type:text;not null"` - CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp()"` } func (Transfer) TableName() string { @@ -77,8 +77,8 @@ func (Transfer) TableName() string { type User struct { UID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primary_key"` - CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3) with time zone;default:current_timestamp();not null"` - UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3) with time zone;default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"column:createdAt;type:timestamp(3) with time zone;default:current_timestamp()"` + UpdatedAt time.Time `gorm:"column:updatedAt;type:timestamp(3) with time zone;default:current_timestamp()"` AvatarURI string `gorm:"column:avatarUri;type:text"` Nickname string `gorm:"type:text"` ID string `gorm:"type:text;not null;unique"` @@ -134,7 +134,7 @@ func (NullUserRecord) TableName() string { type ErrorAccountCreate struct { Account UserCr string `gorm:"column:userCr;type:text;not null;unique"` - ErrorTime time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp();not null"` + ErrorTime time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp()"` RegionUID uuid.UUID `gorm:"column:regionUid;type:uuid;not null"` RegionUserOwner string `gorm:"column:regionUserOwner;type:text;not null"` Message string `gorm:"type:text;not null"` @@ -146,14 +146,14 @@ func (ErrorAccountCreate) TableName() string { type ErrorPaymentCreate struct { PaymentRaw - CreateTime time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp();not null"` + CreateTime time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp()"` Message string `gorm:"type:text;not null"` } type PaymentRaw struct { UserUID uuid.UUID `gorm:"column:userUid;type:uuid;not null"` RegionUID uuid.UUID `gorm:"column:regionUid;type:uuid;not null"` - CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp();not null"` + CreatedAt time.Time `gorm:"type:timestamp(3) with time zone;default:current_timestamp()"` RegionUserOwner string `gorm:"column:regionUserOwner;type:text;not null"` Method string `gorm:"type:text;not null"` Amount int64 `gorm:"type:bigint;not null"`