feat: 添加 LocationInfo 模型,包含位置状态常量及表映射 #5

Merged
YingmoY merged 1 commit from feat/location/model into main 2026-03-23 02:38:20 +08:00
YingmoY commented 2026-03-23 02:37:30 +08:00 (Migrated from github.com)
No description provided.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-03-23 02:39:48 +08:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

该 PR 为仓库位置管理新增 LocationInfo 数据模型,用于在数据库中映射“位置”实体,并提供启用/禁用状态常量,便于后续位置相关业务(如库存上架/拣货/盘点)统一使用。

Changes:

  • 新增 LocationInfo GORM 模型(含字段约束、JSON 映射)
  • 新增位置状态常量 LocationStatusDisabled/Enabled
  • 定义 TableName() 映射到 location_info 表名

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview 该 PR 为仓库位置管理新增 `LocationInfo` 数据模型,用于在数据库中映射“位置”实体,并提供启用/禁用状态常量,便于后续位置相关业务(如库存上架/拣货/盘点)统一使用。 **Changes:** - 新增 `LocationInfo` GORM 模型(含字段约束、JSON 映射) - 新增位置状态常量 `LocationStatusDisabled/Enabled` - 定义 `TableName()` 映射到 `location_info` 表名 --- 💡 <a href="/YingmoY/PharmacyERP/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@ -0,0 +21,4 @@
Status int8 `gorm:"column:status;default:1" json:"status"`
}
// TableName overrides GORM pluralized naming.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-03-23 02:39:48 +08:00

这里的 TableName 注释是英文("overrides GORM pluralized naming"),但仓库里类似模型(如 internal/drug/model/drug_info.go)使用中文注释描述 TableName 的用途。建议统一注释语言/风格,避免同一代码库中混用中英文导致可读性不一致。

// TableName 指定 GORM 使用的表名。
这里的 TableName 注释是英文("overrides GORM pluralized naming"),但仓库里类似模型(如 internal/drug/model/drug_info.go)使用中文注释描述 TableName 的用途。建议统一注释语言/风格,避免同一代码库中混用中英文导致可读性不一致。 ```suggestion // TableName 指定 GORM 使用的表名。 ```
Sign in to join this conversation.
No description provided.