sqlc: fixed miss method error

r/paopao-ce-pro
Michael Li 2 years ago
parent cc3810083c
commit f2e811bf2b
No known key found for this signature in database

@ -0,0 +1,16 @@
CREATE TABLE p_topic_user (
ID BIGSERIAL PRIMARY KEY,
topic_id BIGINT NOT NULL,-- 标签ID
user_id BIGINT NOT NULL,-- 创建者ID
alias_name VARCHAR ( 255 ),-- 别名
remark VARCHAR ( 512 ),-- 备注
quote_num BIGINT,-- 引用数
is_top SMALLINT NOT NULL DEFAULT 0,-- 是否置顶 0 为未置顶、1 为已置顶
created_on BIGINT NOT NULL DEFAULT 0,-- 创建时间
modified_on BIGINT NOT NULL DEFAULT 0,-- 修改时间
deleted_on BIGINT NOT NULL DEFAULT 0,-- 删除时间
is_del SMALLINT NOT NULL DEFAULT 0,-- 是否删除 0 为未删除、1 为已删除
reserve_a VARCHAR ( 255 ),-- 保留字段a
reserve_b VARCHAR ( 255 ) -- 保留字段b
);
CREATE UNIQUE INDEX idx_topic_user_uid_tid ON p_topic_user USING btree ( topic_id, user_id );

@ -13,6 +13,7 @@ import (
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/cs" "github.com/rocboss/paopao-ce/internal/core/cs"
dbr "github.com/rocboss/paopao-ce/internal/dao/slonik/sqlc/postgres" dbr "github.com/rocboss/paopao-ce/internal/dao/slonik/sqlc/postgres"
"github.com/rocboss/paopao-ce/pkg/debug"
) )
var ( var (
@ -163,6 +164,36 @@ func (s *topicSrv) TagsByKeyword(keyword string) (res cs.TagInfoList, _ error) {
return return
} }
func (s *topicSrv) GetHotTags(userId int64, limit int, offset int) (cs.TagList, error) {
// TODO
return nil, debug.ErrNotImplemented
}
func (s *topicSrv) GetNewestTags(userId int64, limit int, offset int) (cs.TagList, error) {
// TODO
return nil, debug.ErrNotImplemented
}
func (s *topicSrv) GetFollowTags(userId int64, limit int, offset int) (cs.TagList, error) {
// TODO
return nil, debug.ErrNotImplemented
}
func (s *topicSrv) FollowTopic(userId int64, topicId int64) error {
// TODO
return debug.ErrNotImplemented
}
func (s *topicSrv) UnfollowTopic(userId int64, topicId int64) error {
// TODO
return debug.ErrNotImplemented
}
func (s *topicSrv) StickTopic(userId int64, topicId int64) (int8, error) {
// TODO
return 0, debug.ErrNotImplemented
}
func newTopicService(db *pgx.Conn) core.TopicService { func newTopicService(db *pgx.Conn) core.TopicService {
return &topicSrv{ return &topicSrv{
pgxSrv: newPgxSrv(db), pgxSrv: newPgxSrv(db),

@ -1 +1 @@
DROP TABLE IF EXISTS `p_topic_user`; DROP TABLE IF EXISTS p_topic_user;
Loading…
Cancel
Save