ArticleMeta.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2016-10-16 17:15
  7. */
  8. namespace common\models;
  9. use Yii;
  10. use yii\behaviors\TimestampBehavior;
  11. /**
  12. * This is the model class for table "{{%article_meta}}".
  13. *
  14. * @property string $aid
  15. * @property string $keyName
  16. * @property string $value
  17. * @property string $ip
  18. * @property string $created_at
  19. */
  20. class ArticleMeta extends \yii\db\ActiveRecord
  21. {
  22. public function behaviors()
  23. {
  24. return [
  25. [
  26. 'class' => TimestampBehavior::className(),
  27. 'updatedAtAttribute' => false,
  28. ],
  29. ];
  30. }
  31. /**
  32. * @inheritdoc
  33. */
  34. public static function tableName()
  35. {
  36. return '{{%article_meta}}';
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['aid'], 'required'],
  45. [['aid', 'created_at'], 'integer'],
  46. [['key'], 'string', 'max' => 255],
  47. ];
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'id' => Yii::t('app', 'ID'),
  56. 'aid' => Yii::t('app', 'Aid'),
  57. 'key' => Yii::t('app', 'Key'),
  58. 'value' => Yii::t('app', 'Value'),
  59. 'created_at' => Yii::t('app', 'Created At'),
  60. ];
  61. }
  62. }