Spaces:
Running
Running
Download app/Models/ChemistryThread.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 834 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/17620ec48bf4071b3b02de4eac231d791a9eca1c/app/Models/ChemistryThread.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api@17620ec48bf4071b3b02de4eac231d791a9eca1c/app/Models/ChemistryThread.php
-
curl -L -o ChemistryThread.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/17620ec48bf4071b3b02de4eac231d791a9eca1c/app/Models/ChemistryThread.php
834 Bytes
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
| use Illuminate\Database\Eloquent\Relations\HasMany; | |
| class ChemistryThread extends Model | |
| { | |
| use HasFactory; | |
| protected $fillable = [ | |
| 'user_id', | |
| 'thread_id', | |
| 'title', | |
| 'status', | |
| 'last_used_at', | |
| ]; | |
| protected $casts = [ | |
| 'last_used_at' => 'datetime', | |
| ]; | |
| public function user(): BelongsTo | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| public function analyses(): HasMany | |
| { | |
| return $this->hasMany(ChemistryAnalysis::class); | |
| } | |
| public function csvJobs(): HasMany | |
| { | |
| return $this->hasMany(ChemistryCsvJob::class, 'chemistry_thread_id'); | |
| } | |
| } | |