Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Jul 2, 2024
2 parents 25d94fd + 0af2e69 commit 6f84288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apis/token/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package token
type CreateTokenRequest struct {
DeviceID string `json:"device_id" validate:"max=64"`
Service string `json:"service" validate:"required,oneof=apns fcm mipush"`
Token string `json:"token" validate:"max=64"`
Token string `json:"token" validate:"max=256"`
PackageName string `json:"package_name"`
}
2 changes: 1 addition & 1 deletion models/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type PushToken struct {
UserID int `json:"user_id" gorm:"primaryKey;not null"` // not required
Service PushService `json:"service" gorm:"not null" swaggertype:"string" validate:"required,oneof=apns fcm mipush"`
DeviceID string `json:"device_id" gorm:"uniqueIndex:,length:10;not null;size:64" validate:"required,max=64"`
Token string `json:"token" gorm:"primaryKey;not null;size:64;index:,length:10" validate:"required,max=64"`
Token string `json:"token" gorm:"primaryKey;not null;size:256;index:,length:10" validate:"required,max=256"`
PackageName string `json:"package_name"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
Expand Down

0 comments on commit 6f84288

Please sign in to comment.