60 lines
1.1 KiB
PHP
60 lines
1.1 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', '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',
|
||
|
|
];
|
||
|
|
}
|