You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
237 B
10 lines
237 B
4 years ago
|
package models
|
||
|
type User_role struct{
|
||
|
UserId string `json:"user_id"`
|
||
|
RoleId uint `json:"role_id"`
|
||
|
}
|
||
|
func FindRoleByUserId(userId interface{})User_role{
|
||
|
var uRole User_role
|
||
|
DB.Where("user_id = ?", userId).First(&uRole)
|
||
|
return uRole
|
||
|
}
|