FriendlyLink.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace addons\TinyBlog\common\models;
  3. use common\behaviors\MerchantStoreBehavior;
  4. /**
  5. * This is the model class for table "{{%addon_tiny_blog_friendly_link}}".
  6. *
  7. * @property int $id 主键
  8. * @property int|null $merchant_id 商户id
  9. * @property int|null $store_id 店铺id
  10. * @property string $title 标题
  11. * @property string|null $link 外链
  12. * @property int $view 浏览量
  13. * @property int $sort 优先级
  14. * @property int|null $status 状态
  15. * @property int $created_at 创建时间
  16. * @property int $updated_at 更新时间
  17. */
  18. class FriendlyLink extends \common\models\base\BaseModel
  19. {
  20. use MerchantStoreBehavior;
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%addon_tiny_blog_friendly_link}}';
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function rules()
  32. {
  33. return [
  34. [['merchant_id', 'store_id', 'view', 'sort', 'status', 'created_at', 'updated_at'], 'integer'],
  35. [['title', 'link'], 'required'],
  36. [['title'], 'string', 'max' => 50],
  37. [['link'], 'string', 'max' => 255],
  38. ];
  39. }
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function attributeLabels()
  44. {
  45. return [
  46. 'id' => '主键',
  47. 'merchant_id' => '商户id',
  48. 'store_id' => '店铺id',
  49. 'title' => '标题',
  50. 'link' => '外链',
  51. 'view' => '浏览量',
  52. 'sort' => '优先级',
  53. 'status' => '状态',
  54. 'created_at' => '创建时间',
  55. 'updated_at' => '更新时间',
  56. ];
  57. }
  58. }
粤ICP备19079148号