Equivalent of Records in Craft 3?
/**
 * Class SearchRelationship record
 *
 * @property int $id
 * @property int $aaa
 * @property int $bbb
 * @property string $ccc
*/
class SearchRelationship extends ActiveRecord
{
    /**
     * @inheritdoc
     * @return string
     */
    public static function tableName(): string
    {
        return '{{%somename}}';
    }
}

All you really need to define is the table name.  Yii 2 uses reflection on the database table to generate the column/object property names at runtime (replacing the old setAttributes method).
Worth reading: https://www.yiiframework.com/doc/guide/2.0/en/db-active-record
Indexes should be initially defined in your plugin's install migration (replacing defineIndexes).