Tmc.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace app\models\entity;
  3. /**
  4. * This is the model class for table "tools_devices".
  5. *
  6. * @property int $id
  7. * @property string $title
  8. * @property string $ip
  9. * @property string $mac
  10. * @property int $tmc_type
  11. * @property string $receipt_date
  12. * @property string $write_off_date
  13. * @property string $inventory_num
  14. * @property string $desc
  15. * @property int $status
  16. * @property int $company
  17. * @property int $storage
  18. * @property int $employee
  19. */
  20. class Tmc extends \yii\db\ActiveRecord
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public static function tableName()
  26. {
  27. return 'tools_devices';
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['tmc_type', 'status', 'company', 'storage'], 'integer'],
  36. [['title', 'ip', 'mac', 'receipt_date', 'write_off_date', 'inventory_num', 'desc'], 'string', 'max' => 255],
  37. ];
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'id' => 'ID',
  46. 'title' => 'Title',
  47. 'ip' => 'IP',
  48. 'mac' => 'MAC',
  49. 'tmc_type' => 'Type of tmc',
  50. 'receipt_date' => 'Date of receipt',
  51. 'write_off_date' => 'Date of write-off',
  52. 'inventory_num' => 'Inventory number',
  53. 'desc' => 'Description',
  54. 'status' => 'ID status',
  55. 'company' => 'ID company',
  56. 'storage' => 'ID storage',
  57. ];
  58. }
  59. }