role_user.go
919 字节
package domain
import (
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role/adapter"
"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"`
}
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
FindAllContainUser(pageSize int, pageNumber int, companyId int64, roleId int64) ([]*adapter.RoleContainUser, error)
}