diff --git a/pages/ar_SA/docs/models.md b/pages/ar_SA/docs/models.md index ce87244d127..a197d10bf54 100644 --- a/pages/ar_SA/docs/models.md +++ b/pages/ar_SA/docs/models.md @@ -120,17 +120,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/az_AZ/docs/models.md b/pages/az_AZ/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/az_AZ/docs/models.md +++ b/pages/az_AZ/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/de_DE/docs/models.md b/pages/de_DE/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/de_DE/docs/models.md +++ b/pages/de_DE/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/es_ES/docs/models.md b/pages/es_ES/docs/models.md index 11105c4c606..ceca500cb89 100644 --- a/pages/es_ES/docs/models.md +++ b/pages/es_ES/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/fa_IR/docs/models.md b/pages/fa_IR/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/fa_IR/docs/models.md +++ b/pages/fa_IR/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/fr_FR/docs/models.md b/pages/fr_FR/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/fr_FR/docs/models.md +++ b/pages/fr_FR/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/hi_IN/docs/models.md b/pages/hi_IN/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/hi_IN/docs/models.md +++ b/pages/hi_IN/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/id_ID/docs/models.md b/pages/id_ID/docs/models.md index 45d07f303d5..729a10fdc3d 100644 --- a/pages/id_ID/docs/models.md +++ b/pages/id_ID/docs/models.md @@ -116,17 +116,22 @@ type User struct { Untuk *field* anonim, GORM akan memasukkan *field*-nya ke dalam struct induknya, misalnya: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/it_IT/docs/models.md b/pages/it_IT/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/it_IT/docs/models.md +++ b/pages/it_IT/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/ja_JP/docs/models.md b/pages/ja_JP/docs/models.md index 6bfd9276791..0700a378bab 100644 --- a/pages/ja_JP/docs/models.md +++ b/pages/ja_JP/docs/models.md @@ -116,17 +116,22 @@ type User struct { 匿名(anonymous field)フィールドでモデルの定義がなされている場合、埋め込まれた構造体のフィールドは親の構造体のフィールドとして含まれることになります。例: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/ko_KR/docs/models.md b/pages/ko_KR/docs/models.md index 9dcc6a5740a..9d06d55eebb 100644 --- a/pages/ko_KR/docs/models.md +++ b/pages/ko_KR/docs/models.md @@ -114,17 +114,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/pl_PL/docs/models.md b/pages/pl_PL/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/pl_PL/docs/models.md +++ b/pages/pl_PL/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/pt_BR/docs/models.md b/pages/pt_BR/docs/models.md index fe0457cf24d..f06a8d4bd84 100644 --- a/pages/pt_BR/docs/models.md +++ b/pages/pt_BR/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/ru_RU/docs/models.md b/pages/ru_RU/docs/models.md index 140432a564c..12bd269516c 100644 --- a/pages/ru_RU/docs/models.md +++ b/pages/ru_RU/docs/models.md @@ -116,17 +116,22 @@ type User struct { Для анонимных полей GORM будет включать свои поля в свою же родительскую структуру, например: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string } -// эквивалентно -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string + +type Blog struct { + Author + ID int + Upvotes int32 +} +// equals +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/tr_TR/docs/models.md b/pages/tr_TR/docs/models.md index 9fd3fa0de93..83e37d406a0 100644 --- a/pages/tr_TR/docs/models.md +++ b/pages/tr_TR/docs/models.md @@ -116,17 +116,22 @@ type User struct { For anonymous fields, GORM will include its fields into its parent struct, for example: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string +} + +type Blog struct { + Author + ID int + Upvotes int32 } // equals -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ``` diff --git a/pages/zh_CN/docs/models.md b/pages/zh_CN/docs/models.md index ed346a11ade..e1a1f595728 100644 --- a/pages/zh_CN/docs/models.md +++ b/pages/zh_CN/docs/models.md @@ -116,17 +116,22 @@ type User struct { 对于匿名字段,GORM 会将其字段包含在父结构体中,例如: ```go -type User struct { - gorm.Model - Name string +type Author struct { + Name string + Email string } -// 等效于 -type User struct { - ID uint `gorm:"primaryKey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` - Name string + +type Blog struct { + Author + ID int + Upvotes int32 +} +// equals +type Blog struct { + ID int64 + Name string + Email string + Upvotes int32 } ```