created_at = time(); } public function beforeUpdate() { $this->updated_at = time(); } public static function roles() { $list = [ self::ROLE_STUDENT => '学员', self::ROLE_TEACHER => '讲师', ]; return $list; } public static function sources() { $list = [ self::SOURCE_FREE => '免费课程', self::SOURCE_PAID => '付费课程', self::SOURCE_VIP => '会员免费', self::SOURCE_IMPORT => '后台导入', ]; return $list; } }