orm_gen

package
v0.0.0-...-13a9a9d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameUser = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`                      // PK
	Name      string         `gorm:"column:name;not null" json:"name"`                                       // User name
	Gender    int32          `gorm:"column:gender;not null" json:"gender"`                                   // User gender
	Age       int32          `gorm:"column:age;not null" json:"age"`                                         // User age
	Introduce string         `gorm:"column:introduce" json:"introduce"`                                      // User introduce
	CreatedAt time.Time      `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"` // User information create time
	UpdatedAt time.Time      `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"` // User information update time
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`                                    // User information delete time
}

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