123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace common\modules\message\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%message_data}}".
- *
- * @property integer $id
- * @property string $content
- * @property integer $created_at
- */
- class MessageData extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%message_data}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- ['content', 'required'],
- [['content'], 'string'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => Yii::t('app', 'ID'),
- 'content' => '内容',
- 'created_at' => Yii::t('app', 'Created At'),
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'updatedAtAttribute' => false
- ]
- ];
- }
- }
|