Why 'role' and 'status' are smallint?

I created my first user in my first yii 2 app: admin/admin, just to study yii 2

I see in db that role is set to 10, and status is set to 10

Can you explain me why to use integers instead of textual consts ? (ACTIVE, DELETED,… ADMIN, MANAGER, etc…)

There’s no real reason. Both are OK.

So, if we don’t use RBAC, to check the role we must create others constants into UserIdentity and check using these constants, right?

Well, that’s only a possible solution. There are certainly many ways of handling it.