baby steps

This commit is contained in:
2020-09-20 18:43:57 +02:00
parent 4593c78532
commit 5bb78d1366
7 changed files with 47 additions and 34 deletions
+4 -1
View File
@@ -6,7 +6,10 @@ local Stations = Model:extend("stations", {
-- "station", types.integer
-- "name", types.varchar
timestamp = true
timestamp = true,
relations = {
{"airtimes", has_many = "Airtimes"}
}
})
return Stations
+3 -4
View File
@@ -8,10 +8,9 @@ local Tracks = Model:extend("tracks", {
-- "year", types.integer
timestamp = true,
-- relations = {
-- {"copies", has_many = "Tracks"},
-- {"original", has_one = "Tracks"}
-- }
relations = {
{"airtimes", has_many = "Airtimes"}
}
})
return Tracks
+12
View File
@@ -0,0 +1,12 @@
local Model = require("lapis.db.model").Model
--users
-- name/email/password/last_login
local Users = Model:extend("users", {
-- "email", types.varchar
-- "name", types.varchar
-- "password", types.varchar
-- "last_login", types.time
timestamp = true
})