1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-27 09:58:20 +01:00
antd-web-apps/blog/models/AnalyticalModel.lua
2018-09-05 16:56:04 +02:00

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