MemberAccountList.php 902 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\model;
  3. use DateTimeInterface;
  4. use support\Model;
  5. class MemberAccountList extends Model
  6. {
  7. protected $table = 'member_account_list';
  8. protected $primaryKey = 'member_account_list_id';
  9. protected $dateFormat = 'U';
  10. const CREATED_AT = 'member_account_list_addtimes';
  11. const UPDATED_AT = null;
  12. public function serializeDate(DateTimeInterface $date)
  13. {
  14. return $date->format('Y-m-d H:i:s');
  15. }
  16. public function member()
  17. {
  18. return $this->hasOne(Member::class, 'member_id', 'join_member_account_list_member_id');
  19. }
  20. public function memberInfo()
  21. {
  22. return $this->hasOne(MemberInfo::class, 'join_info_member_id', 'join_member_account_list_member_id');
  23. }
  24. public function memberCert()
  25. {
  26. return $this->hasOne(MemberCert::class, 'join_cert_member_id', 'join_member_account_list_member_id');
  27. }
  28. }