orm

package
v0.2.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NoVersion int64 = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        int32     `gorm:"primaryKey;autoIncrement;column:id;type:integer;not null"`
	Erased    bool      `gorm:"column:erased;type:boolean;not null;default false"`
	Hidden    bool      `gorm:"column:hidden;type:boolean"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp with time zone;not null;autoCreateTime"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp with time zone;not null;autoUpdateTime"`
	Version   int64     `gorm:"column:version;type:bigint"`
}

func (BaseModel) GetErased

func (b BaseModel) GetErased() bool

func (BaseModel) GetID

func (b BaseModel) GetID() int32

func (BaseModel) GetVersion

func (b BaseModel) GetVersion() int64

type Record

type Record interface {
	GetID() int32
	GetErased() bool
	GetVersion() int64
	TableName() string
}

type Reference

type Reference struct {
	TableName string
	ID        int32
}

func (Reference) Key

func (r Reference) Key() string

type Referenced

type Referenced interface {
	References() []Reference
}

Jump to

Keyboard shortcuts

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