usstate

package
v0.0.0-...-fe641e0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 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 UsState

type UsState struct {
	bun.BaseModel `bun:"table:us_states,alias:ust" json:"-"`

	// Primary identifiers
	ID pulid.ID `json:"id" bun:",pk,type:VARCHAR(100)"`

	// Core fields
	Name         string `json:"name" bun:"name,notnull"`
	Abbreviation string `json:"abbreviation" bun:"abbreviation,notnull"`
	CountryName  string `json:"countryName" bun:"country_name,notnull"`
	CountryIso3  string `json:"countryIso3" bun:"country_iso3,notnull,default:'USA'"`

	// Metadata and versioning
	CreatedAt int64 `json:"createdAt" bun:"created_at,type:BIGINT,nullzero,notnull,default:extract(epoch from current_timestamp)::bigint"`
	UpdatedAt int64 `json:"updatedAt" bun:"updated_at,type:BIGINT,nullzero,notnull,default:extract(epoch from current_timestamp)::bigint"`
}

UsState is the entity for a US state.

func (*UsState) BeforeAppendModel

func (us *UsState) BeforeAppendModel(_ context.Context, q bun.Query) error

BeforeAppendModel implements the bun.BeforeAppendModelHook interface.

Jump to

Keyboard shortcuts

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