@@ -73,12 +73,17 @@ func (t ElectronicSignatureEventType) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *ElectronicSignatureEventType) Scan(value any) error {
|
func (t *ElectronicSignatureEventType) Scan(value any) error {
|
||||||
val, ok := value.(string)
|
var s string
|
||||||
if !ok {
|
switch v := value.(type) {
|
||||||
return fmt.Errorf("invalid scan source for ElectronicSignatureEventType, expected string got %T", value)
|
case string:
|
||||||
|
s = v
|
||||||
|
case []byte:
|
||||||
|
s = string(v)
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("invalid scan source for ElectronicSignatureEventType, expected string or []byte got %T", value)
|
||||||
}
|
}
|
||||||
|
|
||||||
return t.UnmarshalText([]byte(val))
|
return t.UnmarshalText([]byte(s))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t ElectronicSignatureEventType) Value() (driver.Value, error) {
|
func (t ElectronicSignatureEventType) Value() (driver.Value, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user