AttachmentIndex.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\modules\admin\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%attachment_index}}".
  6. *
  7. * @property int $id ID
  8. * @property int $a_id 附件ID
  9. * @property string $table_name 数据表
  10. * @property int $data_id 关联的记录ID
  11. * @property string $field 字段
  12. */
  13. class AttachmentIndex extends \app\common\models\EActiveRecord
  14. {
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public static function tableName()
  19. {
  20. return '{{%attachment_index}}';
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function rules()
  26. {
  27. return [
  28. [['a_id'], 'required'],
  29. [['a_id', 'data_id'], 'integer'],
  30. [['table_name', 'field'], 'string', 'max' => 50],
  31. ];
  32. }
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function attributeLabels()
  37. {
  38. return [
  39. 'id' => 'ID',
  40. 'a_id' => '附件ID',
  41. 'table_name' => '数据表',
  42. 'data_id' => '关联的记录ID',
  43. 'field' => '字段',
  44. ];
  45. }
  46. }