mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-27 09:58:20 +01:00
13 lines
293 B
Lua
13 lines
293 B
Lua
BaseModel:subclass("AnalyticalModel",{
|
|
registry = {},
|
|
name = "st_similarity",
|
|
fields = {
|
|
pid = "NUMERIC",
|
|
sid = "NUMERIC",
|
|
score = "NUMERIC"
|
|
}
|
|
})
|
|
|
|
function AnalyticalModel:similarof(id)
|
|
return self:find({ exp = {["="] = {pid = id}}, order = {score = "DESC"}})
|
|
end |