<?php

namespace GemBoards\Entities;

use GemBoards\Classes\AbstractEntity;
use GemBoards\factories\FavouriteBoardFactory;


class FavouriteBoard extends AbstractEntity {

	protected string $table       = 'gemboards_favourite_boards';
	protected string $object_type = 'favourite_board';

	protected array $data = [
		'board_id'   => 0,
		'user_id'    => 0,
		'sort_order' => 1,
	];

	public static function factory(): FavouriteBoardFactory {
		return FavouriteBoardFactory::init();
	}

	public function get_board_id( string $context = 'view' ) {
		return $this->get_prop( 'board_id', $context );
	}

	public function get_user_id( string $context = 'view' ) {
		return $this->get_prop( 'user_id', $context );
	}

	public function get_sort_order( string $context = 'view' ) {
		return $this->get_prop( 'sort_order', $context );
	}

	public function set_board_id( int $value ) {
		$this->set_prop( 'board_id', $value );
	}

	public function set_user_id( int $value ) {
		$this->set_prop( 'user_id', $value );
	}

	public function set_sort_order( int $value ) {
		$this->set_prop( 'sort_order', $value );
	}

}
