mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-27 02:52:14 +01:00
d6370c875e
- API Tokens - More documentation - Update API
19 lines
397 B
Go
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")
|
|
}
|