1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-28 02:08:22 +01:00
antd-web-apps/blog/models/AnalyticalModel.lua
DanyLE a76942f2f3
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
WIP: make code compatible with new SILK API
2023-04-26 18:51:03 +02:00

16 lines
305 B
Lua

BaseModel:subclass("AnalyticalModel",{
registry = {},
name = "st_similarity",
fields = {
pid = "NUMERIC",
sid = "NUMERIC",
score = "NUMERIC"
}
})
function AnalyticalModel:similarof(id)
return self:find({
where = {pid = id},
order = { "score$desc"}
})
end