下面是我的客户数据对象
<?php
class Customer extends DataObject {
static $db = array(
'FirstName' => 'Varchar',
'Surname' => 'Varchar',
'Email' => 'Varchar',
'CustomerType' => "Enum('Private,Business','Private')"
);
static $has_one = array(
'Avatar' => 'Image',
);
static $has_many = array(
'HostingContracts' => 'HostingContract'
);
static $summary_fields = array(
'FirstName',
'Surname',
'CustomerType'
);
static $searchable_fields = array(
'FirstName',
'Surname',
'HostingContracts.ContractNumber'
);
}
?>
我需要“客户”显示为“客户”而不更改对象的类名。有谁知道如何做到这一点?