area

package
v0.0.0-...-41417f0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 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 Area

type Area struct {
	Id        int    `json:"id" gorm:"primary_key"` // ID 名称code
	Name      string `json:"name" `                 // 栏目名
	Pid       int    `json:"pid" `                  // 父栏目
	Location  string `json:"location" `             // 全路径
	LevelName string `json:"level_name" `           // 级别名称
	Longitude string `json:"longitude" `            // 经度
	Latitude  string `json:"latitude" `             // 维度
	Level     int    `json:"level" `                // 级别
	Position  string `json:"position" `             // 方位
	CityCode  string `json:"city_code" `            // 城市代码
	ZipCode   string `json:"zip_code" `             // 邮编
	Pinyin    string `json:"pinyin" `               // 拼音
	Initial   string `json:"initial" `              // 首字母
	Children  []Area `json:"children"`
}

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func InitTree

func InitTree(list []mysql.Area) *Tree

func (*Tree) ToTree

func (t *Tree) ToTree(index int) []Area

Jump to

Keyboard shortcuts

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