LuckyGroupBanners.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace addons\LuckyGroup\common\models;
  3. use common\models\base\BaseActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for table "{{%addons_lucky_group_banners}}".
  7. *
  8. * @property int $id
  9. * @property int $mall_id
  10. * @property int $sort 序号
  11. * @property string $title 图片标题
  12. * @property string $pic_link 图片跳转链接
  13. * @property string $pic_path 图片保存路径
  14. * @property string $bgcolor 背景色
  15. * @property int $is_show 是否展示,1:是,0:不是
  16. * @property int $status 状态[-1:删除;0:禁用;1启用]
  17. * @property int $created_at
  18. * @property int $updated_at
  19. */
  20. class LuckyGroupBanners extends BaseActiveRecord
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%addons_lucky_group_banners}}';
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['mall_id'], 'required'],
  36. [['mall_id', 'sort', 'is_show', 'status', 'created_at', 'updated_at'], 'integer'],
  37. [['title', 'pic_link', 'pic_path'], 'string', 'max' => 255],
  38. [['bgcolor'], 'string', 'max' => 100],
  39. ];
  40. }
  41. /**
  42. * {@inheritdoc}
  43. */
  44. public function attributeLabels()
  45. {
  46. return [
  47. 'id' => 'ID',
  48. 'mall_id' => 'Mall ID',
  49. 'sort' => '序号',
  50. 'title' => '图片标题',
  51. 'pic_link' => '图片跳转链接',
  52. 'pic_path' => '图片保存路径',
  53. 'bgcolor' => '背景色',
  54. 'is_show' => '是否展示,1:是,0:不是',
  55. 'status' => '状态[-1:删除;0:禁用;1启用]',
  56. 'created_at' => 'Created At',
  57. 'updated_at' => 'Updated At',
  58. ];
  59. }
  60. }