t4_c4_associated

package
v0.0.0-...-63b2ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassInfo

type ClassInfo struct {
	gorm.Model
	/*ID uint `gorm:"primary_key"`*/
	//
	Name        string
	SchoolName  string
	StudentNums uint
}

func (ClassInfo) GetType

func (ClassInfo) GetType() interface{}

type ClassInfoDao

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

func NewClassInfoDao

func NewClassInfoDao() *ClassInfoDao

func (*ClassInfoDao) FindUsers

func (this *ClassInfoDao) FindUsers(pclass *ClassInfo)

type UserInfo

type UserInfo struct {
	gorm.Model
	/*ID uint `gorm:"primary_key"`*/
	//
	Xname    string
	Xage     int
	Xpasswd  string
	XclassId uint
	/*若是不指定外键名称,则默认外键是: 类型+主键: ClassInfoID,但是也可以自定义:*/
	/*XClass   ClassInfo `gorm:"association_foreignkey:XclassId"`*/
	XClass ClassInfo `gorm:"foreignkey:XclassId"`
}

func (UserInfo) GetType

func (this UserInfo) GetType() interface{}

type UserInfoDao

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

func NewUserInfoDao

func NewUserInfoDao() *UserInfoDao

func (*UserInfoDao) DeleteUser

func (this *UserInfoDao) DeleteUser(puser *UserInfo)

func (*UserInfoDao) FindUserAssociated

func (this *UserInfoDao) FindUserAssociated(puser *UserInfo)

查找user时使用关联关系

func (*UserInfoDao) FindUserInfo

func (this *UserInfoDao) FindUserInfo(puser *UserInfo)

func (*UserInfoDao) SaveUser

func (this *UserInfoDao) SaveUser(puser *UserInfo)

Jump to

Keyboard shortcuts

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