全部博文(89)
分类:
2008-10-23 09:39:52
class Post extends AppModel {
var $name = 'Post';
}
?>
class Comment extends AppModel {
var $name = 'Comment';
}
?>
class User extends AppModel {
var $name = 'User';
}
?>
class Tag extends AppModel {
var $name = 'Tag';
}
?>
[hantsy@localhost app]$ ../cake/console/cake bake
Welcome to CakePHP v1.2.0.7692 RC3 Console
---------------------------------------------------------------
App : app
Path: /home/hantsy/public_html/cakeblog/app
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
>
[hantsy@localhost app]$ ../cake/console/cake bake model
Welcome to CakePHP v1.2.0.7692 RC3 Console
---------------------------------------------------------------
App : app
Path: /home/hantsy/public_html/cakeblog/app
---------------------------------------------------------------
---------------------------------------------------------------
Bake Model
Path: /home/hantsy/public_html/cakeblog/app/models/
---------------------------------------------------------------
Use Database Config: (default/test)
[default] >
Possible Models based on your current database:
1. Comment
2. Post
3. PostsTag
4. Profile
5. Tag
6. User
Enter a number from the list above, type in the name of another model, or 'q' to exit
[q] >
[hantsy@localhost app]$ ../cake/console/cake bake model Post
Welcome to CakePHP v1.2.0.7692 RC3 Console
---------------------------------------------------------------
App : app
Path: /home/hantsy/public_html/cakeblog/app
---------------------------------------------------------------
Baking model class for Post...
Creating file /home/hantsy/public_html/cakeblog/app/models/post.php