Skip to content

Commit

Permalink
fix(cmfx/user): 修正 User.XMLName 的 yaml 表示错误
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Jan 3, 2025
1 parent b7482dc commit 097431e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmfx/user/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ type LogVO struct {
//--------------------------------------- user ---------------------------------------

type User struct {
XMLName struct{} `orm:"-" json:"-" xml:"user" cbor:"-"`
Created time.Time `orm:"name(created)" json:"created" xml:"created,attr" cbor:"created" yaml:"created" comment:"created time"` // 添加时间
XMLName struct{} `orm:"-" json:"-" xml:"user" cbor:"-" yaml:"-"`

State State `orm:"name(state)" json:"state" xml:"state,attr" cbor:"state" yaml:"state" comment:"user state"` // 状态
Last time.Time `orm:"name(last)" json:"last,omitempty" xml:"last,omitempty" cbor:"last,omitempty" yaml:"last,omitempty"`
Created time.Time `orm:"name(created)" json:"created" xml:"created,attr" cbor:"created" yaml:"created" comment:"created time"` // 添加时间
Last time.Time `orm:"name(last)" json:"last,omitempty" xml:"last,omitempty" cbor:"last,omitempty" yaml:"last,omitempty"` // 末次登录时间

// 用户的自增 ID
ID int64 `orm:"name(id);ai" json:"id" xml:"id,attr" cbor:"id" yaml:"id" comment:"user id"`
Expand Down

0 comments on commit 097431e

Please sign in to comment.