xhTrainTeacher.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "xhTrainTeacher".
  6. *
  7. * @property integer $id
  8. * @property integer $merchantId
  9. * @property string $teacherName
  10. * @property string $title
  11. * @property string $avatar
  12. * @property string $intro
  13. * @property integer $addTime
  14. * @property integer $modTime
  15. * @property string $createTime
  16. * @property string $updateTime
  17. */
  18. class xhTrainTeacher extends xhBaseModel
  19. {
  20. /**
  21. * @inheritdoc
  22. */
  23. public static function tableName()
  24. {
  25. return 'xhTrainTeacher';
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['merchantId', 'addTime', 'modTime'], 'integer'],
  34. [['intro'], 'required'],
  35. [['intro'], 'string'],
  36. [['createTime', 'updateTime'], 'safe'],
  37. [['teacherName'], 'string', 'max' => 20],
  38. [['title'], 'string', 'max' => 100],
  39. [['avatar'], 'string', 'max' => 200],
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => 'ID',
  49. 'merchantId' => 'Merchant ID',
  50. 'teacherName' => 'Teacher Name',
  51. 'title' => 'Title',
  52. 'avatar' => 'Avatar',
  53. 'intro' => 'Intro',
  54. 'addTime' => 'Add Time',
  55. 'modTime' => 'Mod Time',
  56. 'createTime' => 'Create Time',
  57. 'updateTime' => 'Update Time',
  58. ];
  59. }
  60. }