hujiabin ee31a8c76a 1
2022-11-16 14:51:54 +08:00

32 lines
638 B
PHP

<?php
namespace models;
use mt;
use phpcommon\SqlHelper;
class Guild extends BaseModel
{
public static function find($guildId){
$row = SqlHelper::ormSelectOne(
myself()->_getRelationDbMysql(),
'guild',
array(
'guild_id' => $guildId,
)
);
return $row;
}
public static function toSimple($row){
if (! $row){
return array();
}
return array(
'guild_id' => $row['guild_id'],
'guild_name' => $row['guild_name'],
'guild_badge' => $row['guild_badge']
);
}
}