EventSetting.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. use yii\behaviors\TimestampBehavior;
  5. /**
  6. * This is the model class for table "cyy_event_setting".
  7. *
  8. * @property int $id
  9. * @property int|null $store_id 商城ID
  10. * @property int|null $created_at
  11. * @property int|null $updated_at
  12. * @property int|null $is_delete 是否删除:0=否;1=是;
  13. * @property string|null $banner 轮播图
  14. */
  15. class EventSetting extends \yii\db\ActiveRecord
  16. {
  17. public static function tableName()
  18. {
  19. return 'cyy_event_setting';
  20. }
  21. public function behaviors()
  22. {
  23. return [
  24. [
  25. // 自动更新创建和更新时间
  26. 'class' => TimestampBehavior::class,
  27. 'value' => time()
  28. ]
  29. ];
  30. }
  31. public function rules()
  32. {
  33. return [
  34. [['store_id', 'created_at', 'updated_at', 'is_delete'], 'integer'],
  35. [['banner'], 'string'],
  36. ];
  37. }
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => 'ID',
  42. 'store_id' => '商城ID',
  43. 'created_at' => '创建时间',
  44. 'updated_at' => '更新时间',
  45. 'is_delete' => '是否删除',
  46. 'banner' => '轮播图',
  47. ];
  48. }
  49. }