forked from tower-archive/tower
-
Notifications
You must be signed in to change notification settings - Fork 0
model generator
Lance Pollard edited this page Apr 12, 2012
·
1 revision
tower generate model Post title:string body:text belongsTo:user
Generates:
|-- app
| |-- models
| | | `-- post.coffee
The Post model generated:
class App.Post extends Tower.Model
@field "id", type: "Id"
@field "title"
@field "body"
@belongs_to "user", type: "User", foreignKey: "userId"
@field "createdAt", type: "Time", default: -> new Date()