package entity

import "time"

type PpidDatas struct {
	ID                        uint       `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
	Title                     string     `json:"title" gorm:"type:varchar"`
	Description               string     `json:"description" gorm:"type:varchar"`
	Slug                      string     `json:"slug" gorm:"type:varchar"`
	CategoryId                uint       `json:"category_id" gorm:"type:int4"`
	CreatedById               *uint      `json:"created_by_id" gorm:"type:int4"`
	LevelGroupId              *int       `json:"level_group_id" gorm:"type:int4"`
	Group                     *string    `json:"group" gorm:"type:varchar"`
	NeedApprovalFromUserRole  *string    `json:"need_approval_from_user_role" gorm:"type:varchar"`
	NeedApprovalFromUserLevel *string    `json:"need_approval_from_user_level" gorm:"type:varchar"`
	BackApprovalToUserRole    *int       `json:"back_approval_to_user_role" gorm:"type:varchar"`
	BackApprovalToUserLevel   *int       `json:"back_approval_to_user_level" gorm:"type:varchar"`
	IsPublish                 *bool      `json:"is_publish" gorm:"type:bool;default:false"`
	PublishLevel              *int       `json:"publish_level" gorm:"type:int4"`
	PublishedAt               *time.Time `json:"published_at" gorm:"type:timestamp"`
	ApprovalStatusId          int        `json:"approval_status_id" gorm:"type:int4"`
	StatusId                  int        `json:"status_id" gorm:"type:int4"`
	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()"`
}
