Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
type ChatMessage struct {
ID uint `gorm:"primaryKey" json:"id"`
UserID uint `gorm:"not null" json:"user_id"`
Content string `gorm:"type:text;not null" json:"content"`
Role string `gorm:"size:20;not null" json:"role"`
CreatedAt time.Time `json:"created_at"`
}
ChatMessage 聊天消息模型
type User ¶
type User struct {
ID uint `gorm:"primaryKey" json:"id"`
Username string `gorm:"size:50;not null;unique" json:"username"`
Password string `gorm:"size:100;not null" json:"-"`
Email string `gorm:"size:100;unique" json:"email"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
User 用户模型
Click to show internal directories.
Click to hide internal directories.