README.md in ar2gostruct-0.0.5 vs README.md in ar2gostruct-0.1.0
- old
+ new
@@ -27,13 +27,13 @@
# or
ar2gostruct
```
this will returns
```bash
-// app/models/users.rb
+// app/models/user.rb
// Table name: users
-type Users struct {
+type User struct {
Id int32 `json:"id"`
Email string `json:"email"`
EncryptedPassword string `json:"encrypted_password"`
ResetPasswordToken string `json:"reset_password_token"`
ResetPasswordSentAt time.Time `json:"reset_password_sent_at"`
@@ -41,10 +41,14 @@
SignInCount int32 `json:"sign_in_count"`
CurrentSignInAt time.Time `json:"current_sign_in_at"`
LastSignInAt time.Time `json:"last_sign_in_at"`
CurrentSignInIp string `json:"current_sign_in_ip"`
LastSignInIp string `json:"last_sign_in_ip"`
+ ConfirmationToken string `json:"confirmation_token"`
+ ConfirmedAt time.Time `json:"confirmed_at"`
+ ConfirmationSentAt time.Time `json:"confirmation_sent_at"`
+ UnconfirmedEmail string `json:"unconfirmed_email"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
```
@@ -52,14 +56,15 @@
```bash
bundle exec rake ar2gostruct orm=qbs
# or
ar2gostruct -o qbs
+# If you prefer plural struct name, "--plural" option is available.
-// app/models/users.rb
+// app/models/user.rb
// Table name: users
-type Users struct {
+type User struct {
Id int32 `json:"id" qbs:"pk,notnull"`
Email string `json:"email" qbs:"notnull,default:''"`
EncryptedPassword string `json:"encrypted_password" qbs:"notnull,default:''"`
ResetPasswordToken string `json:"reset_password_token"`
ResetPasswordSentAt time.Time `json:"reset_password_sent_at"`
@@ -67,12 +72,17 @@
SignInCount int32 `json:"sign_in_count" qbs:"default:'0'"`
CurrentSignInAt time.Time `json:"current_sign_in_at"`
LastSignInAt time.Time `json:"last_sign_in_at"`
CurrentSignInIp string `json:"current_sign_in_ip"`
LastSignInIp string `json:"last_sign_in_ip"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
+ ConfirmationToken string `json:"confirmation_token"`
+ ConfirmedAt time.Time `json:"confirmed_at"`
+ ConfirmationSentAt time.Time `json:"confirmation_sent_at"`
+ UnconfirmedEmail string `json:"unconfirmed_email"`
+ CreatedAt time.Time `json:"created_at" qbs:"created"`
+ UpdatedAt time.Time `json:"updated_at" qbs:"updated"`
}
+
```
Contributing
---