mail/models/discuss/discuss_gif_favorite.py
Данил Воробьев 6e6f15d803 initial commit
2024-05-03 09:40:35 +00:00

19 lines
493 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class GifFavorite(models.Model):
_name = "discuss.gif.favorite"
_description = "Save favorite GIF from Tenor API"
tenor_gif_id = fields.Char("GIF id from Tenor", required=True)
_sql_constraints = [
(
"user_gif_favorite",
"unique(create_uid,tenor_gif_id)",
"User should not have duplicated favorite GIF",
),
]