test

Tables (20)

accounts

  • ac_id — int — NOT NULL
  • ac_name — varchar(50) — NOT NULL
  • ac_manager — varchar(50)
  • ac_loc — varchar(250)
  • ac_phone — varchar(100)
  • ac_email — VARCHAR(100)

attendance

  • attendance_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • att_date — DATETIME — NOT NULL
  • att_status — VARCHAR(50) — NOT NULL
  • clock_out — DATETIME

bom

  • bom_id — BIGINT
  • parent_stock_id — BIGINT — NOT NULL
  • child_stock_id — BIGINT — NOT NULL
  • required_qty — INT — NOT NULL

defect

  • defect_id — BIGINT
  • lot_id — BIGINT — NOT NULL
  • defect_code — INT
  • defect_qty — INT — NOT NULL
  • defect_date — DATE

documents

  • doc_id — BIGINT
  • req_id — BIGINT — NOT NULL
  • req_date — DATETIME
  • title — VARCHAR(200)
  • content — TEXT
  • appr_id — BIGINT
  • appr_date — DATETIME
  • status — VARCHAR(50)
  • comments — VARCHAR(255)

human_resource

  • emp_id — BIGINT
  • emp_name — VARCHAR(50) — NOT NULL
  • supervisor — BIGINT
  • dept_name — VARCHAR(50)
  • position — VARCHAR(30)
  • hire_date — DATE
  • bank_name — VARCHAR(50)
  • bank_account — VARCHAR(50)
  • status — VARCHAR(10)
  • phone_number — VARCHAR(20)

inbound

  • inbound_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • ac_id — BIGINT
  • inbound_date — DATETIME — NOT NULL

inbound_datails

  • id_id — BIGINT
  • inbound_id — BIGINT — NOT NULL
  • stock_id — BIGINT — NOT NULL
  • qty — INT — NOT NULL
  • unit_price — DECIMAL(15,2)

lot

  • lot_id — BIGINT
  • work_order_id — BIGINT — NOT NULL
  • stock_id — BIGINT — NOT NULL
  • lot_qty — INT — NOT NULL
  • lot_date — DATE

outbound

  • outbound_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • ac_id — BIGINT
  • outbound_date — DATETIME — NOT NULL
  • outbound_code — INT

outbound_details

  • od_id — BIGINT
  • outbound_id — BIGINT — NOT NULL
  • stock_id — BIGINT — NOT NULL
  • qty — INT — NOT NULL
  • unit_price — DECIMAL(15,2)

profit

  • profit_id — BIGINT
  • profit_code — INT
  • profit — DECIMAL(15,2) — NOT NULL
  • profit_date — DATETIME — NOT NULL
  • profit_comment — VARCHAR(100) — ARCHAR(100

purchase

  • purchase_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • ac_id — BIGINT — NOT NULL
  • order_date — DATE
  • del_date — DATE
  • total_price — DECIMAL(15,2)
  • status — VARCHAR(20)

purchase_details

  • pd_id — BIGINT
  • purchase_id — BIGINT — NOT NULL
  • stock_id — BIGINT — NOT NULL
  • purchase_qty — INT — NOT NULL
  • qty — INT — NOT NULL
  • price_per_unit — DECIMAL(15,2) — NOT NULL
  • total_price — DECIMAL(15,2)

salary

  • salary_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • pay_date — DATE — NOT NULL
  • pay — DECIMAL(15,2) — NOT NULL
  • deduction — DECIMAL(15,2) — NOT NULL
  • total_pay — DECIMAL(15,2)

sale

  • sale_id — BIGINT
  • emp_id — BIGINT — NOT NULL
  • ac_id — BIGINT — NOT NULL
  • order_date — DATE
  • due_date — DATE
  • total_price — DECIMAL(15,2)
  • status — VARCHAR(20)

sale_details

  • sd_id — BIGINT
  • sale_id — BIGINT — NOT NULL
  • stock_id — BIGINT — NOT NULL
  • qty — INT — NOT NULL
  • price_per_unit — DECIMAL(15,2) — NOT NULL
  • total_price — DECIMAL(15,2)

spend

  • spend_id — BIGINT
  • spend_code — INT
  • spend — DECIMAL(15,2) — NOT NULL
  • spend_date — DATETIME — NOT NULL
  • spend_comment — VARCHAR(100) — ARCHAR(100

stock

  • stock_id — BIGINT
  • stock_name — VARCHAR(100) — NOT NULL
  • qty — INT — NOT NULL
  • unit_price — DECIMAL(15,2) — NOT NULL
  • location — INT
  • type — INT
  • comments — VARCHAR(200)

work_order

  • work_order_id — BIGINT
  • stock_id — BIGINT — NOT NULL
  • emp_id — BIGINT — NOT NULL
  • start_date — DATE
  • due_date — DATE
  • target_qty — INT
  • good_qty — INT
  • defect_qty — INT
  • order_status — VARCHAR(20)
  • request_date — DATETIME — NOT NULL