Files
junhong_cmp_fiber/internal/model/personal_customer_iccid.go
huang e049080f6c
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m47s
分裂iccid长度
2026-04-21 10:55:12 +08:00

25 lines
1.1 KiB
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 model
import (
"time"
"gorm.io/gorm"
)
// PersonalCustomerICCID 个人客户ICCID绑定表
// 说明记录微信用户使用过哪些ICCID一个ICCID可以被多个微信用户使用过
type PersonalCustomerICCID struct {
gorm.Model
CustomerID uint `gorm:"column:customer_id;type:bigint;not null;comment:关联个人客户ID" json:"customer_id"`
ICCID string `gorm:"column:iccid;type:varchar(20);not null;comment:ICCID20位数字" json:"iccid"`
BindAt time.Time `gorm:"column:bind_at;type:timestamp;not null;comment:绑定时间" json:"bind_at"`
LastUsedAt *time.Time `gorm:"column:last_used_at;type:timestamp;comment:最后使用时间" json:"last_used_at"`
Status int `gorm:"column:status;type:int;not null;default:1;comment:状态 0=禁用 1=启用" json:"status"`
ICCID19 string `gorm:"column:iccid_19;type:varchar(19);comment:ICCID前19位用于19位运营商精确查询" json:"iccid_19,omitempty"`
}
// TableName 指定表名
func (PersonalCustomerICCID) TableName() string {
return "tb_personal_customer_iccid"
}