DB & AR advise please (diagram inc)

Hi,
Being new to Rails and Active record could someone please check my
database diagram:

I am building a trouble ticket system for my company. Simply put a
client has many users. Those users can create trouble tickets. Each
trouble ticket can have many journals that track the progress of the
ticket. An employee (of our company) can take ownership of a trouble
ticket to solve the problem.

As you can see from the diagram the employees and users table looks
identical. Is this something that I can acomplish with singe table
inheritance, thus creating a model for employees and one for users?

Also is my Active record text correct in your opinion? I would like to
be able to do things like:

client = Client.find(params[:id])
client.get_all_active_tickets

user = User.find(params[:id])
user.get_all_tickets

ticket = Ticket.find(params[:id])
ticket.get_all_journals
ticket.get_current_employee
ticket.get_status
ticket.get_company_name
ticket.get_company_email

employee = Employee.find(“John S.”)
employee.get_all_my_tickets

Any help would be fantastic!

Thanks Aftershock

You might want to have a look at this site,
http://www.simpleticket.net/.
Open source ticket system about to be launched this weekend. I am not
in
any way associated with Architel.
Harvey

On 27/1/06 16:13, “James W.” [email protected] wrote:

ticket. An employee (of our company) can take ownership of a trouble
client.get_all_active_tickets

employee = Employee.find(“John S.”)
employee.get_all_my_tickets

Any help would be fantastic!

Thanks Aftershock

This e-mail has been scanned for all viruses by MessageLabs.

Harvey,

Thanks I have seen the simpleticket blog etc. The system i’m building is
only part of the whole application and it is tailored to what we
require. After this is completed it will be expanded to include client
invoicing (this is currently done by PDF), client kit ordering, employee
timesheets (linked in with the time spent on answering trouble tickets)
etc.

It would be useful to see what simpleticket has but I am very keen to
learn my own way of doing things rather than copy another solution. My
plan is to learn more and more ruby & rails stuff.

Does the diagram look ok? Am I on the right lines?