Skip to content

Commit

Permalink
Update content about instantiate model
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Oct 10, 2023
1 parent 2489367 commit 6347d90
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1254,24 +1254,24 @@ type Person struct {
###### Instantiate model
```go
person := Person {
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime{carbon.Now().SubYears(18)},
Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)},
Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)},
Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)},
GraduatedAt1: carbon.Date{carbon.Now()},
GraduatedAt2: carbon.DateMilli{carbon.Now()},
GraduatedAt3: carbon.DateMicro{carbon.Now()},
GraduatedAt4: carbon.DateNano{carbon.Now()},
OperatedAt1: carbon.Time{carbon.Now()},
OperatedAt2: carbon.TimeMilli{carbon.Now()},
OperatedAt3: carbon.TimeMicro{carbon.Now()},
OperatedAt4: carbon.TimeNano{carbon.Now()},
CreatedAt1: carbon.Timestamp{carbon.Now()},
CreatedAt2: carbon.TimestampMilli{carbon.Now()},
CreatedAt3: carbon.TimestampMicro{carbon.Now()},
CreatedAt4: carbon.TimestampNano{carbon.Now()},
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime{carbon.Now().SubYears(18)},
Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)},
Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)},
Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)},
GraduatedAt1: carbon.Date{carbon.Now()},
GraduatedAt2: carbon.DateMilli{carbon.Now()},
GraduatedAt3: carbon.DateMicro{carbon.Now()},
GraduatedAt4: carbon.DateNano{carbon.Now()},
OperatedAt1: carbon.Time{carbon.Now()},
OperatedAt2: carbon.TimeMilli{carbon.Now()},
OperatedAt3: carbon.TimeMicro{carbon.Now()},
OperatedAt4: carbon.TimeNano{carbon.Now()},
CreatedAt1: carbon.Timestamp{carbon.Now()},
CreatedAt2: carbon.TimestampMilli{carbon.Now()},
CreatedAt3: carbon.TimestampMicro{carbon.Now()},
CreatedAt4: carbon.TimestampNano{carbon.Now()},
}
```

Expand Down

0 comments on commit 6347d90

Please sign in to comment.