package common

import (
	"fmt"

	"github.com/fiskerinc/cloud-services/pkg/common/dbbasemodel"
)

type SupplierOrganization struct {
	SupplierOrganizationID int64      `json:"supplier_organization_id,string" pg:"supplier_organization_id,pk"`
	PubKey                 *BinaryHex `json:"pub_key,omitempty" pg:"pub_key,type:bytea" swaggertype:"string" format:"hex" example:"9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b"`
	PrivKey                *BinaryHex `json:"priv_key,omitempty" pg:"priv_key,type:bytea" swaggertype:"string" format:"hex" example:"9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b"`
	DomainName             string     `json:"domain_name,omitempty" pg:"domain_name"`
	dbbasemodel.DBModelBase
}

func (s *SupplierOrganization) String() string {
	return fmt.Sprintf("SupplierOrganization<%s, %v, %v>",
		s.DomainName,
		s.SupplierOrganizationID,
		s.PubKey,
	)
}
