models

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package models is the schema of the custom-sql-migration example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	momo.Model `momo:"table:accounts"`
	ID         int64  `momo:"pk,identity"`
	Email      string `momo:"size:200,notnull"`
	EmailNorm  string `momo:"column:email_norm,size:200,notnull,default:'',unique"`
}

Account is a login. EmailNorm is the lower-cased email, used for lookups that ignore case. The unique index on it is added last, after a migration has filled the column in.

func (*Account) MomoMeta

func (*Account) MomoMeta() *momo.Meta[Account]

Directories

Path Synopsis
Package account holds typed column descriptors and relation descriptors for the Account model.
Package account holds typed column descriptors and relation descriptors for the Account model.

Jump to

Keyboard shortcuts

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