lift.go 708 B

123456789101112131415161718192021222324252627282930313233
  1. package warehouse
  2. type Lift struct {
  3. ID int `json:"id"`
  4. Address string `json:"address"`
  5. Disabled bool `json:"disabled"`
  6. Auto bool `json:"auto"`
  7. Name string `json:"name"`
  8. SID int `json:"sid"`
  9. Brand string `json:"brand"`
  10. SN string `json:"sn"`
  11. Load int `json:"load"`
  12. Net int `json:"net"`
  13. Addr string `json:"addr"`
  14. Status int `json:"status"`
  15. Floor int `json:"floor"`
  16. }
  17. func (w *Warehouse) IsLiftInFloor(sn string, floor int) bool {
  18. return false
  19. }
  20. func (w *Warehouse) GetLiftByAddr(adds *Addr) *Lift {
  21. return nil
  22. }
  23. func (lf *Lift) IsReady() bool {
  24. return lf.Status == Ready
  25. }
  26. func (lf *Lift) run() {
  27. lf.Status = Running
  28. }