CommissionTicket.php 906 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace backend\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "crm_commission_ticket".
  6. *
  7. * @property integer $ticket
  8. * @property integer $type
  9. */
  10. class CommissionTicket extends \yii\db\ActiveRecord
  11. {
  12. /**
  13. * @inheritdoc
  14. */
  15. public static function tableName()
  16. {
  17. return 'crm_commission_ticket';
  18. }
  19. /**
  20. * @return \yii\db\Connection the database connection used by this AR class.
  21. */
  22. public static function getDb()
  23. {
  24. return Yii::$app->get('dbXcrm');
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['ticket'], 'required'],
  33. [['ticket', 'type'], 'integer'],
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'ticket' => 'Ticket',
  43. 'type' => 'Type',
  44. ];
  45. }
  46. }