AsusgJobplan.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace app\models\entity;
  3. use Yii;
  4. /**
  5. * This is the model class for table "asusg_jobplan".
  6. *
  7. * @property int $id
  8. * @property string $name
  9. * @property int $smopp_jt_id
  10. * @property int $asusg_id
  11. */
  12. class AsusgJobplan extends \yii\db\ActiveRecord
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName()
  18. {
  19. return 'asusg_jobplan';
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function rules()
  25. {
  26. return [
  27. [['name'], 'required'],
  28. //[['smopp_jt_id', 'asusg_id'], 'integer'],
  29. [['name'], 'string', 'max' => 255],
  30. [['name'], 'unique'],
  31. ];
  32. }
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function attributeLabels()
  37. {
  38. return [
  39. 'id' => 'ID',
  40. 'name' => 'Name',
  41. //'smopp_jt_id' => 'Smopp Jt ID',
  42. //'asusg_id' => 'Asusg ID',
  43. ];
  44. }
  45. public function getTaskstypes()
  46. {
  47. //return $this->hasMany(Tasktypes::className(), ['id' => 'smopp_jt_id']);
  48. }
  49. public function setSections()
  50. {
  51. //return $this->hasMany(Sections::className(), ['id' => 'smopp_jt_id']);
  52. }
  53. }