summaryrefslogtreecommitdiff
path: root/fixco_custom/models/token_log.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-11-26 10:08:16 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-11-26 10:08:16 +0700
commit25edffb8ebf51e4b133132f4fbd49363b1426664 (patch)
tree903a73bef338d0ddd1bed8577b276b318f37cc56 /fixco_custom/models/token_log.py
parent29d10b8de8422a7c2ced1816d7cc7df41c20b73c (diff)
api altama
Diffstat (limited to 'fixco_custom/models/token_log.py')
-rw-r--r--fixco_custom/models/token_log.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/fixco_custom/models/token_log.py b/fixco_custom/models/token_log.py
new file mode 100644
index 0000000..fdc0c03
--- /dev/null
+++ b/fixco_custom/models/token_log.py
@@ -0,0 +1,17 @@
+from odoo import models, fields, api
+
+class FixcoTokenLog(models.Model):
+ _name = 'token.log'
+ _description = 'Log Token Fixco'
+ _order = 'create_date desc'
+
+ token = fields.Text(string="Access Token", readonly=True)
+ expires_at = fields.Datetime(string="Expires At", readonly=True)
+ created_at = fields.Datetime(string="Created At", default=lambda self: fields.Datetime.now(), readonly=True)
+ created_by = fields.Many2one('res.users', string="Generated By", readonly=True)
+ source = fields.Selection([
+ ('manual', 'Manual Request'),
+ ('auto', 'Auto Refresh'),
+ ], string="Token Source", default='auto', readonly=True)
+ token_from = fields.Char(string="From", readonly=True)
+ is_active = fields.Boolean("Active", default=True) \ No newline at end of file