CommissionLog.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. namespace backend\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "crm_commission_log".
  6. *
  7. * @property integer $id
  8. * @property integer $login
  9. * @property integer $member_id
  10. * @property string $type
  11. * @property double $forex
  12. * @property double $metal
  13. * @property double $cfd
  14. * @property double $gold
  15. * @property double $silver
  16. * @property double $wy
  17. * @property double $stock
  18. * @property double $btc
  19. * @property integer $modify_user
  20. * @property integer $in_time
  21. */
  22. class CommissionLog extends \yii\db\ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return 'crm_commission_log';
  30. }
  31. /**
  32. * @return \yii\db\Connection the database connection used by this AR class.
  33. */
  34. public static function getDb()
  35. {
  36. return Yii::$app->get('dbXcrm');
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['login', 'member_id', 'type', 'modify_user', 'in_time'], 'required'],
  45. [['login', 'member_id', 'modify_user', 'in_time'], 'integer'],
  46. [['forex', 'metal', 'cfd', 'gold', 'silver', 'wy', 'stock', 'btc'], 'number'],
  47. [['type'], 'string', 'max' => 20],
  48. ];
  49. }
  50. /**
  51. * @inheritdoc
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => '主键ID',
  57. 'login' => 'MT4登录ID',
  58. 'member_id' => '代理商ID',
  59. 'type' => '返佣类型',
  60. 'forex' => 'forex',
  61. 'metal' => 'metal',
  62. 'cfd' => 'cfd',
  63. 'gold' => '黄金',
  64. 'silver' => '白银',
  65. 'wy' => '外佣',
  66. 'stock' => '股指',
  67. 'btc' => '比特币',
  68. 'modify_user' => '操作人id',
  69. 'in_time' => '创建时间',
  70. ];
  71. }
  72. }