30 lines
459 B
Go
30 lines
459 B
Go
package entity
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type TranscribeJob struct {
|
|
Id string
|
|
State string
|
|
FileID *string
|
|
IsError bool
|
|
ErrorText *string
|
|
Worker *string
|
|
AcquiredAt *time.Time
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
const (
|
|
StateCreated = "created"
|
|
StateConverted = "converted"
|
|
StateUploaded = "uploaded"
|
|
StatusFailed = "failed"
|
|
)
|
|
|
|
func (j *TranscribeJob) MoveToState(state string) {
|
|
j.State = state
|
|
j.Worker = nil
|
|
j.AcquiredAt = nil
|
|
}
|