feat: ship creator journey v2 and profile updates
This commit is contained in:
46
app/Models/CreatorMilestone.php
Normal file
46
app/Models/CreatorMilestone.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class CreatorMilestone extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'type',
|
||||
'occurred_at',
|
||||
'occurred_year',
|
||||
'related_artwork_id',
|
||||
'is_public',
|
||||
'priority',
|
||||
'payload_json',
|
||||
'computed_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'occurred_at' => 'datetime',
|
||||
'occurred_year' => 'integer',
|
||||
'related_artwork_id' => 'integer',
|
||||
'is_public' => 'boolean',
|
||||
'priority' => 'integer',
|
||||
'payload_json' => 'array',
|
||||
'computed_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function artwork(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Artwork::class, 'related_artwork_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user