Skip to content

Instantly share code, notes, and snippets.

@kamal-kambe
Last active July 31, 2019 13:48
Show Gist options
  • Select an option

  • Save kamal-kambe/9d423e2b2996bd6c148d6e4bb60268c9 to your computer and use it in GitHub Desktop.

Select an option

Save kamal-kambe/9d423e2b2996bd6c148d6e4bb60268c9 to your computer and use it in GitHub Desktop.
package model
import "time"
type Player struct {
ID uint `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `sql:"index" json:"-"`
Name string `json:"name"`
DeviceID string `sql:"UNIQUE;not null;index:idx_player_device_id" json:"device_id"`
Email string `sql:"UNIQUE;not null;index:idx_player_email" json:"email"`
Platform string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment