// Code generated by build/generate-golang.js; DO NOT EDIT.
package organization

import (
	"database/sql/driver"
	core "github.com/meshery/schemas/models/core"
)

func (value *OrgMetadata) Scan(src interface{}) error {
	if src == nil {
		*value = OrgMetadata{}
		return nil
	}

	mapVal := core.Map{}
	if err := mapVal.Scan(src); err != nil {
		return err
	}

	return core.MapToStruct(mapVal, value)
}

func (value OrgMetadata) Value() (driver.Value, error) {
	mapVal, err := core.StructToMap(value)
	if err != nil {
		return nil, err
	}

	return core.Map(mapVal).Value()
}

func (*Organization) EventCategory() string {
	return "organization"
}
