compliance

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultHazmatExpirationYears represents the federal standard for hazmat endorsement expiration
	DefaultHazmatExpirationYears = 5

	// HazmatComplianceCode references the federal regulation for hazmat endorsements
	HazmatComplianceCode = "49 CFR § 383.93"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HazmatExpiration

type HazmatExpiration struct {
	bun.BaseModel `bun:"table:hazmat_expirations,alias:he" json:"-"`

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

	// Core fields
	Years int8 `bun:"years,type:SMALLINT,notnull" json:"years"`

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

	// Relationships
	State *usstate.UsState `json:"state,omitempty" bun:"rel:belongs-to,join:state_id=id"`
}

HazmatExpiration is a model that stores information about hazmat expirations

func (*HazmatExpiration) BeforeAppendModel

func (he *HazmatExpiration) BeforeAppendModel(_ context.Context, query bun.Query) error

BeforeAppendModel is a bun hook that sets the createdAt and updatedAt fields

Jump to

Keyboard shortcuts

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