mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-09 13:35:15 +00:00
feat: Add Balance field to Subscriber model with default value of 0
- Add Balance float64 field to Subscriber struct with JSON and GORM tags - Set default value to 0 in database schema - Align PlanID and Status field formatting
This commit is contained in:
@@ -19,8 +19,9 @@ type Subscriber struct {
|
|||||||
Email string `json:"email" gorm:"uniqueIndex"`
|
Email string `json:"email" gorm:"uniqueIndex"`
|
||||||
OrganizationID string `json:"organization_id"`
|
OrganizationID string `json:"organization_id"`
|
||||||
|
|
||||||
Status SubscriberStatus `json:"status" gorm:"default:'active'"`
|
Status SubscriberStatus `json:"status" gorm:"default:'active'"`
|
||||||
PlanID uint `json:"plan_id"`
|
PlanID uint `json:"plan_id"`
|
||||||
|
Balance float64 `json:"balance" gorm:"default:0"`
|
||||||
|
|
||||||
AuthKey string `json:"auth_key" gorm:"not null"`
|
AuthKey string `json:"auth_key" gorm:"not null"`
|
||||||
OPc string `json:"opc" gorm:"not null"`
|
OPc string `json:"opc" gorm:"not null"`
|
||||||
|
|||||||
Reference in New Issue
Block a user