Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. <?php
  2.  
  3. namespace app\models;
  4.  
  5. use Yii;
  6.  
  7. /**
  8. * This is the model class for table "{{%good}}".
  9. *
  10. * @property integer $id
  11. * @property string $title
  12. * @property string $text
  13. * @property integer $rubric_id
  14. * @property integer $user_id
  15. * @property string $created_at
  16. * @property integer $deleted
  17. * @property integer $good_id
  18. */
  19. class Good extends \yii\db\ActiveRecord
  20. {
  21. /**
  22. * @inheritdoc
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%good}}';
  27. }
  28.  
  29. /**
  30. * @inheritdoc
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['text'], 'string'],
  36. [['rubric_id', 'user_id', 'good_id'], 'integer'],
  37. [['created_at'], 'safe'],
  38. [[ 'good_id'], 'required'],
  39. [['title'], 'string', 'max' => 255],
  40. ];
  41. }
  42.  
  43. /**
  44. * @inheritdoc
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'title' => 'Title',
  51. 'text' => 'Text',
  52. 'rubric_id' => 'Rubric ID',
  53. 'user_id' => 'User ID',
  54. 'created_at' => 'Created At',
  55. 'deleted' => 'Deleted',
  56. 'good_id' => 'Good ID',
  57. ];
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement