<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class BlindBoxList extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'blind_box_list';
    protected $fillable = [
        'projectName',
        'price',
        'max_participants_num',
        'min_participants_num',
        'start_time',
        'end_time',
        'winner_num',
        'project_icon',
        'box_num',
        'rules',
        'status',
        'can_invite_num',
        'invite_up_rate'
    ];

    public function user_wallet()
    {
        return $this->hasMany(UserWallet::class, 'blind_box_id');
    }
}
