You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
1.8 KiB

  1. <?php
  2. declare (strict_types=1);
  3. namespace App\Model;
  4. /**
  5. */
  6. class FinancialRecord extends Model
  7. {
  8. /**
  9. * 虚拟账户
  10. */
  11. const ACCOUNT_LEDGER = -1;
  12. /**
  13. * 账户类型
  14. *
  15. * 总账
  16. * USER_TYPE_LEDGER / -1
  17. *
  18. * 用户/商户账户
  19. * USER_TYPE_USER / 1
  20. *
  21. * MP用户账户,服务商、市场经理、服务站点等
  22. * USER_TYPE_MP / 2
  23. */
  24. const USER_TYPE_LEDGER = -1;
  25. const USER_TYPE_USER = 1;
  26. const USER_TYPE_MP = 2;
  27. /**
  28. * 关联类型
  29. *
  30. * 订单
  31. * SOURCE_TYPE_ORDER / 1
  32. */
  33. const SOURCE_TYPE_ORDER = 1;
  34. /**
  35. * 流水类型,大的分类,<=50是奖励,>50是分账
  36. *
  37. * MONEY_TYPE_PLAT_NEW_USER
  38. * 社区服务点新用户奖励(线上订单完成) / 1
  39. *
  40. * MONEY_TYPE_FIRST_ORDER
  41. * 社区服务点新用户线上首单奖励(线上订单完成) / 2
  42. *
  43. * MONEY_TYPE_OL_ORDER
  44. * 社区服务点用户线上订单分账(线上订单完成) / 51
  45. */
  46. const MONEY_TYPE_PLAT_NEW_USER = 1;
  47. const MONEY_TYPE_FIRST_ORDER = 2;
  48. const MONEY_TYPE_OL_ORDER = 51;
  49. /**
  50. * 状态
  51. */
  52. const STATUS_NORMAL = 1;
  53. const STATUS_ABNORMAL = 2;
  54. /**
  55. * The table associated with the model.
  56. *
  57. * @var string
  58. */
  59. protected $table = 'lanzu_financial_record';
  60. /**
  61. * The attributes that are mass assignable.
  62. *
  63. * @var array
  64. */
  65. protected $fillable = [
  66. 'user_id',
  67. 'user_type',
  68. 'money',
  69. 'money_type',
  70. 'source_id',
  71. 'source_type',
  72. 'desc',
  73. 'comment',
  74. 'status',
  75. ];
  76. /**
  77. * The attributes that should be cast to native types.
  78. *
  79. * @var array
  80. */
  81. protected $casts = [];
  82. }