123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\model;
- use DateTimeInterface;
- use support\Model;
- class ClientContent extends Model
- {
- protected $table = 'client_content';
- protected $primaryKey = 'client_content_id';
- protected $dateFormat = 'U';
- const CREATED_AT = 'client_content_addtimes';
- const UPDATED_AT = null;
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format('Y-m-d H:i:s');
- }
- public function member(){
- return $this->hasOne(Member::class,'member_id','join_client_content_member_id');
- }
- public function info(){
- return $this->hasOne(MemberInfo::class,'join_info_member_id','join_client_content_member_id');
- }
- public function cert(){
- return $this->hasOne(MemberCert::class,'join_cert_member_id','join_client_content_member_id');
- }
- }
|