12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Activity extends Model
- {
- static $honor=['dlb'=>'大礼包','ryq'=>'荣誉墙','ly'=>'旅游','dlba'=>'大礼包A-a','dlbb'=>'大礼包A-b','dlbc'=>'大礼包B-a','dlbd'=>'大礼包B-b','dlbe'=>'大礼包B-c'];
- static $levels=['3'=>'批发商','2'=>'经销商','1'=>'销售员'];
- use SoftDeletes;
- protected $table='activity';
- protected $fillable = ['title','start_time','end_time','big_gift','honor_wall','is_ing','super_up','top_down','top_up','crown_down','contents','disabled'];
- public function gift()
- {
- return $this->hasMany('App\Models\Gifts','activity_id','id');
- }
- public function activity_limit_honor()
- {
- return $this->hasMany('App\Models\ActivityLimit','activity_id','id');
- }
- public function activity_limit_down()
- {
- return $this->hasMany('App\Models\ActivityLimit','activity_id','id');
- }
- }
|