diff --git a/api/src/model/MService.hx b/api/src/model/MService.hx new file mode 100644 index 0000000..dccf3dd --- /dev/null +++ b/api/src/model/MService.hx @@ -0,0 +1,8 @@ +package model; + +import tink.sql.Types; + +typedef MService = { + @:autoIncrement @:primary public var id(default, null):Id; + public var name:VarChar<50>; +} \ No newline at end of file diff --git a/api/src/model/MUser.hx b/api/src/model/MUser.hx new file mode 100644 index 0000000..02188d4 --- /dev/null +++ b/api/src/model/MUser.hx @@ -0,0 +1,12 @@ +package model; + +import tink.sql.Types; +import model.MService; + +typedef MUser = { + @:autoIncrement @:primary public var id(default, null):Id; + public var name:VarChar<50>; + public var email:VarChar<50>; + public var password:VarChar<50>; + public var services:Id; +} \ No newline at end of file diff --git a/api/src/model/services/DrivebyCool.hx b/api/src/model/services/DrivebyCool.hx new file mode 100644 index 0000000..2247f36 --- /dev/null +++ b/api/src/model/services/DrivebyCool.hx @@ -0,0 +1,18 @@ +package model.sites.drivebycool; + +import tink.sql.Types; + + +typedef MSubscription = { + @:autoIncrement @:primary public var id(default, null):Id; + public var subscriber:VarChar<50>; + public var project:Id; + public var subscribers:Id; +} + +typedef MProject = { + @:autoIncrement @:primary public var id(default, null):Id; + public var name:VarChar<50>; + public var owner:Id; + public var subscribers:Id; +} \ No newline at end of file diff --git a/api/src/model/services/ProjectTracker.hx b/api/src/model/services/ProjectTracker.hx new file mode 100644 index 0000000..7d4e877 --- /dev/null +++ b/api/src/model/services/ProjectTracker.hx @@ -0,0 +1,14 @@ +package model.services; + +typedef MMembership = { + @:autoIncrement @:primary public var id(default, null):Id; + public var project:Id; + public var user:Id; +} + +typedef MProject = { + @:autoIncrement @:primary public var id(default, null):Id; + public var name:VarChar<50>; + public var owner:Id; + public var members:Id; +} \ No newline at end of file