TimestampBehavior::class, 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()'), ], ]; } /** * {@inheritdoc} */ public function rules() { return [ [['status', 'title', 'template_body'], 'required'], [['template_body'], 'string'], [['status'], 'integer'], [['created_at', 'updated_at'], 'safe'], [['title'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Название', 'template_body' => 'Тело шаблона', 'status' => 'Статус', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } }