AttachmentIndex.php 972 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace common\modules\attachment\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%attachment_index}}".
  6. *
  7. * @property integer $attachment_id
  8. * @property integer $entity_id
  9. * @property string $entity
  10. * @property string $attribute
  11. *
  12. * @property Attachment $attachment
  13. */
  14. class AttachmentIndex extends \yii\db\ActiveRecord
  15. {
  16. /**
  17. * @inheritdoc
  18. */
  19. public static function tableName()
  20. {
  21. return '{{%attachment_index}}';
  22. }
  23. /**
  24. * @inheritdoc
  25. */
  26. public function rules()
  27. {
  28. return [
  29. [['attachment_id', 'entity_id'], 'integer'],
  30. [['entity', 'attribute'], 'string', 'max' => 50],
  31. ];
  32. }
  33. /**
  34. * @inheritdoc
  35. */
  36. public function attributeLabels()
  37. {
  38. return [
  39. 'attachment_id' => 'attachment_id',
  40. 'entity_id' => 'Item ID',
  41. 'entity' => 'Model',
  42. 'attribute' => 'Attribute',
  43. ];
  44. }
  45. }