I have a User Model.
I have a Ticket Model.
( I think I will need a Role Model )?
( I think I will need a Transaction Model )?
-----------------------------------------------------------------------
-----I'm trying to create a Approval Ticket system:------
-----------------------------------------------------------------------
- A User can have a Role which gives specific permissions (i.e. Creating a Ticket Object ) or ( Approving / Denying a Ticket Object).
- The Ticket will be created by a form, which copies the data to the Ticket Table Database.
- Depending on the Ticket being Approved/Denied, it will become a Transaction Object (which will copy all the data from the Ticket Object).
- I think Ticket to Transaction will be a 1 to 1 Association.
-----------------------------------------------------------------------
-----My Questions:------
-----------------------------------------------------------------------
1) How should I implement Roles/Permissions to a User Object? Will I need something like a 1 to 1 Association? (1 User -> 1 Role). How would this look in code?
2) How can I create a Transaction Object from a Ticket Object depending on Approval from a specific User Role? I'm super confused on how I can do this..
Thanks for any help!