Mails.php 944 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "mails".
  6. *
  7. * @property integer $id
  8. * @property string $email
  9. * @property string $title
  10. * @property string $text
  11. * @property integer $process
  12. */
  13. class Mails extends \yii\db\ActiveRecord
  14. {
  15. /**
  16. * @inheritdoc
  17. */
  18. public static function tableName()
  19. {
  20. return 'mails';
  21. }
  22. /**
  23. * @inheritdoc
  24. */
  25. public function rules()
  26. {
  27. return [
  28. [['email', 'title', 'text'], 'required'],
  29. [['text'], 'string'],
  30. [['process'], 'integer'],
  31. [['email', 'title'], 'string', 'max' => 255]
  32. ];
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'email' => 'Email',
  42. 'title' => 'Title',
  43. 'text' => 'Text',
  44. 'process' => 'Process',
  45. ];
  46. }
  47. }