package models

import (
	"time"
)

type SubscriptionModel struct {
	CreatedAt               time.Time
	UpdatedAt               time.Time
	Name                    string  `gorm:"unique" json:"name" validate:"required,subscriptionModel,safe_content"`
	Details                 string  `json:"details" validate:"required"`
	Conditions              string  `json:"conditions"`
	RequiredMembershipField string  `json:"required_membership_field" validate:"membershipField"`
	ID                      int64   `gorm:"primaryKey"`
	MonthlyFee              float32 `json:"monthly_fee" validate:"required,number,gte=0"`
	HourlyRate              float32 `json:"hourly_rate" validate:"required,number,gte=0"`
	IncludedPerYear         int16   `json:"included_hours_per_year" validate:"omitempty,number,gte=0"`
	IncludedPerMonth        int16   `json:"included_hours_per_month" validate:"omitempty,number,gte=0"`
}
