<?php

namespace app\admin\model;

use app\admin\controller\life\FarmGoods;
use support\Db;
use support\Model;

/**
 * 绿色蔬菜订单详情
 * Class Order
 * @package app\admin\model
 */
class LifeFarmOrderDetail extends Model
{
    /**
     *
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'life_farm_order_detail';

    public $timestamps = false;
    public function getDetailCreateTimeAttribute($value)
    {
        return date('Y-m-d H:i:s', $value);
    }
    public function Goods(){
        return $this->belongsTo(LifeFarmGoods::class,'detail_goods_id','goods_id');
    }
    public function User(){
        return $this->belongsTo(User::class,'detail_user_id','user_id');
    }
}