factory

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryFieldInfo

type FactoryFieldInfo struct {
	Name          string
	Type          string
	GoZero        string
	DefaultValue  string
	OptionName    string
	IsFK          bool
	IsTimestamp   bool
	IsID          bool
	IsAutoManaged bool
}

FactoryFieldInfo contains metadata for generating a factory field

type FieldAnalyzer

type FieldAnalyzer struct {
	// contains filtered or unexported fields
}

FieldAnalyzer determines appropriate default values for factory fields

func NewFieldAnalyzer

func NewFieldAnalyzer(dbType string) *FieldAnalyzer

NewFieldAnalyzer creates a new field analyzer.

func (*FieldAnalyzer) AnalyzeField

func (fa *FieldAnalyzer) AnalyzeField(field models.GeneratedField, tableName string) FactoryFieldInfo

AnalyzeField returns default value expression and metadata for a field

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL