model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Businessinfo added in v1.0.1

type Businessinfo struct {
	gorm.Model
	Name    string `json:"Name"`
	Manager string `json:"Manager"` //业务线负责人
}

业务线信息表

type Dnsinfo added in v1.0.1

type Dnsinfo struct {
	gorm.Model
	Name string `json:"Name"`
}

DNS信息表

type Hosts

type Hosts struct {
	gorm.Model
	Wanip    string `json:"WanIp" grom:"not null;unique"`
	Lanip    string `json:"LanIp"`
	Conf     string `json:"Conf"`
	Hostname string `json:"HostName"`
	Os       string `json:"Os" grom:"unique"`
	Contact  string `json:"Contact"` // 业务线负责人
	Manager  string `json:"Manager"` // 系统负责人
	Sshport  int64  `json:"SshPort"`
	Tags     string `json:"Tags"`
	Remark   string `json:"Remark"`
}

主机表

func (Hosts) TableName added in v1.0.1

func (Hosts) TableName() string

type HostsItem

type HostsItem int
const (
	Active HostsItem = iota
	InActive
	Banned
	BanDied
)

type Lbinfo added in v1.0.1

type Lbinfo struct {
	gorm.Model
	Name string `json:"Name"`
}

负载均衡表

type Logs added in v1.0.1

type Logs struct {
	gorm.Model
	Content string `json:"Content"`
}

日志表

type Users added in v1.0.1

type Users struct {
	gorm.Model
	Username   string `json:"Username"`
	Password   string `json:"Password"`
	Birthday   string `json:"Birthday"`
	Email      string `json:"Email"`
	Phone      int64  `json:"Phone"`
	Department string `json:"Department"`
	Enable     bool   `json:"Enable"`
	Tags       string `json:"Tags"`
	Remark     string `json:"Remark"`
}

用户表

func (Users) TableName added in v1.0.1

func (Users) TableName() string

默认表名是Users, 修改默认表名方法如下

Jump to

Keyboard shortcuts

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