Files
stream.api/internal/database/model/plan_subscriptions.gen.go
2026-03-13 02:17:18 +00:00

37 lines
2.3 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNamePlanSubscription = "plan_subscriptions"
// PlanSubscription mapped from table <plan_subscriptions>
type PlanSubscription struct {
ID string `gorm:"column:id;type:uuid;primaryKey" json:"id"`
UserID string `gorm:"column:user_id;type:uuid;not null;index:idx_plan_subscriptions_user_id,priority:1" json:"user_id"`
PaymentID string `gorm:"column:payment_id;type:uuid;not null;index:idx_plan_subscriptions_payment_id,priority:1" json:"payment_id"`
PlanID string `gorm:"column:plan_id;type:uuid;not null;index:idx_plan_subscriptions_plan_id,priority:1" json:"plan_id"`
TermMonths int32 `gorm:"column:term_months;type:integer;not null" json:"term_months"`
PaymentMethod string `gorm:"column:payment_method;type:character varying(20);not null" json:"payment_method"`
WalletAmount float64 `gorm:"column:wallet_amount;type:numeric(65,30);not null" json:"wallet_amount"`
TopupAmount float64 `gorm:"column:topup_amount;type:numeric(65,30);not null" json:"topup_amount"`
StartedAt time.Time `gorm:"column:started_at;type:timestamp with time zone;not null" json:"started_at"`
ExpiresAt time.Time `gorm:"column:expires_at;type:timestamp with time zone;not null;index:idx_plan_subscriptions_expires_at,priority:1" json:"expires_at"`
Reminder7DSentAt *time.Time `gorm:"column:reminder_7d_sent_at;type:timestamp with time zone" json:"reminder_7d_sent_at"`
Reminder3DSentAt *time.Time `gorm:"column:reminder_3d_sent_at;type:timestamp with time zone" json:"reminder_3d_sent_at"`
Reminder1DSentAt *time.Time `gorm:"column:reminder_1d_sent_at;type:timestamp with time zone" json:"reminder_1d_sent_at"`
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp with time zone" json:"created_at"`
UpdatedAt *time.Time `gorm:"column:updated_at;type:timestamp with time zone" json:"updated_at"`
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
}
// TableName PlanSubscription's table name
func (*PlanSubscription) TableName() string {
return TableNamePlanSubscription
}