DepositCard.php 748 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Models;
  3. class DepositCard extends Model
  4. {
  5. protected $table = 'deposit_cards';
  6. //
  7. protected $guarded = [];
  8. const GIVE_OK = 1;
  9. const GIVE_NO = 0;
  10. public static $giveMaps = [
  11. self::GIVE_NO => '不可赠送',
  12. self::GIVE_OK => '可赠送',
  13. ];
  14. const STATUS_OK = 1;
  15. const STATUS_NO = 0;
  16. public static $statusMaps = [
  17. self::STATUS_OK=>'启用',
  18. self::STATUS_NO=>'停用',
  19. ];
  20. const DISCOUNT_YES = 1;
  21. const DISCOUNT_NO = 0;
  22. public static $discountMaps = [
  23. self::DISCOUNT_NO => '无折扣',
  24. self::DISCOUNT_YES => '有折扣',
  25. ];
  26. public function area(){
  27. return $this->belongsTo(Area::class,'area_id','id');
  28. }
  29. }