Skip to content

Commit 6f84288

Browse files
committed
2 parents 25d94fd + 0af2e69 commit 6f84288

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apis/token/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ package token
33
type CreateTokenRequest struct {
44
DeviceID string `json:"device_id" validate:"max=64"`
55
Service string `json:"service" validate:"required,oneof=apns fcm mipush"`
6-
Token string `json:"token" validate:"max=64"`
6+
Token string `json:"token" validate:"max=256"`
77
PackageName string `json:"package_name"`
88
}

models/token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type PushToken struct {
1010
UserID int `json:"user_id" gorm:"primaryKey;not null"` // not required
1111
Service PushService `json:"service" gorm:"not null" swaggertype:"string" validate:"required,oneof=apns fcm mipush"`
1212
DeviceID string `json:"device_id" gorm:"uniqueIndex:,length:10;not null;size:64" validate:"required,max=64"`
13-
Token string `json:"token" gorm:"primaryKey;not null;size:64;index:,length:10" validate:"required,max=64"`
13+
Token string `json:"token" gorm:"primaryKey;not null;size:256;index:,length:10" validate:"required,max=256"`
1414
PackageName string `json:"package_name"`
1515
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
1616
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`

0 commit comments

Comments
 (0)