StoreSeparateAccountRecord.php 540 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\models\store;
  3. use app\models\user\User;
  4. use crmeb\services\UtilService;
  5. use crmeb\traits\ModelTrait;
  6. use crmeb\basic\BaseModel;
  7. class StoreSeparateAccountRecord extends BaseModel
  8. {
  9. /**
  10. * 数据表主键
  11. * @var string
  12. */
  13. protected $pk = 'id';
  14. /**
  15. * 模型名称
  16. * @var string
  17. */
  18. protected $name = 'store_separate_account_record';
  19. use ModelTrait;
  20. public function user()
  21. {
  22. return self::hasOne(User::class, 'uid', 'uid')->field('uid,nickname');
  23. }
  24. }