19 lines
777 B
Go
19 lines
777 B
Go
|
|
package entity
|
||
|
|
|
||
|
|
import (
|
||
|
|
"narasi-ahli-be/app/database/entity/users"
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
type ResearchJournals struct {
|
||
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
||
|
|
UserID uint `json:"user_id" gorm:"type:int4;not null;index"`
|
||
|
|
JournalTitle string `json:"journal_title" gorm:"type:varchar;not null"`
|
||
|
|
Publisher string `json:"publisher" gorm:"type:varchar;not null"`
|
||
|
|
JournalURL string `json:"journal_url" gorm:"type:varchar;not null"`
|
||
|
|
PublishedDate *time.Time `json:"published_date"`
|
||
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
||
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
||
|
|
User *users.Users `json:"user" gorm:"foreignKey:UserID;references:ID"`
|
||
|
|
}
|