Files
fdesk/app/common/model/InvRequisitionItem.php
T
2026-02-25 10:40:39 +08:00

57 lines
1.2 KiB
PHP

<?php
namespace app\common\model;
use support\Model;
class InvRequisitionItem extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'inv_requisition_item';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
protected $fillable = ['id', 'requisition_id', 'item_id', 'item_name_snap', 'spec_model_snap', 'unit_snap', 'is_consumable_snap', 'request_qty', 'approved_qty', 'returned_qty', 'is_finished', 'remark', 'created_at', 'updated_at'];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
/**
* 关联领用申请主表
*/
public function requisition()
{
return $this->belongsTo('app\common\model\InvRequisition', 'requisition_id', 'id');
}
}