Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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