12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace huo\model\game;
- use huo\model\common\CommonModel;
- class GiftcodeModel extends CommonModel {
- protected $name = 'gift_code';
-
- protected $readonly = ['gift_id', 'code', 'create_time'];
-
- protected $autoWriteTimestamp = true;
-
- protected $type
- = [
- 'gift_id' => 'integer',
- 'mem_id' => 'integer'
- ];
-
- protected $relationFilter = ['member', 'gift'];
-
- public function member() {
- return $this->belongsTo('huo\model\member\MemberModel', 'mem_id');
- }
-
- public function gift() {
- return $this->belongsTo('huo\model\game\GiftModel', 'gift_id', 'id',[], 'left')->setEagerlyType(0);
- }
- }
|