Versions in this module Expand all Collapse all v0 v0.1.0 Feb 23, 2026 Changes in this version + type Definition struct + func Define(name string, items ...SchemaItem) *Definition + func (d *Definition) Fields() []*Field + func (d *Definition) HasTimestamps() bool + func (d *Definition) Name() string + func (d *Definition) Options() []*Option + func (d *Definition) Relationships() []*Relationship + type Field struct + func BigInt(name string) *Field + func Bool(name string) *Field + func Date(name string) *Field + func DateTime(name string) *Field + func Decimal(name string) *Field + func Email(name string) *Field + func Enum(name string, values ...string) *Field + func Int(name string) *Field + func JSON(name string) *Field + func Slug(name string) *Field + func String(name string) *Field + func Text(name string) *Field + func URL(name string) *Field + func UUID(name string) *Field + func (f *Field) Default(v interface{}) *Field + func (f *Field) EnumValues() []string + func (f *Field) Filterable() *Field + func (f *Field) Help(s string) *Field + func (f *Field) Immutable() *Field + func (f *Field) Index() *Field + func (f *Field) Label(s string) *Field + func (f *Field) MaxLen(n int) *Field + func (f *Field) MinLen(n int) *Field + func (f *Field) Modifiers() []Modifier + func (f *Field) Mutability(role string) *Field + func (f *Field) Name() string + func (f *Field) Optional() *Field + func (f *Field) Placeholder(s string) *Field + func (f *Field) PrimaryKey() *Field + func (f *Field) Required() *Field + func (f *Field) Searchable() *Field + func (f *Field) Sortable() *Field + func (f *Field) Type() FieldType + func (f *Field) Unique() *Field + func (f *Field) Visibility(role string) *Field + type FieldType int + const TypeBigInt + const TypeBool + const TypeDate + const TypeDateTime + const TypeDecimal + const TypeEmail + const TypeEnum + const TypeInt + const TypeJSON + const TypeSlug + const TypeString + const TypeText + const TypeURL + const TypeUUID + func (ft FieldType) String() string + type Hooks struct + AfterCreate []JobRef + AfterUpdate []JobRef + type HooksItem struct + Hooks Hooks + func WithHooks(h Hooks) *HooksItem + type JobRef struct + Kind string + Queue string + type Modifier struct + Type ModifierType + Value interface{} + type ModifierType int + const ModDefault + const ModFilterable + const ModHelp + const ModImmutable + const ModIndex + const ModLabel + const ModMaxLen + const ModMinLen + const ModMutability + const ModOptional + const ModPlaceholder + const ModPrimaryKey + const ModRequired + const ModSearchable + const ModSortable + const ModUnique + const ModVisibility + type OnDeleteAction int + const Cascade + const NoAction + const Restrict + const SetNull + func (a OnDeleteAction) String() string + type Option struct + func Auditable() *Option + func Searchable() *Option + func SoftDelete() *Option + func TenantScoped() *Option + func (o *Option) Type() OptionType + type OptionType int + const OptAuditable + const OptSearchable + const OptSoftDelete + const OptTenantScoped + func (ot OptionType) String() string + type PermissionItem struct + Operation string + Roles []string + func Permission(operation string, roles ...string) *PermissionItem + type RelationType int + const RelBelongsTo + const RelHasMany + const RelHasOne + const RelManyToMany + func (rt RelationType) String() string + type Relationship struct + func BelongsTo(name, table string) *Relationship + func HasMany(name, table string) *Relationship + func HasOne(name, table string) *Relationship + func ManyToMany(name, table string) *Relationship + func (r *Relationship) IsOptional() bool + func (r *Relationship) Name() string + func (r *Relationship) OnDelete(action OnDeleteAction) *Relationship + func (r *Relationship) OnDeleteAction() OnDeleteAction + func (r *Relationship) Optional() *Relationship + func (r *Relationship) RelType() RelationType + func (r *Relationship) Table() string + type SchemaItem interface + type TimestampsItem struct + func Timestamps() *TimestampsItem