2025-09-28 01:53:09 +00:00
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/google/uuid"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Bookmarks struct {
|
|
|
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
|
|
|
|
UserId uint `json:"user_id" gorm:"type:int4"`
|
|
|
|
|
ArticleId uint `json:"article_id" gorm:"type:int4"`
|
|
|
|
|
ClientId *uuid.UUID `json:"client_id" gorm:"type:UUID"`
|
|
|
|
|
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
|
|
|
|
|
|
|
|
|
// Relations
|
2025-10-12 17:07:31 +00:00
|
|
|
Article Articles `json:"article" gorm:"foreignKey:ArticleId;references:ID"`
|
2025-09-28 01:53:09 +00:00
|
|
|
}
|