Open Closed

Organization unit entity as foreign key into new table #4811


User avatar
0
moinahmed created

I'm trying to create a new entity (Department) as follows: Entity name: Department

| Name | DataType | Remarks | | ---- | -------- | ------- | | Id | Uniqueidentifier | Primary Key | | Name | NVarchar(255) | Department name | | OrganizationUnitId (FK) | UniqueIdentifier | Foreign key from OrganizationUnit entity |

How can I achieve this? Also, how to add Collection property (Departments) in OrganizationUnity entity?

Thanks, Moin


2 Answer(s)
  • User Avatar
    0
    moinahmed created

    The actual ask is I'd like to extend IdentiyUser model to add departments functionality just as we have for roles in the same table. I need a collection out there with all CRUD methods.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    How can I achieve this?

    You can try this:

    how to add Collection property (Departments) in OrganizationUnity entity?

    The OrganizationUnity is built in the identity module, you can't add a Collection property in it.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09