Projeto bot pontos
This commit is contained in:
19
backend/internal/domain/credential.go
Normal file
19
backend/internal/domain/credential.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
// Credential é a credencial PontoMais de um usuário. A senha fica cifrada.
|
||||
type Credential struct {
|
||||
UserID int64
|
||||
APIEmail string
|
||||
EncryptedPassword []byte
|
||||
KeyVersion int16
|
||||
LastValidatedAt *time.Time
|
||||
LastError *string
|
||||
ConsecutiveFailures int
|
||||
LastFailureAt *time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// IsValidated indica que a credencial já autenticou com sucesso na PontoMais.
|
||||
func (c Credential) IsValidated() bool { return c.LastValidatedAt != nil }
|
||||
Reference in New Issue
Block a user