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.
23 lines
728 B
23 lines
728 B
# -*- coding: utf-8 -*-
|
|
# @Time : 2023/10/7 14:09
|
|
# @Author : tx
|
|
# @File : stock.py
|
|
# @Description : 库存盘点
|
|
|
|
from tortoise import fields, models
|
|
|
|
|
|
class StockRecord(models.Model):
|
|
id = fields.UUIDField(pk=True)
|
|
name = fields.CharField(max_length=100, description='盘点名称')
|
|
content = fields.JSONField(null=True, description='盘点详情')
|
|
cabinet = fields.ForeignKeyField('rms.Cabinet', null=True, description='所属柜体')
|
|
user = fields.ForeignKeyField('rms.User', to_field='id')
|
|
|
|
created_at = fields.DatetimeField(auto_now_add=True)
|
|
updated_at = fields.DatetimeField(auto_now=True)
|
|
|
|
class Meta:
|
|
table = 'stock_records'
|
|
table_description = '库存盘点表'
|