How to define table attribute in the record file
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