mirror of
https://git.boos.lat/aibo/BossChat.git
synced 2026-10-30 15:16:11 +00:00
0f40930a41
- Rename Go module: cs-agent → bosschat - Rename all import paths across 200+ Go files - Rename SDK: cs-ai-agent-sdk → bosschat-sdk - Rename message protocol: cs-agent:* → bosschat:* - Rename JS globals: CSAgentConfig → BossChatConfig - Rename CSS classes: cs-agent-* → bosschat-* - Update Makefile APP_NAME and ARCHIVE_NAME - Update logo assets - Fix display name: BoosChat → BossChat
67 lines
2.0 KiB
Go
67 lines
2.0 KiB
Go
package services
|
|
|
|
import (
|
|
"bosschat/internal/models"
|
|
"bosschat/internal/repositories"
|
|
|
|
"github.com/mlogclub/simple/sqls"
|
|
"github.com/mlogclub/simple/web/params"
|
|
)
|
|
|
|
var UserRoleService = newUserRoleService()
|
|
|
|
func newUserRoleService() *userRoleService {
|
|
return &userRoleService{}
|
|
}
|
|
|
|
type userRoleService struct {
|
|
}
|
|
|
|
func (s *userRoleService) Get(id int64) *models.UserRole {
|
|
return repositories.UserRoleRepository.Get(sqls.DB(), id)
|
|
}
|
|
|
|
func (s *userRoleService) Take(where ...interface{}) *models.UserRole {
|
|
return repositories.UserRoleRepository.Take(sqls.DB(), where...)
|
|
}
|
|
|
|
func (s *userRoleService) Find(cnd *sqls.Cnd) []models.UserRole {
|
|
return repositories.UserRoleRepository.Find(sqls.DB(), cnd)
|
|
}
|
|
|
|
func (s *userRoleService) FindOne(cnd *sqls.Cnd) *models.UserRole {
|
|
return repositories.UserRoleRepository.FindOne(sqls.DB(), cnd)
|
|
}
|
|
|
|
func (s *userRoleService) FindPageByParams(params *params.QueryParams) (list []models.UserRole, paging *sqls.Paging) {
|
|
return repositories.UserRoleRepository.FindPageByParams(sqls.DB(), params)
|
|
}
|
|
|
|
func (s *userRoleService) FindPageByCnd(cnd *sqls.Cnd) (list []models.UserRole, paging *sqls.Paging) {
|
|
return repositories.UserRoleRepository.FindPageByCnd(sqls.DB(), cnd)
|
|
}
|
|
|
|
func (s *userRoleService) Count(cnd *sqls.Cnd) int64 {
|
|
return repositories.UserRoleRepository.Count(sqls.DB(), cnd)
|
|
}
|
|
|
|
func (s *userRoleService) Create(t *models.UserRole) error {
|
|
return repositories.UserRoleRepository.Create(sqls.DB(), t)
|
|
}
|
|
|
|
func (s *userRoleService) Update(t *models.UserRole) error {
|
|
return repositories.UserRoleRepository.Update(sqls.DB(), t)
|
|
}
|
|
|
|
func (s *userRoleService) Updates(id int64, columns map[string]interface{}) error {
|
|
return repositories.UserRoleRepository.Updates(sqls.DB(), id, columns)
|
|
}
|
|
|
|
func (s *userRoleService) UpdateColumn(id int64, name string, value interface{}) error {
|
|
return repositories.UserRoleRepository.UpdateColumn(sqls.DB(), id, name, value)
|
|
}
|
|
|
|
func (s *userRoleService) Delete(id int64) {
|
|
repositories.UserRoleRepository.Delete(sqls.DB(), id)
|
|
}
|