50 lines
1009 B
PHP
50 lines
1009 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Annotation extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'shape_id',
|
|
'spool_no',
|
|
'joint_type',
|
|
'type_of_welds',
|
|
'classification',
|
|
'page_number',
|
|
'x_coordinate',
|
|
'y_coordinate',
|
|
'width',
|
|
'height',
|
|
'shape_type',
|
|
'qr_code_data',
|
|
'pdf_file_path',
|
|
'created_by',
|
|
'original_start_point',
|
|
'connected_shape_id',
|
|
'version',
|
|
'is_active',
|
|
'parent_id',
|
|
'updated_by',
|
|
'welder_id',
|
|
'stroke_color',
|
|
'stroke_width'
|
|
];
|
|
|
|
protected $casts = [
|
|
'x_coordinate' => 'decimal:2',
|
|
'y_coordinate' => 'decimal:2',
|
|
'width' => 'decimal:2',
|
|
'height' => 'decimal:2',
|
|
];
|
|
|
|
public function updatedUser()
|
|
{
|
|
return $this->belongsTo(User::class, 'updated_by');
|
|
}
|
|
|
|
} |