package entity

import (
	"github.com/google/uuid"
	"time"
)

type Magazines struct {
	ID            uint       `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
	Title         string     `json:"title" gorm:"type:varchar"`
	Description   string     `json:"description" gorm:"type:varchar"`
	ThumbnailName *string    `json:"thumbnail_name" gorm:"type:varchar"`
	ThumbnailPath *string    `json:"thumbnail_path" gorm:"type:varchar"`
	ThumbnailUrl  *string    `json:"thumbnail_url" gorm:"type:varchar"`
	PageUrl       *string    `json:"page_url" gorm:"type:varchar"`
	CreatedById   *uint      `json:"created_by_id" gorm:"type:int4"`
	StatusId      int        `json:"status_id" gorm:"type:int4"`
	IsPublish     *bool      `json:"is_publish" gorm:"type:bool"`
	PublishedAt   *time.Time `json:"published_at" gorm:"type:timestamp"`
	ClientId      *uuid.UUID `json:"client_id" gorm:"type:UUID"`
	IsActive      bool       `json:"is_active" gorm:"type:bool"`
	CreatedAt     time.Time  `json:"created_at" gorm:"default:now()"`
	UpdatedAt     time.Time  `json:"updated_at" gorm:"default:now()"`
}
