31ea370cea
- 修复 JWTConfig 缺少 mapstructure tag 导致 access_expire_min 解析为 0, token 签发即过期,所有 API 请求返回 401 - 全部 config struct 补齐 mapstructure tag(secret/dsn/hmac_secret 等) - 模型层从 hotel/HotelID 统一重命名为 shop/ShopID - 删除旧 migrations(001-004),新增 001_init 综合迁移文件 - 更新 schema.sql、testutil、handler/service/model 相关引用 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
768 B
Go
17 lines
768 B
Go
package model
|
|
|
|
type Partner struct {
|
|
TenantBase
|
|
Code string `gorm:"size:50" json:"code"`
|
|
Name string `gorm:"size:200;not null" json:"name" binding:"required"`
|
|
Type string `gorm:"type:set('supplier','customer');default:'supplier'" json:"type"`
|
|
Contact string `gorm:"size:50" json:"contact"`
|
|
Phone string `gorm:"size:30" json:"phone"`
|
|
Address string `gorm:"size:255" json:"address"`
|
|
BankAccount string `gorm:"size:100" json:"bank_account"`
|
|
CreditLimit float64 `gorm:"type:decimal(12,2)" json:"credit_limit"`
|
|
Balance float64 `gorm:"type:decimal(12,2);default:0" json:"balance"`
|
|
CustomFields JSON `gorm:"type:json" json:"custom_fields,omitempty"`
|
|
Remark string `gorm:"size:500" json:"remark"`
|
|
}
|