From bf1906e215cc639ee7a61fedba0424bc6c279d5c Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 23 Dec 2018 10:17:10 -0500 Subject: [PATCH] add timestamp columns to tables --- app/Models/Bidders.php | 9 ++++++++- app/Models/Checkout.php | 9 ++++++++- app/Models/Items.php | 9 ++++++++- app/Models/PaymentMethods.php | 9 ++++++++- app/Models/WinningBids.php | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/app/Models/Bidders.php b/app/Models/Bidders.php index 35f6377..01ad27b 100644 --- a/app/Models/Bidders.php +++ b/app/Models/Bidders.php @@ -16,9 +16,16 @@ class Bidders extends Model 'bidder_zip', 'bidder_phone', 'bidder_email', - 'bidder_assigned_number' + 'bidder_assigned_number', + 'created_at', + 'updated_at' ]; + protected $dates = [ + 'created_at', + 'updated_at' + ]; + public function checkout() { return $this->hasMany('App\Models\Checkout', 'bidder_num', 'idbidders'); diff --git a/app/Models/Checkout.php b/app/Models/Checkout.php index a0ea86f..95971ee 100644 --- a/app/Models/Checkout.php +++ b/app/Models/Checkout.php @@ -13,7 +13,14 @@ class Checkout extends Model 'payment_method', 'check_number', 'cc_transaction', - 'cc_amount' + 'cc_amount', + 'created_at', + 'updated_at' + ]; + + protected $dates = [ + 'created_at', + 'updated_at' ]; public function bidders() diff --git a/app/Models/Items.php b/app/Models/Items.php index 24a4769..f67ea56 100644 --- a/app/Models/Items.php +++ b/app/Models/Items.php @@ -11,9 +11,16 @@ class Items extends Model 'item_desc', 'item_min_bid', 'item_est_value', - 'item_assigned_num' + 'item_assigned_num', + 'created_at', + 'updated_at' ]; + protected $dates = [ + 'created_at', + 'updated_at' + ]; + public function winningBids() { return $this->belongsTo('App\Models\WinningBids', 'winning_item_num', 'iditems'); diff --git a/app/Models/PaymentMethods.php b/app/Models/PaymentMethods.php index 42f489c..b289698 100644 --- a/app/Models/PaymentMethods.php +++ b/app/Models/PaymentMethods.php @@ -8,7 +8,14 @@ class PaymentMethods extends Model { protected $table = 'payment_methods'; protected $fillable = [ - 'pm_name' + 'pm_name', + 'created_at', + 'updated_at' + ]; + + protected $dates = [ + 'created_at', + 'updated_at' ]; public function checkout() diff --git a/app/Models/WinningBids.php b/app/Models/WinningBids.php index d5819c1..4c6d596 100644 --- a/app/Models/WinningBids.php +++ b/app/Models/WinningBids.php @@ -10,7 +10,14 @@ class WinningBids extends Model protected $fillable = [ 'winning_bidder_num', 'winning_cost', - 'winning_item_num' + 'winning_item_num', + 'created_at', + 'updated_at' + ]; + + protected $dates = [ + 'created_at', + 'updated_at' ]; public function items()