yumaojun03 6dbefb59ff ```
feat(userapp): 添加用户管理功能模块

- 新增models包,包含User结构体和Base基础结构体
- 实现NewUser构造函数用于创建用户实例
- 添加utils包,提供邮箱和年龄验证工具函数
- 在main.go中集成用户创建和验证逻辑
- 添加包初始化函数init()处理包加载顺序
- 新增README.md文档说明各包功能
```
2026-03-01 11:10:28 +08:00

14 lines
411 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package common
type Base struct {
ID int `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// init 函数会在包被导入时自动调用,可以用来进行一些初始化操作
// 执行顺序: stack 结构, 最后的包 最先被执行, 只有子包的init了才能执行父包的init
func init() {
println("common 包的 init 函数被调用")
}