package constants

import "strings"

const (
	FieldRecordTypeID = "RecordTypeId"
	ObjectRecordType  = "RecordType"
)

// PlatformReferenceTargetForField returns platform-owned lookup targets that
// are universal metadata facts, not app-pack policy. These targets are shared by
// schema metadata construction and legacy repair so bootstrap does not maintain
// a second partial source of truth for fields like RecordTypeId.
func PlatformReferenceTargetForField(apiName string) (string, bool) {
	switch strings.ToLower(strings.ReplaceAll(strings.TrimSpace(apiName), "_", "")) {
	case "ownerid", "createdbyid", "lastmodifiedbyid":
		return TableUser, true
	case "recordtypeid":
		return ObjectRecordType, true
	default:
		return "", false
	}
}
