Semaphore/models/APIToken.go
Matej Kramny d6370c875e API Tokens, Documentation
- API Tokens
- More documentation
- Update API
2016-04-09 20:09:57 +01:00

19 lines
397 B
Go

package models
import (
"github.com/ansible-semaphore/semaphore/database"
"time"
)
type APIToken struct {
ID string `db:"id" json:"id"`
Created time.Time `db:"created" json:"created"`
Expired bool `db:"expired" json:"expired"`
UserID int `db:"user_id" json:"user_id"`
}
func init() {
database.Mysql.AddTableWithName(APIToken{}, "user__token").SetKeys(false, "id")
}