<?php namespace App\Models;

use CodeIgniter\Model;

class GitPullRequestsModel extends Model
{
	protected $table = 'git_pull_requests';
	protected $primaryKey = 'id';
	protected $useAutoIncrement = true;
	protected $returnType = 'array';
	protected $useSoftDeletes = false;
	protected $protectFields = true;
	protected $allowedFields = [
		'gitea_pr_id',
		'repository_id',
		'author_user_id',
		'number',
		'title',
		'body',
		'state',
		'is_draft',
		'is_merged',
		'merged_at',
		'closed_at',
		'created_at_gitea',
		'updated_at_gitea',
		'html_url',
	];

	protected $useTimestamps = true;
	protected $dateFormat = 'datetime';
	protected $createdField = 'created_at';
	protected $updatedField = 'updated_at';
}
