<commit_before><?php

namespace App\Models;

use App\Events\ItemCreated;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Nanigans\SingleTableInheritance\SingleTableInheritanceTrait;

class Item extends Model
{
    use SoftDeletes;
    use SingleTableInheritanceTrait;

    const ITEM_ACTIVE_MINUTES = 2;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'items';

    /**
     * The column where item type is stored, used to infer single table
     * inheritance subclasses.
     *
     * @var string
     */
    protected static $singleTableTypeField = 'type';

    /**
     * Enumeration of all Item subtype classes.
     *
     * @var array
     */
    protected static $singleTableSubclasses = [
        Items\Image::class,
        Items\Video::class,
    ];

    // Minimum needed to save an item: owner, what type of item, and serialised details<commit_msg>Increase item default lifespan to 1 hour<commit_after><?php

namespace App\Models;

use App\Events\ItemCreated;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Nanigans\SingleTableInheritance\SingleTableInheritanceTrait;

class Item extends Model
{
    use SoftDeletes;
    use SingleTableInheritanceTrait;

    const ITEM_ACTIVE_MINUTES = 60;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'items';

    /**
     * The column where item type is stored, used to infer single table
     * inheritance subclasses.
     *
     * @var string
     */
    protected static $singleTableTypeField = 'type';

    /**
     * Enumeration of all Item subtype classes.
     *
     * @var array
     */
    protected static $singleTableSubclasses = [
        Items\Image::class,
        Items\Video::class,
    ];

    // Minimum needed to save an item: owner, what type of item, and serialised details
{'fraction_non_alphanumeric': 0.08817635270541083, 'fraction_numerical': 0.002004008016032064, 'mean_word_length': 2.7467166979362103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2441400', 'n_tokens_mistral': 619, 'n_tokens_neox': 585, 'n_words': 169}