You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
767 B

#!/usr/bin/env python
# encoding: utf-8
'''
@author: tx
@file: drawers.py
@time: 2023/5/9 10:06
@desc:
'''
from tortoise import fields, models
class Drawer(models.Model):
id = fields.UUIDField( pk = True)
cabinet = fields.ForeignKeyField('rms.Cabinet', to_field = 'id')
line_no = fields.IntField(description = '接线地址')
label = fields.CharField(max_length = 255,unll=True, description = '抽屉标签')
tags = fields.CharField(max_length = 255, null = True, description = '存储药剂类型')
rank = fields.SmallIntField(null = True)
created_at = fields.DatetimeField(auto_now_add = True)
updated_at = fields.DatetimeField(auto_now = True)
class Meta:
table = 'drawers'
table_description = '抽屉表'