更新文档

This commit is contained in:
Peleus 2023-10-10 10:14:33 +08:00
parent aba5bd7d69
commit cc78e6abf5

View File

@ -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()},
}
```