all_fileds

package
v0.0.0-...-91c752a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2018 [email protected]. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Copyright 2018 [email protected]. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Copyright 2018 [email protected]. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role struct {
	ID             int       `json:"id" comment:"主键ID"`
	CreatedAt      time.Time `json:"created_at,omitempty" comment:"记录创建时间"`
	UpdatedAt      time.Time `json:"updated_at,omitempty"  comment:"记录更新时间"`
	Name           string    `json:"name" comment:"角色名称" binding:"required" `
	Code           string    `json:"code" comment:"角色编码"`
	InheritIds     []int     `json:"inherit_ids,omitempty"  comment:"所继承的角色ID"`
	InheritStrings string    `json:"inherit_strings"  comment:"所继承角色ID逗号分隔"`
	Inherits       []*Role   `json:"inherits,omitempty" comment:"继承的角色"`
	IsActive       bool      `json:"is_active" comment:"有效"`
}

角色

func (*Role) TableName

func (mh *Role) TableName() string

type User

type User struct {
	ID              int       `json:"id" comment:"主键ID"`
	CreatedAt       time.Time `json:"created_at,omitempty"comment:"记录创建时间"`
	UpdatedAt       time.Time `json:"updated_at,omitempty" comment:"记录更新时间"`
	Username        string    `json:"username,omitempty" comment:"用户名"`
	Alias           string    `json:"alias,omitempty" comment:"昵称"`
	Avatar          string    `json:"avatar,omitempty"comment:"头像"`
	Email           string    `json:"email,omitempty"   comment:"邮箱"`
	Mobile          string    `json:"mobile,omitempty"  comment:"手机号码"`
	Password        string    `json:"password,omitempty" comment:"密码"`
	ConfirmPassword string    `json:"confirm_password,omitempty" comment:"确认密码"`
	Pwd             string    `json:"pwd,omitempty" comment:"数据库存储加密密码"`
	IsAdmin         bool      `json:"is_admin,omitempty" comment:"超级用户"`
	IsActive        bool      `json:"is_active,omitempty" comment:"用户有效"`
	RoleID          int       `json:"role_id" comment:"用户角色ID"`
	Role            *Role     `json:"role" comment:"用户角色"`
}

用户

func (*User) TableName

func (mh *User) TableName() string

type UserRole

type UserRole struct {
	ID        int       `json:"id" comment:"主键ID"`
	CreatedAt time.Time `json:"created_at,omitempty" comment:"记录创建时间"`
	UpdatedAt time.Time `json:"updated_at,omitempty" comment:"记录更新时间"`
	Role      *Role     `json:"role" comment:"角色"`
	RoleID    int       `json:"role_id" comment:"角色ID"`
	User      *User     `json:"user" comment:"用户"`
	UserID    int       `json:"user_id" comment:"用户ID"`
}

用户角色

func (*UserRole) TableName

func (mh *UserRole) TableName() string

Jump to

Keyboard shortcuts

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