models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Example

type Example struct {

	// Id
	//
	//   Extra     : auto_increment
	//   Null      : NO
	//   Type      : int(10) unsigned
	Id int `xorm:"id pk autoincr" json:"id"`

	// CreatedAt
	//
	//   Default   : current_timestamp
	//   Null      : NO
	//   Type      : datetime
	CreatedAt db.Datetime `xorm:"created_at" json:"created_at"`

	// UpdatedAt
	//
	//   Default   : current_timestamp
	//   Extra     : on update current_timestamp
	//   Null      : NO
	//   Type      : datetime
	UpdatedAt db.Datetime `xorm:"updated_at" json:"updated_at"`
}

Example is a model for table.

Collation : utf8_general_ci
Engine    : InnoDB
Format    : Dynamic
Table     : rdb_example

func (*Example) TableName

func (o *Example) TableName() string

TableName returns a table name. It's an optional function.

Jump to

Keyboard shortcuts

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