审查视图

application/api/model/GoodsSpecRel.php 500 字节
李忠强 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?php


namespace app\api\model;


use think\Model;

class GoodsSpecRel extends Model
{
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    protected $name = 'litestore_goods_spec_rel';
    protected $createTime = 'create_time';
    protected $updateTime = '';

    public function spec()
    {
        return $this->belongsTo('Spec','spec_id','id');
    }

    public function specvalue()
    {
        return $this->belongsTo('SpecValue','spec_value_id','id');
    }
}