How to define table attribute in the record file Following code is working on Craft 2:
class My_TableRecord extends BaseRecord {
  public function getTableName() {
    return 'my_table';
  }

  protected function defineAttributes() {
    return [
      'title'         =&gt; AttributeType::String,
      'description'   =&gt; AttributeType::Mixed
    ];
  }
}

According to this documentation the defineAttributes() is not available in Craft 3. So how can I define table's attributes in Craft3 to complete following code:
class My_TableRecord extends ActiveRecord
{   public static function tableName()
    {
        return '{{%my_table}}';
    }

  //equivalent function of defineAttributes() of Craft3 will go here

}
So how can I define table's attributes in Craft 3 to complete following code:

You don't.
By just defining the table name, that gives Yii enough information to reflect on the underlying columns for the table.
You can add property doc blocks to get type-hinting in your IDE for the columns.
Probably also worth reading: https://docs.craftcms.com/v3/extend/updating-plugins.html