sintonia/api/libretime_api/core/models/preference.py

29 lines
585 B
Python
Raw Normal View History

2020-01-30 14:47:36 +01:00
from django.db import models
class Preference(models.Model):
2022-06-21 14:42:04 +02:00
user = models.ForeignKey(
"core.User",
2022-06-21 14:42:04 +02:00
on_delete=models.CASCADE,
blank=True,
null=True,
db_column="subjid",
2022-06-21 14:42:04 +02:00
)
key = models.CharField(
max_length=255,
unique=True,
blank=True,
null=True,
db_column="keystr",
2022-06-21 14:42:04 +02:00
)
value = models.TextField(
blank=True,
null=True,
db_column="valstr",
2021-05-27 16:23:02 +02:00
)
2020-01-30 14:47:36 +01:00
class Meta:
managed = False
2021-05-27 16:23:02 +02:00
db_table = "cc_pref"
2022-06-21 14:42:04 +02:00
unique_together = (("user", "key"),)