From 6ec919c3587b805f9bd67bd28d197377e81854c7 Mon Sep 17 00:00:00 2001
From: HoseaNA <13521057@std.stei.itb.ac.id>
Date: Mon, 27 May 2024 13:40:36 +0700
Subject: [PATCH] fix: incorrect topik table to fetch data from

---
 src/module/topic_allocation/entity/topic_allocation.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/module/topic_allocation/entity/topic_allocation.go b/src/module/topic_allocation/entity/topic_allocation.go
index b75c27a..e979c6a 100644
--- a/src/module/topic_allocation/entity/topic_allocation.go
+++ b/src/module/topic_allocation/entity/topic_allocation.go
@@ -9,6 +9,10 @@ type Topik struct {
 	Pengguna 	Pengguna	`gorm:"foreignKey:PengajuID"`
 }
 
+func (Topik) TableName() string {
+	return "topik"
+}
+
 type Pengguna struct {
 	ID			string 	`gorm:"type:uuid;primaryKey" json:"id"`
 	Nama		string	`json:"nama"`
@@ -16,6 +20,10 @@ type Pengguna struct {
 	Roles		string	`json:"roles"`
 }
 
+func (Pengguna) TableName() string {
+	return "pengguna"
+}
+
 type GetAllReturnType struct {
 	DaftarTopikData		[]Topik		`json:"data"`
 	MaxPage				int			`json:"maxPage"`
-- 
GitLab