Sin descripción

Goods.php 414B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2017/12/5
  6. * Time: 15:07
  7. */
  8. namespace App;
  9. use Illuminate\Database\Eloquent\Model;
  10. class Goods extends Model
  11. {
  12. public $timestamps = false;
  13. protected $table = "goods";
  14. # 生成外部商品编码
  15. public static function createOuterCode(){
  16. $redisKey = config('constants.GOODS_AUTOKEY');
  17. return RedisModel::lpop($redisKey);
  18. }
  19. }