model.py 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # -*- coding: utf-8 -*-
  2. from sqlalchemy import DateTime, Integer, Text, String
  3. from sqlalchemy.orm import Mapped, mapped_column
  4. from app.core.base_model import ModelMixin, UserMixin
  5. class BizMecModel(ModelMixin):
  6. """
  7. 机构信息表
  8. """
  9. __tablename__: str = 'biz_mec'
  10. __table_args__: dict[str, str] = {'comment': '机构信息'}
  11. __loader_options__: list[str] = ["created_by", "updated_by"]
  12. crane_no: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='起重机编号 ')
  13. mec_no: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='机构编号 ')
  14. mec_category: Mapped[str | None] = mapped_column(String(10), nullable=True, comment='机构分类 MecCategory')
  15. mec_type: Mapped[str | None] = mapped_column(String(10), nullable=True, comment='机构类型 MecType')
  16. hoist_weight: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='起升重量 起升机构')
  17. hoist_height: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='起升高度 起升机构')
  18. hoist_speed: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='起升速度 起升机构')
  19. rope_count: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='钢线绳受力根数 起升机构')
  20. rope_max_pull: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='钢丝绳最大拉力 起升机构')
  21. rope_diameter: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='钢丝绳直径 起升机构')
  22. rope_model: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='钢丝绳型号 起升机构')
  23. car_speed: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='速度 平移机构')
  24. wheel_span: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='轮距 平移机构')
  25. track_span: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='轨距 平移机构')
  26. wheel_pressure: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='轮压 平移机构')
  27. track_model: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='轨道型号 平移机构')
  28. track_diameter: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='车轨直径 平移机构')
  29. track_count: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='车轨数量 平移机构')
  30. word_system: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='工作制度 ')
  31. reducer_model: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='减速机型号 ')
  32. reducer_trans_ratio: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='减速机传动比 ')
  33. reducer_total_trans_ratio: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='减速机总传动比 ')
  34. motor_model: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机型号 ')
  35. motor_voltage: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机额定电压 ')
  36. motor_current: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机额定电流 ')
  37. motor_power: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机额定功率 ')
  38. motor_speed: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机转速 ')
  39. motor_count: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='电机数量 ')
  40. bradk_model: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='制动器型号 ')
  41. brake_torque: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='制动器制动力矩 ')
  42. brake_wheel_diameter: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='制动器轮径 ')
  43. brake_count: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='制动器数量 ')
  44. sort: Mapped[int | None] = mapped_column(Integer, nullable=True, comment='排序 ')
  45. hoist_weight_var_code: Mapped[str | None] = mapped_column(String(200), nullable=True, comment='重量关联变量')
  46. stroke_var_code: Mapped[str | None] = mapped_column(String(50), nullable=True, comment='行程高度变量')
  47. is_canvas_show: Mapped[str | None] = mapped_column(String(10), nullable=True, comment='是否首页动画展示')
  48. is_canvas_move: Mapped[str | None] = mapped_column(String(10), nullable=True, comment='是否启用动画')
  49. gear_select_var_codes: Mapped[str | None] = mapped_column(String(255), nullable=True, comment='机构选择变量')
  50. vib_gear_value: Mapped[int | None] = mapped_column(Integer, nullable=True, comment='振动分析挡位')