model

package
v0.0.0-...-6b11828 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExampleEnumFieldTypeA = ExampleEnumFieldType(1) // Example enum field A
	ExampleEnumFieldTypeB = ExampleEnumFieldType(2) // Example enum field B
	ExampleEnumFieldTypeC = ExampleEnumFieldType(3) // Example enum field C
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Example

type Example struct {
	Model

	Field1 *string               `gorm:"type:varchar(255);not null;default:''"` // Example field 1
	Field2 *uint64               `gorm:"type:uint;not null;default:0"`          // Example field 2
	Field3 *bool                 `gorm:"type:bool;not null;default:false"`      // Example field 3
	Field4 *ExampleEnumFieldType `gorm:"type:uint;not null;default:1"`          // Example field 4
}

type ExampleEnumFieldType

type ExampleEnumFieldType int

type Model

type Model struct {
	Id         uint64                 `gorm:"type:uint;primary_key;auto_increment;not null"` // ID
	CreateTime *int64                 `gorm:"type:uint;not null"`                            // created time
	UpdateTime *int64                 `gorm:"type:uint;not null"`                            // last updated time
	DeleteTime *soft_delete.DeletedAt `gorm:"type:uint;not null;default:0"`                  // deleted time
}

Jump to

Keyboard shortcuts

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