refactor(ticket): contract backend ticket core
This commit is contained in:
@@ -1,83 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketCollaboratorRepository = newTicketCollaboratorRepository()
|
||||
|
||||
func newTicketCollaboratorRepository() *ticketCollaboratorRepository {
|
||||
return &ticketCollaboratorRepository{}
|
||||
}
|
||||
|
||||
type ticketCollaboratorRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) TakeByTicketIDAndUserID(db *gorm.DB, ticketID, userID int64) *models.TicketCollaborator {
|
||||
ret := &models.TicketCollaborator{}
|
||||
if err := db.Take(ret, "ticket_id = ? AND user_id = ?", ticketID, userID).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Get(db *gorm.DB, id int64) *models.TicketCollaborator {
|
||||
ret := &models.TicketCollaborator{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketCollaborator {
|
||||
ret := &models.TicketCollaborator{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketCollaborator) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketCollaborator {
|
||||
ret := &models.TicketCollaborator{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketCollaborator, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketCollaborator, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketCollaborator{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketCollaborator{})
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Create(db *gorm.DB, t *models.TicketCollaborator) error {
|
||||
return db.Create(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketCollaboratorRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketCollaborator{}, "id = ?", id)
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketCommentRepository = newTicketCommentRepository()
|
||||
|
||||
func newTicketCommentRepository() *ticketCommentRepository {
|
||||
return &ticketCommentRepository{}
|
||||
}
|
||||
|
||||
type ticketCommentRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Get(db *gorm.DB, id int64) *models.TicketComment {
|
||||
ret := &models.TicketComment{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketComment {
|
||||
ret := &models.TicketComment{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketComment) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketComment {
|
||||
ret := &models.TicketComment{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketComment, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketComment, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketComment{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.TicketComment) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketComment{})
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Create(db *gorm.DB, t *models.TicketComment) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Update(db *gorm.DB, t *models.TicketComment) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) (err error) {
|
||||
err = db.Model(&models.TicketComment{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) (err error) {
|
||||
err = db.Model(&models.TicketComment{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketCommentRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketComment{}, "id = ?", id)
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketEventLogRepository = newTicketEventLogRepository()
|
||||
|
||||
func newTicketEventLogRepository() *ticketEventLogRepository {
|
||||
return &ticketEventLogRepository{}
|
||||
}
|
||||
|
||||
type ticketEventLogRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Get(db *gorm.DB, id int64) *models.TicketEventLog {
|
||||
ret := &models.TicketEventLog{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketEventLog {
|
||||
ret := &models.TicketEventLog{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketEventLog) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketEventLog {
|
||||
ret := &models.TicketEventLog{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketEventLog, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketEventLog, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketEventLog{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.TicketEventLog) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketEventLog{})
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Create(db *gorm.DB, t *models.TicketEventLog) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Update(db *gorm.DB, t *models.TicketEventLog) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) (err error) {
|
||||
err = db.Model(&models.TicketEventLog{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) (err error) {
|
||||
err = db.Model(&models.TicketEventLog{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketEventLogRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketEventLog{}, "id = ?", id)
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketMentionRepository = newTicketMentionRepository()
|
||||
|
||||
func newTicketMentionRepository() *ticketMentionRepository {
|
||||
return &ticketMentionRepository{}
|
||||
}
|
||||
|
||||
type ticketMentionRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) TakeByCommentAndUserID(db *gorm.DB, ticketID, commentID, userID int64) *models.TicketMention {
|
||||
ret := &models.TicketMention{}
|
||||
if err := db.Take(ret, "ticket_id = ? AND comment_id = ? AND mentioned_user_id = ?", ticketID, commentID, userID).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) Get(db *gorm.DB, id int64) *models.TicketMention {
|
||||
ret := &models.TicketMention{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketMention {
|
||||
ret := &models.TicketMention{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketMention) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketMention {
|
||||
ret := &models.TicketMention{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketMention, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketMention, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketMention{})
|
||||
paging = &sqls.Paging{Page: cnd.Paging.Page, Limit: cnd.Paging.Limit, Total: count}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketMention{})
|
||||
}
|
||||
|
||||
func (r *ticketMentionRepository) Create(db *gorm.DB, t *models.TicketMention) error {
|
||||
return db.Create(t).Error
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import (
|
||||
"cs-agent/internal/models"
|
||||
"time"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -15,6 +17,55 @@ func newTicketNoSequenceRepository() *ticketNoSequenceRepository {
|
||||
|
||||
type ticketNoSequenceRepository struct{}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Get(db *gorm.DB, id int64) *models.TicketNoSequence {
|
||||
ret := &models.TicketNoSequence{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Take(db *gorm.DB, where ...any) *models.TicketNoSequence {
|
||||
ret := &models.TicketNoSequence{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketNoSequence) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketNoSequence {
|
||||
ret := &models.TicketNoSequence{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketNoSequence, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketNoSequence, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketNoSequence{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketNoSequence{})
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) GetByDateKey(db *gorm.DB, dateKey string) *models.TicketNoSequence {
|
||||
ret := &models.TicketNoSequence{}
|
||||
if err := db.Take(ret, "date_key = ?", dateKey).Error; err != nil {
|
||||
@@ -27,6 +78,22 @@ func (r *ticketNoSequenceRepository) Create(db *gorm.DB, t *models.TicketNoSeque
|
||||
return db.Create(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Update(db *gorm.DB, t *models.TicketNoSequence) error {
|
||||
return db.Save(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Updates(db *gorm.DB, id int64, columns map[string]any) error {
|
||||
return db.Model(&models.TicketNoSequence{}).Where("id = ?", id).Updates(columns).Error
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) UpdateColumn(db *gorm.DB, id int64, name string, value any) error {
|
||||
return db.Model(&models.TicketNoSequence{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketNoSequence{}, "id = ?", id)
|
||||
}
|
||||
|
||||
func (r *ticketNoSequenceRepository) UpdateNextSeq(db *gorm.DB, id int64, currentSeq, nextSeq int64, updatedAt time.Time) (bool, error) {
|
||||
result := db.Model(&models.TicketNoSequence{}).
|
||||
Where("id = ? AND next_seq = ?", id, currentSeq).
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketPriorityConfigRepository = newTicketPriorityConfigRepository()
|
||||
|
||||
func newTicketPriorityConfigRepository() *ticketPriorityConfigRepository {
|
||||
return &ticketPriorityConfigRepository{}
|
||||
}
|
||||
|
||||
type ticketPriorityConfigRepository struct{}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Get(db *gorm.DB, id int64) *models.TicketPriorityConfig {
|
||||
ret := &models.TicketPriorityConfig{}
|
||||
if err := db.First(ret, id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketPriorityConfig {
|
||||
ret := &models.TicketPriorityConfig{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketPriorityConfig) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketPriorityConfig {
|
||||
ret := &models.TicketPriorityConfig{}
|
||||
if err := cnd.FindOne(db, ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) FindPageByParams(db *gorm.DB, queryParams *params.QueryParams) (list []models.TicketPriorityConfig, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, &queryParams.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketPriorityConfig, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketPriorityConfig{})
|
||||
paging = &sqls.Paging{Page: cnd.Paging.Page, Limit: cnd.Paging.Limit, Total: count}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketPriorityConfig{})
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Create(db *gorm.DB, t *models.TicketPriorityConfig) error {
|
||||
return db.Create(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Update(db *gorm.DB, t *models.TicketPriorityConfig) error {
|
||||
return db.Save(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Updates(db *gorm.DB, id int64, columns map[string]any) error {
|
||||
return db.Model(&models.TicketPriorityConfig{}).Where("id = ?", id).Updates(columns).Error
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) UpdateColumn(db *gorm.DB, id int64, name string, value any) error {
|
||||
return db.Model(&models.TicketPriorityConfig{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
}
|
||||
|
||||
func (r *ticketPriorityConfigRepository) Delete(db *gorm.DB, id int64) error {
|
||||
return db.Delete(&models.TicketPriorityConfig{}, "id = ?", id).Error
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketProgressRepository = newTicketProgressRepository()
|
||||
|
||||
func newTicketProgressRepository() *ticketProgressRepository {
|
||||
return &ticketProgressRepository{}
|
||||
}
|
||||
|
||||
type ticketProgressRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Get(db *gorm.DB, id int64) *models.TicketProgress {
|
||||
ret := &models.TicketProgress{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Take(db *gorm.DB, where ...any) *models.TicketProgress {
|
||||
ret := &models.TicketProgress{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketProgress) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketProgress {
|
||||
ret := &models.TicketProgress{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketProgress, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketProgress, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketProgress{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...any) (list []models.TicketProgress) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...any) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketProgress{})
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Create(db *gorm.DB, t *models.TicketProgress) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Update(db *gorm.DB, t *models.TicketProgress) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Updates(db *gorm.DB, id int64, columns map[string]any) (err error) {
|
||||
err = db.Model(&models.TicketProgress{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) UpdateColumn(db *gorm.DB, id int64, name string, value any) (err error) {
|
||||
err = db.Model(&models.TicketProgress{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketProgressRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketProgress{}, "id = ?", id)
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketRelationRepository = newTicketRelationRepository()
|
||||
|
||||
func newTicketRelationRepository() *ticketRelationRepository {
|
||||
return &ticketRelationRepository{}
|
||||
}
|
||||
|
||||
type ticketRelationRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Get(db *gorm.DB, id int64) *models.TicketRelation {
|
||||
ret := &models.TicketRelation{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketRelation {
|
||||
ret := &models.TicketRelation{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketRelation) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketRelation {
|
||||
ret := &models.TicketRelation{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketRelation, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketRelation, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketRelation{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.TicketRelation) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketRelation{})
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Create(db *gorm.DB, t *models.TicketRelation) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Update(db *gorm.DB, t *models.TicketRelation) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) (err error) {
|
||||
err = db.Model(&models.TicketRelation{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) (err error) {
|
||||
err = db.Model(&models.TicketRelation{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketRelation{}, "id = ?", id)
|
||||
}
|
||||
|
||||
func (r *ticketRelationRepository) DeleteByTicketRelation(db *gorm.DB, ticketID, relatedTicketID int64, relationType string) error {
|
||||
return db.Where("ticket_id = ? AND related_ticket_id = ? AND relation_type = ?", ticketID, relatedTicketID, relationType).
|
||||
Delete(&models.TicketRelation{}).Error
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketResolutionCodeRepository = newTicketResolutionCodeRepository()
|
||||
|
||||
func newTicketResolutionCodeRepository() *ticketResolutionCodeRepository {
|
||||
return &ticketResolutionCodeRepository{}
|
||||
}
|
||||
|
||||
type ticketResolutionCodeRepository struct{}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Get(db *gorm.DB, id int64) *models.TicketResolutionCode {
|
||||
ret := &models.TicketResolutionCode{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketResolutionCode {
|
||||
ret := &models.TicketResolutionCode{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketResolutionCode) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketResolutionCode {
|
||||
ret := &models.TicketResolutionCode{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketResolutionCode, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketResolutionCode, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketResolutionCode{})
|
||||
paging = &sqls.Paging{Page: cnd.Paging.Page, Limit: cnd.Paging.Limit, Total: count}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketResolutionCode{})
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Create(db *gorm.DB, t *models.TicketResolutionCode) error {
|
||||
return db.Create(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Update(db *gorm.DB, t *models.TicketResolutionCode) error {
|
||||
return db.Save(t).Error
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) error {
|
||||
return db.Model(&models.TicketResolutionCode{}).Where("id = ?", id).Updates(columns).Error
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) error {
|
||||
return db.Model(&models.TicketResolutionCode{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
}
|
||||
|
||||
func (r *ticketResolutionCodeRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketResolutionCode{}, "id = ?", id)
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketSLARecordRepository = newTicketSLARecordRepository()
|
||||
|
||||
func newTicketSLARecordRepository() *ticketSLARecordRepository {
|
||||
return &ticketSLARecordRepository{}
|
||||
}
|
||||
|
||||
type ticketSLARecordRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) TakeByTicketIDAndType(db *gorm.DB, ticketID int64, slaType string) *models.TicketSLARecord {
|
||||
ret := &models.TicketSLARecord{}
|
||||
if err := db.Take(ret, "ticket_id = ? AND sla_type = ?", ticketID, slaType).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Get(db *gorm.DB, id int64) *models.TicketSLARecord {
|
||||
ret := &models.TicketSLARecord{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketSLARecord {
|
||||
ret := &models.TicketSLARecord{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketSLARecord) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketSLARecord {
|
||||
ret := &models.TicketSLARecord{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketSLARecord, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketSLARecord, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketSLARecord{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.TicketSLARecord) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketSLARecord{})
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Create(db *gorm.DB, t *models.TicketSLARecord) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Update(db *gorm.DB, t *models.TicketSLARecord) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) (err error) {
|
||||
err = db.Model(&models.TicketSLARecord{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) (err error) {
|
||||
err = db.Model(&models.TicketSLARecord{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketSLARecordRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketSLARecord{}, "id = ?", id)
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"cs-agent/internal/models"
|
||||
|
||||
"github.com/mlogclub/simple/sqls"
|
||||
"github.com/mlogclub/simple/web/params"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var TicketWatcherRepository = newTicketWatcherRepository()
|
||||
|
||||
func newTicketWatcherRepository() *ticketWatcherRepository {
|
||||
return &ticketWatcherRepository{}
|
||||
}
|
||||
|
||||
type ticketWatcherRepository struct {
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) TakeByTicketIDAndUserID(db *gorm.DB, ticketID, userID int64) *models.TicketWatcher {
|
||||
ret := &models.TicketWatcher{}
|
||||
if err := db.Take(ret, "ticket_id = ? AND user_id = ?", ticketID, userID).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Get(db *gorm.DB, id int64) *models.TicketWatcher {
|
||||
ret := &models.TicketWatcher{}
|
||||
if err := db.First(ret, "id = ?", id).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Take(db *gorm.DB, where ...interface{}) *models.TicketWatcher {
|
||||
ret := &models.TicketWatcher{}
|
||||
if err := db.Take(ret, where...).Error; err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketWatcher) {
|
||||
cnd.Find(db, &list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) FindOne(db *gorm.DB, cnd *sqls.Cnd) *models.TicketWatcher {
|
||||
ret := &models.TicketWatcher{}
|
||||
if err := cnd.FindOne(db, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) FindPageByParams(db *gorm.DB, params *params.QueryParams) (list []models.TicketWatcher, paging *sqls.Paging) {
|
||||
return r.FindPageByCnd(db, ¶ms.Cnd)
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models.TicketWatcher, paging *sqls.Paging) {
|
||||
cnd.Find(db, &list)
|
||||
count := cnd.Count(db, &models.TicketWatcher{})
|
||||
|
||||
paging = &sqls.Paging{
|
||||
Page: cnd.Paging.Page,
|
||||
Limit: cnd.Paging.Limit,
|
||||
Total: count,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.TicketWatcher) {
|
||||
db.Raw(sqlStr, paramArr...).Scan(&list)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
|
||||
db.Raw(sqlStr, paramArr...).Count(&count)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Count(db *gorm.DB, cnd *sqls.Cnd) int64 {
|
||||
return cnd.Count(db, &models.TicketWatcher{})
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Create(db *gorm.DB, t *models.TicketWatcher) (err error) {
|
||||
err = db.Create(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Update(db *gorm.DB, t *models.TicketWatcher) (err error) {
|
||||
err = db.Save(t).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Updates(db *gorm.DB, id int64, columns map[string]interface{}) (err error) {
|
||||
err = db.Model(&models.TicketWatcher{}).Where("id = ?", id).Updates(columns).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) UpdateColumn(db *gorm.DB, id int64, name string, value interface{}) (err error) {
|
||||
err = db.Model(&models.TicketWatcher{}).Where("id = ?", id).UpdateColumn(name, value).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (r *ticketWatcherRepository) Delete(db *gorm.DB, id int64) {
|
||||
db.Delete(&models.TicketWatcher{}, "id = ?", id)
|
||||
}
|
||||
Reference in New Issue
Block a user