|
|
|
@@ -100,94 +100,6 @@ func (ns NullQuarantineReason) Value() (driver.Value, error) {
|
|
|
|
|
return string(ns.QuarantineReason), nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type RequestKind string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
RequestKindArtist RequestKind = "artist"
|
|
|
|
|
RequestKindAlbum RequestKind = "album"
|
|
|
|
|
RequestKindTrack RequestKind = "track"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (e *RequestKind) Scan(src interface{}) error {
|
|
|
|
|
switch s := src.(type) {
|
|
|
|
|
case []byte:
|
|
|
|
|
*e = RequestKind(s)
|
|
|
|
|
case string:
|
|
|
|
|
*e = RequestKind(s)
|
|
|
|
|
default:
|
|
|
|
|
return fmt.Errorf("unsupported scan type for RequestKind: %T", src)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NullRequestKind struct {
|
|
|
|
|
RequestKind RequestKind
|
|
|
|
|
Valid bool // Valid is true if RequestKind is not NULL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Scan implements the Scanner interface.
|
|
|
|
|
func (ns *NullRequestKind) Scan(value interface{}) error {
|
|
|
|
|
if value == nil {
|
|
|
|
|
ns.RequestKind, ns.Valid = "", false
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
ns.Valid = true
|
|
|
|
|
return ns.RequestKind.Scan(value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Value implements the driver Valuer interface.
|
|
|
|
|
func (ns NullRequestKind) Value() (driver.Value, error) {
|
|
|
|
|
if !ns.Valid {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
return string(ns.RequestKind), nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type RequestStatus string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
RequestStatusPending RequestStatus = "pending"
|
|
|
|
|
RequestStatusApproved RequestStatus = "approved"
|
|
|
|
|
RequestStatusRejected RequestStatus = "rejected"
|
|
|
|
|
RequestStatusCompleted RequestStatus = "completed"
|
|
|
|
|
RequestStatusFailed RequestStatus = "failed"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (e *RequestStatus) Scan(src interface{}) error {
|
|
|
|
|
switch s := src.(type) {
|
|
|
|
|
case []byte:
|
|
|
|
|
*e = RequestStatus(s)
|
|
|
|
|
case string:
|
|
|
|
|
*e = RequestStatus(s)
|
|
|
|
|
default:
|
|
|
|
|
return fmt.Errorf("unsupported scan type for RequestStatus: %T", src)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NullRequestStatus struct {
|
|
|
|
|
RequestStatus RequestStatus
|
|
|
|
|
Valid bool // Valid is true if RequestStatus is not NULL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Scan implements the Scanner interface.
|
|
|
|
|
func (ns *NullRequestStatus) Scan(value interface{}) error {
|
|
|
|
|
if value == nil {
|
|
|
|
|
ns.RequestStatus, ns.Valid = "", false
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
ns.Valid = true
|
|
|
|
|
return ns.RequestStatus.Scan(value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Value implements the driver Valuer interface.
|
|
|
|
|
func (ns NullRequestStatus) Value() (driver.Value, error) {
|
|
|
|
|
if !ns.Valid {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
return string(ns.RequestStatus), nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AcoustidSetting struct {
|
|
|
|
|
ID bool
|
|
|
|
|
Enabled bool
|
|
|
|
|