SyncDesposit.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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','type'], '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. 'type' => 'Type',
  54. 'memo' => 'Memo',
  55. ];
  56. }
  57. }