Update README

This commit is contained in:
Jinzhu 2013-11-06 22:20:26 +08:00
parent c842d46b66
commit 6d7d892af7
1 changed files with 8 additions and 0 deletions

View File

@ -600,6 +600,14 @@ type Cart struct {
func (c Cart) TableName() string {
return "shopping_cart"
}
func (u User) TableName() string {
if u.Role == "admin" {
return "admin_users"
} else {
return "users"
}
}
```
## Run Raw SQl