user_customer.php 385 B

1234567891011121314151617181920
  1. <?php
  2. class UserCustomer extends Model {
  3. protected static $table = "user_customer";
  4. protected static $id_field = ["user_id", "customer_id"];
  5. protected static $fillable_fields = ["user_id", "customer_id"];
  6. // Object methods
  7. public function getUser() {
  8. return User::get($this->user_id);
  9. }
  10. public function getCustomer() {
  11. return Customer::get($this->customer_id);
  12. }
  13. }
  14. ?>