Hello I need help, firstly i created an account for the tenants with login credentials and the problem is how can i assign specific room vacant, with bed number where tenant can view on his account.
I will provide an oml for the database(SRMS core) and main module(SRMS main) for this to understand much further.
Regards,
Reuben
Dear @Reuben Dimaano .
Would you like to share BL_SRMS oml file?
@ndy sure
Ho @Reuben Dimaano
Create one more table "TenantToBed" with "TenantId, RoomId, BedId, CheckInDate, CheckoutDate". Using new UI add Bed information for tenant there.
When tenant login, pull data from this table with joining Room & Bed table to display in tenant profile.
BTW your current design is having circular reference means Core has reference of BL & BL has reference of CORE. Moving there structure from BL to Core module will resolve this issue.
@Muhammad Mahmudul Hasan so there is no BL module. Instead those structure will go be on the core module?
Correct, In your case not required as you only have structure on BL.
The use case where BL is needed will be if have server action where you doing calculation or Combining multiple logic.
@Muhammad Mahmudul Hasan, also on the tenants can i do user extended? in my oml on the core is i used the users extends where it named Tenant the Entity with username and password. Can i remove the username and password entities on user extends(Tenants) because as I've see it has the Users default pass and username entities
Hi Reuben,
Yes, you don't need to save UserName, Password, FullName, EmailAddress again in Tenants table as those will be saved on Systems User table. Only adding UserId as foreign key is enough.
Btw don't forget to mark my answer as solution if it resolved your issue.