如何将文件存储在 drupal 实体中?我有一个要与用户关联的公共密钥,因此我创建了一个 APIuser 实体,但我不知道公共密钥属性赋予什么样的字段
function api_user_schema() {
$schema['api_user'] = array(
'description' => 'The base table for api_user.',
'fields' => array(
'id' => array(
'description' => 'The primary identifier for an artwork.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'public_key' => array(
'description' => 'The primary identifier for the public key.',
'type' => ???,
'unsigned' => TRUE,
'not null' => TRUE,
)
'created' => array(
'description' =>
'The Unix timestamp when the api_user was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' =>
'The Unix timestamp when the api_user was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'unique keys' => array(
'id' => array('id')
),
'primary key' => array('id'),
);
return $schema;
}