<?php namespace App\Models;

use CodeIgniter\Model;

class GitUsersModel extends Model
{
	protected $table = 'git_users';
	protected $primaryKey = 'id';
	protected $useAutoIncrement = true;
	protected $returnType = 'array';
	protected $useSoftDeletes = false;
	protected $protectFields = true;
	protected $allowedFields = [
		'gitea_user_id',
		'username',
		'full_name',
		'email',
		'avatar_url',
		'is_active',
		'is_admin',
		'last_synced_at',
	];

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