liufumingren e8605149c0 初始化
2026-08-06 17:04:35 +08:00

35 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\common\model\wms;
use think\Model;
/**
* 地区数据模型
*/
class Storage extends Model
{
protected $connection = 'db_wms';
// 表名
protected $name = 'storage';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
];
public function employees()//yewu为第一张表的字段,employee_num为第二张表的字段
{
return $this->belongsTo('app\common\model\wms\Stock', 'STOCKID', 'STOCKID', [], 'LEFT')->setEagerlyType(0);
}
public function employees2()//yewu为第一张表的字段,employee_num为第二张表的字段
{
return $this->belongsTo('app\common\model\wms\Space', 'SPACEID', 'SPACEID', [], 'LEFT')->setEagerlyType(0);
}
public function goods(){
return $this->belongsTo('app\common\model\wms\Goods', 'GOODSID', 'GOODSID', [], 'LEFT')->setEagerlyType(0);
}
}