My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
controller:
columns:
name: { type: string(255), notnull: true, unique: true }
manufacturer_id: { type: integer, notnull: true }
url: { type: string(255), notnull: false }
relations:
manufacturer:
local: manufacturer_id
foreign: id
foreignAlias: controllers
user:
class: user
local: controller_id
foreign: user_id
refClass: userController

manufacturer:
columns:
name: { type: string(255), notnull: true, unique: true }
url: { type: string(255), notnull: false }
relations:
store:
class: store
local: manufacturer_id
foreign: store_id
refClass: storeManufacturer

entity:
actAs:
Timestampable: ~
Geographical:
latitude:
name: lat
longitude:
name: lng
columns:
type: { type: enum, notnull: true, values: [user, store, event] }
name: { type: string(255), notnull: true }
url: { type: string(255), notnull: false }
logo: { type: string(255), notnull: false }
address: { type: string(255), notnull: true }
description: { type: string(4000), notnull: false }

store:
inheritance:
type: concrete
extends: entity
columns:
entity_id: { type: integer, notnull: true, unique: true }
email: { type: string(255), notnull: false }
relations:
manufacturer:
class: manufacturer
local: store_id
foreign: manufacturer_id
refClass: storeManufacturer

storeManufacturer:
columns:
store_id: { type: integer, notnull: true }
manufacturer_id: { type: integer, notnull: true }
relations:
store:
local: store_id
foreign: id
foreignAlias: manufacturers
manufacturer:
local: manufacturer_id
foreign: id
foreignAlias: stores

event:
inheritance:
type: concrete
extends: entity
columns:
entity_id: { type: integer, notnull: true, unique: true }
type: { type: string(6), notnull: true, default: event }
startdate: { type: timestamp, notnull: true }
enddate: { type: timestamp, notnull: true }

user:
inheritance:
type: concrete
extends: entity
columns:
entity_id: { type: integer, notnull: true, unique: true }
type: { type: string(6), notnull: true, default: user }
email: { type: string(255), notnull: false }
has_firmwarekit: { type: boolean, notnull: false }
relations:
controller:
class: controller
local: user_id
foreign: controller_id
refClass: userController

userController:
columns:
user_id: { type: integer, notnull: true }
controller_id: { type: integer, notnull: true }
relations:
user:
local: user_id
foreign: id
foreignAlias: controllers
controller:
local: controller_id
foreign: id
foreignAlias: users

Change log

r144 by lukas.smith on Dec 27, 2009   Diff
typo fix in controller relations
Go to: 
Project members, sign in to write a code review

Older revisions

r126 by lukas.smith on Dec 24, 2009   Diff
added support for administrating
controller and manufacturer relations
r118 by lukas.smith on Dec 23, 2009   Diff
updated to address/lat/lng
r104 by lukas.smith on Dec 18, 2009   Diff
adjusted what fields are required
All revisions of this file

File info

Size: 2870 bytes, 110 lines
Powered by Google Project Hosting