1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Activity extends Model
- {
- static $honor=['dlb'=>'大礼包','ryq'=>'荣誉墙','ly'=>'旅游','dlbc'=>'大礼包C','dlbd'=>'大礼包D'];
- 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');
- }
- }
|