Can I add a protocol to a Mogenerator-generated class file

137 Views Asked by At

I'm using Mogenerator to generate my class files in my iPhone app.

I have a Staff base model which I want to extend using different protocols eg. protocols like manager, security etc but a staff member may be entitled to both manager and security protocols.

So let's say the Staff concrete model looks like the following:

Staff

String firstName, lastName

And then the manager protocol can have say a managerialLevel property and the security protocol can have a passCode property.

Some staff members should have one of the other, some should have none and some should have both.

However, I don't see how I can use protocol with Mogenerator. Up to now I use the xcdatamodelId file to create concrete classes and their properties but I want these protocols to add properties to some staff models.

Is this possible?

0

There are 0 best solutions below