Вы находитесь на странице: 1из 5

iAgent

Created: 2011-05-20 @ 10:26 MSD. Modified: 2011-06-09 @ 12:55 MSD. Revision: 24

id,
code. 1:, code,
id.

1. agent ()

Not Null

code

char(20)

name

varchar(200)

login

varchar(20)

password char(64)

(SHA-256)

device_id bigint(20)

active

bit(1)

PK

FK device.id
?
0 -
!= 0 -

phone

varchar(200)

comment varchar(200)

2. agent_customer ( )

Not Null

id

bigint(20)

PK

agent_code

char(20)

FK agent.code

customer_code char(20)

FK customer.code

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

3. agent_order ( )

Not
Null

id

bigint(20)

PK

agent_code

char(20)

FK agent.code

1/5

customer_code

char(20)

FK
customer.code

frontend_num

char(20)

backend_num

char(20)

origin_timestamp

datetime

delivery_timestamp datetime

status

int(11)

comment

varchar(200)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

4. company ()

Not
Null

id

bigint(20)

PK

name

varchar(200)

use_base_price

bit(1)


?
0 -
!= 0 -

use_base_unit

bit(1)


?
0 -
!= 0 -

check_warehouse_state bit(1)

?
0 -
!= 0 -

5. customer ()

Not Null

code

char(20)

name

varchar(200)

address

varchar(200)

phone

varchar(200)

PK

maximum_debt decimal(19,2)

current_debt

decimal(19,2)

comment

varchar(200)

2/5

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

6. device ()

Not Null

id

bigint(20)

udid

char(40)

PK


UDID

comment varchar(200)

7. manager ()

Not Null

id

bigint

name

varchar(200)

login

varchar(20)

(SHA-256)

password char(64)

PK

8. order_item ( )

Not
Null

id

bigint(20)

PK

order_id

bigint(20)

FK order.id

product_code

char(20)

FK
product.code

product_name

varchar(200)

product_unit_code

char(20)


FK

product_unit.code

product_unit_name varchar(200)

product_unit_factor int(11)

quantity

int(11)

price

decimal(19,2)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

3/5

quantity * product_unit_factor * price.

9. price ( )

Not Null

id

bigint(20)

PK

agent_code

char(20)

FK agent.code

customer_code char(20)

FK customer.code

product_code

char(20)

FK product.code

price

decimal(19,2)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

10. product ()

Not
Null

code

char(20)

PK

product_group_code char(20)

FK
product_group.code

name

varchar(200)

price

decimal(19,2)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

11. product_group ( )

Not
Null

code

char(20)

PK

FK
product_group.code

parent_group_code char(20)
name

varchar(200)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

4/5

12. product_unit ( )

Not
Null

id

bigint(20)

PK

FK
product.code

product_code char(20)
name

varchar(200)

factor

int(11)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

13. unknown_device_connection (
)

id

bigint(20)

PK

agent_code

char(20)

FK agent.code

udid

char(40)

UDID

last_attempt_timestamp datetime

Not Null

14. warehouse_state ( )

id
agent_code

Not
Null

bigint(20)

PK

char(20)

FK agent.code

product_code char(20)

FK
product.code

quantity

int(11)

deleted

bit(1)

?
0 -
!= 0 -

last_update

datetime

5/5