There won't be any code in today's post, just some thoughts. I'll probably wait until 1.4.x before seriously getting into this, but I'll try to make it compatible with both lines.
So, first off - database backend. We'd want a table with: ahid (auction house id), auctioneer (person offering the pet), adoptID (the id of the pet), price (the starting price for bids), timestamp (when it was started), duration (the bidding window, and, when the pet would be returned if it is not bid on), type (if its a true auction with bids, or, an instant buyout), bidder (the highest, of course), current bid (not necessary for buyouts), and status (ongoing, finished - possibly others?).
Then we'd have to think of functions we'd need. The index() would have a display(), an option to post(), and a checkstatus() function to see if the user has any pets up for auction. If those auctions are 'finished' then the user can collect() the money from them. The display() would checkduration() and have an organizer() to categorize pets for easy searching, referencing the owned_adoptables table with the adoptID. There should be buttons in the display() for the user to use to buyout() or placebid(). In addition, if the auction belongs to you, you should be able to cancel() it, so long as there are no bids on it.
These are just my notes I scribbled down while waiting in the car. It might become a Wednesday-before-shopping ritual this semester.
So, first off - database backend. We'd want a table with: ahid (auction house id), auctioneer (person offering the pet), adoptID (the id of the pet), price (the starting price for bids), timestamp (when it was started), duration (the bidding window, and, when the pet would be returned if it is not bid on), type (if its a true auction with bids, or, an instant buyout), bidder (the highest, of course), current bid (not necessary for buyouts), and status (ongoing, finished - possibly others?).
Then we'd have to think of functions we'd need. The index() would have a display(), an option to post(), and a checkstatus() function to see if the user has any pets up for auction. If those auctions are 'finished' then the user can collect() the money from them. The display() would checkduration() and have an organizer() to categorize pets for easy searching, referencing the owned_adoptables table with the adoptID. There should be buttons in the display() for the user to use to buyout() or placebid(). In addition, if the auction belongs to you, you should be able to cancel() it, so long as there are no bids on it.
These are just my notes I scribbled down while waiting in the car. It might become a Wednesday-before-shopping ritual this semester.