from django.db import models class ServerlessBranchCluster(models.Model): class InUseChoices(models.TextChoices): N = "N" Y = "Y" branch_cluster_id = models.CharField(max_length=50, primary_key=True) main_cluster_id = models.CharField(max_length=50) cloud_provider = models.CharField(max_length=20, default="aws") region_name = models.CharField(max_length=50) cluster_name = models.CharField(max_length=100) cluster_host = models.CharField(max_length=200) cluster_port = models.CharField(max_length=30) admin_name = models.CharField(max_length=50) admin_password = models.CharField(max_length=50) in_use = models.CharField(max_length=1, choices=InUseChoices.choices) check_out_time = models.DateTimeField(blank=True, null=True) create_time = models.DateTimeField(blank=True, null=True) trainer_tag = models.CharField(max_length=100, blank=True, null=True) class Meta: unique_together = ("cluster_name", "main_cluster_id", "branch_cluster_id") db_table = "serverless_branch_clusters" managed = False