model

package
v0.0.0-...-c2d1e89 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBMigrate

func DBMigrate(db *gorm.DB) *gorm.DB

DBMigrate将会创建表,若有必要,还会创建某些关系。

Types

type Employee

type Employee struct {
	gorm.Model
	Name   string `gorm:"unique" json:"name"`
	City   string `json:"city"`
	Age    string `json:"age"`
	Status bool   `json:"status"`
}

func (*Employee) Disable

func (e *Employee) Disable()

func (*Employee) Enable

func (e *Employee) Enable()

Jump to

Keyboard shortcuts

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