You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1KB

  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "etablissement".
  6. *
  7. * @property integer $id
  8. * @property string $nom
  9. * @property string $siret
  10. * @property string $logo
  11. * @property string $photo
  12. * @property string $description
  13. * @property string $code_postal
  14. * @property string $ville
  15. */
  16. class Etablissement extends \yii\db\ActiveRecord
  17. {
  18. /**
  19. * @inheritdoc
  20. */
  21. public static function tableName()
  22. {
  23. return 'etablissement';
  24. }
  25. /**
  26. * @inheritdoc
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['nom', 'siret'], 'required'],
  32. [['description'], 'string'],
  33. [['nom', 'siret', 'logo', 'photo', 'code_postal', 'ville'], 'string', 'max' => 255],
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'nom' => 'Nom',
  44. 'siret' => 'Siret',
  45. 'logo' => 'Logo',
  46. 'photo' => 'Photo',
  47. 'description' => 'Description',
  48. 'code_postal' => 'Code postal',
  49. 'ville' => 'Ville',
  50. ];
  51. }
  52. }