model

package
v0.0.0-...-7fe4561 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	ID              uint64    `gorm:"column:id;primary_key;AUTO_INCREMENT"`                 // id
	Name            string    `gorm:"column:name;NOT NULL"`                                 // name
	Mobile          string    `gorm:"column:mobile;NOT NULL"`                               // mobile
	MobileConfirmed int       `gorm:"column:mobile_confirmed;default:0"`                    // mobile_confirmed
	Email           string    `gorm:"column:email"`                                         // email
	EmailConfirmed  int       `gorm:"column:email_confirmed;default:0"`                     // email_confirmed
	CreatedAt       time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP;NOT NULL"` // created_at
	UpdatedAt       time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;NOT NULL"` // updated_at
}

Contact Information.

func (*Contact) TableName

func (m *Contact) TableName() string

type Method

type Method interface {
	// SELECT * FROM @@table WHERE id=@id
	GetByID(id uint64) (*gen.T, error)
	// SELECT * FROM @@table WHERE name IN @names
	ListByNames(names ...string) ([]*gen.T, error)
	// DELETE FROM @@table WHERE id IN @ids
	DeleteByIDs(ids ...uint64) error
}

Jump to

Keyboard shortcuts

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