user_love_flag.go 1.2 KB
package domain

import (
	"context"

	"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
)

// 人员点赞标记

type UserLoveFlag struct {
	Id        int64 `json:"id"`
	ArticleId int64 `json:"articleId"` // 点赞文章时,文章id
	CommentId int64 `json:"commentId"` // 点赞评论时,填评论id
	UserId    int64 `json:"userId"`
	CreatedAt int64 `json:"createdAt,omitempty"`
	UpdatedAt int64 `json:"updatedAt,omitempty"`
	DeletedAt int64 `json:"deletedAt,omitempty"`
	Version   int   `json:"version,omitempty"`
}
type UserLoveFlagRepository interface {
	Insert(ctx context.Context, conn transaction.Conn, dm *UserLoveFlag) (*UserLoveFlag, error)
	Update(ctx context.Context, conn transaction.Conn, dm *UserLoveFlag) (*UserLoveFlag, error)
	UpdateWithVersion(ctx context.Context, conn transaction.Conn, dm *UserLoveFlag) (*UserLoveFlag, error)
	Delete(ctx context.Context, conn transaction.Conn, dm *UserLoveFlag) (*UserLoveFlag, error)
	FindOne(ctx context.Context, conn transaction.Conn, id int64) (*UserLoveFlag, error)
	Find(ctx context.Context, conn transaction.Conn, queryOptions map[string]interface{}) (int64, []*UserLoveFlag, error)
}