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.

25 lines
809 B

#!/usr/bin/env python
# encoding: utf-8
'''
@author: tx
@file: board.py
@time: 2023/5/9 9:48
@desc:
'''
from tortoise import fields, models
class DrawerBoard(models.Model):
id = fields.UUIDField(pk = True)
cabinet = fields.ForeignKeyField('rms.Cabinet', to_field = 'id')
drawer = fields.ForeignKeyField('rms.Drawer', to_field = 'id')
board = fields.ForeignKeyField('rms.Board', to_field = 'id')
line_no = fields.IntField(description = '接线号')
label = fields.CharField(max_length = 255, null = True, description = '标签')
capacity = fields.IntField(default = 0)
created_at = fields.DatetimeField(auto_now_add = True)
updated_at = fields.DatetimeField(auto_now = True)
class Meta:
table = 'drawer_boards'
table_description = '抽屉定位板表'