Forum OpenACS Development: Re: cr_item or acs_object

2: Re: cr_item or acs_object (response to 1)
Posted by Iuri Sampaio on
Further on content_revision approach, it would required to create its datamodel together with:

select content_type__create_type (...)

select content_folder__register_content_type(...);

Then on tcl procs level to add a new rate as well its revisions there will require to use a few methods such as

set revision_id [cr_import_content...]
item::publish -item_id $item_id -revision_id $revision_id

Assuming, a rate is never an actual file, to use cr_revisions doesn't seem to be the correct approach to take.

What's the proper way to storage rates of currencies?

3: Re: cr_item or acs_object (response to 2)
Posted by Dave Bauer on
Do you need to permission each row of the rates table? If not you might not need acs_objects or content_items at all.

I think a simple table of current rates and an archive table of historical rates would work. You could do it all in one table as well, depends how often you need to refer to each.

4: Re: cr_item or acs_object (response to 3)
Posted by Iuri Sampaio on
In fact I don't. That simplifies a lot!

I'll design it to storage all in one table only, with a new column to storage the date (timestamptz)

The idea is to show the latest rate in a headline panel, plus I'll built a forecast graphic based on its historic.

Thanks Dave.

Best wishes