hotspot / App /Plans /Model.py
Mbonea's picture
testing deployment
9e798a1
raw
history blame
621 Bytes
from tortoise import fields
from tortoise.models import Model
class Plan(Model):
id = fields.UUIDField(pk=True)
name = fields.CharField(
max_length=100, unique=True, description="Name of the subscription plan"
)
amount = fields.DecimalField(
max_digits=10, decimal_places=2, description="Cost of the plan"
)
duration = fields.IntField(description="Duration of the subscription in hours")
download_speed = fields.FloatField(description="Download speed in Mbps")
upload_speed = fields.FloatField(description="Upload speed in Mbps")
class Meta:
table = "plans"