Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Mar 19, 2024
1 parent 4f00df9 commit 6b7ffb8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions controllers/pkg/types/global.go
Expand Up @@ -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
Expand All @@ -48,17 +48,17 @@ 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 {
UID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primary_key"`
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"`
}

Expand All @@ -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 {
Expand All @@ -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"`
Expand Down Expand Up @@ -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"`
Expand All @@ -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"`
Expand Down

0 comments on commit 6b7ffb8

Please sign in to comment.