SyncDesposit.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace backend\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "crm_sync_desposit".
  6. *
  7. * @property integer $id
  8. * @property integer $login
  9. * @property double $amount
  10. * @property string $comment
  11. * @property integer $is_sync
  12. * @property string $memo
  13. */
  14. class SyncDesposit extends \yii\db\ActiveRecord
  15. {
  16. /**
  17. * @inheritdoc
  18. */
  19. public static function tableName()
  20. {
  21. return 'crm_sync_desposit';
  22. }
  23. /**
  24. * @return \yii\db\Connection the database connection used by this AR class.
  25. */
  26. public static function getDb()
  27. {
  28. return Yii::$app->get('dbXcrm');
  29. }
  30. /**
  31. * @inheritdoc
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['login', 'amount', 'comment'], 'required'],
  37. [['login', 'is_sync'], 'integer'],
  38. [['amount'], 'number'],
  39. [['comment', 'memo'], 'string', 'max' => 255],
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => 'ID',
  49. 'login' => 'Login',
  50. 'amount' => 'Amount',
  51. 'comment' => 'Comment',
  52. 'is_sync' => 'Is Sync',
  53. 'memo' => 'Memo',
  54. ];
  55. }
  56. }