MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
160 stars 47 forks source link

Use dynamic model variables for timestamp column names #839

Closed stoutput closed 9 months ago

stoutput commented 1 year ago

Replaces hardcoded "created_at" and "updated_at" timestamp column names with base model's date_created_at and date_updated_at variables. This allows configurability over which columns to use with the timestamps mixin. Besides, if we're already using these variables for date casting, we should also use them in the mixin.

stoutput commented 1 year ago

@josephmancuso What do you think? Been waiting on this one for a while to finish out a PR in another repo.

stoutput commented 1 year ago

I seem to recall dynamic timestamp column names had been implemented at one point in the past, but I'm not totally sure...