审查视图

pkg/domain/role_user.go 1023 字节
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package domain

import (
	"time"
)

type RoleUser struct {
	Id        int64      `json:"id,string"`
	RoleId    int64      `json:"roleId,string"`
	UserId    int64      `json:"userId,string"`
	CompanyId int64      `json:"companyId,string"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
}
郑周 authored
17 18 19 20 21 22 23
type RoleContainUser struct {
	RoleId    int64  `json:"roleId,string"`
	UserId    int64  `json:"userId,string"`
	UserName  string `json:"userName"`
	UserEmail string `json:"userEmail"`
}
24 25 26 27 28 29 30
type RoleUserRepository interface {
	Insert(role *RoleUser) (*RoleUser, error)
	Remove(role *RoleUser) (*RoleUser, error)
	FindOne(queryOptions map[string]interface{}) (*RoleUser, error)
	Find(queryOptions map[string]interface{}) (int64, []*RoleUser, error)
	Count(queryOptions map[string]interface{}) (int64, error)
	BatchDeleteById(ids []int64) error
31
	FindAllContainUser(pageSize int, pageNumber int, companyId int64, roleId int64) (int64, []*RoleContainUser, error)
32
}