mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 10:18:21 +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 |