models

package
v0.0.0-...-1de548c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameSchemaMigration = "schema_migrations"
View Source
const TableNameUser = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type SchemaMigration

type SchemaMigration struct {
	Version int64 `gorm:"column:version;primaryKey" json:"version"`
	Dirty   bool  `gorm:"column:dirty;not null" json:"dirty"`
}

SchemaMigration mapped from table <schema_migrations>

func (*SchemaMigration) TableName

func (*SchemaMigration) TableName() string

TableName SchemaMigration's table name

type User

type User struct {
	ID        string    `gorm:"column:id;primaryKey;default:uuid_generate_v4()" json:"id"`
	Email     string    `gorm:"column:email;not null" json:"email"`
	CreatedAt time.Time `gorm:"column:created_at;not null;default:now()" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;not null;default:now()" json:"updated_at"`
}

User mapped from table <users>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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