Files
fdesk/app/common/model/StockOrdersFiles.php
T
2025-11-03 18:16:51 +08:00

60 lines
1.2 KiB
PHP

<?php
namespace app\common\model;
use support\Model;
class StockOrdersFiles extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'stock_orders_files';
/**
* 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', 'order_id', 'file_name', 'file_code', 'file_url', 'original_name', 'created_at', 'updated_at'];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
const CONTRACT = 'contract';
const TRANSACTION_SLIP = 'transaction_slip';
const PI_DOC = 'pi_doc';
const FILE_CODE = [
self::CONTRACT => '合同',
self::TRANSACTION_SLIP => '水单',
self::PI_DOC => 'PI',
];
}