aboutcode-org / scancode-server

This project is no longer maintained. Visit https://github.com/nexB/scancode.io/ instead for similar and current project
https://github.com/nexB/scancode.io/
19 stars 17 forks source link

Update models.py #8

Closed RajuKoushik closed 7 years ago

RajuKoushik commented 7 years ago

@singh1114 Let's have a discussion and update the models.py. Cheers.

singh1114 commented 7 years ago

@RajuKoushik For the UserInfo class we should be changing total_files_scanned to total_scans_made.

And I don't really remember for what purpose this field was needed? Can you please explain why?

Also, For the class files_scanned_info there doesn't seem to be having any defined primary key. In the class we should expand files_scanned_info attribute a little.

Mainly what I think is that there is no need to add the licence_and_copyrights model separately. They can be accumulated in the files_scanned_info.

RajuKoushik commented 7 years ago

I came up with this. Have a look at this. I just wanted to make it really simple. whatsapp image 2017-06-07 at 4 27 21 pm

RajuKoushik commented 7 years ago

@singh1114 have a look it !

singh1114 commented 7 years ago

@RajuKoushik In the latest commit,https://github.com/nexB/scancode-server/commit/5b2ee1bfbff478dcd720b0797e30838b53fcddae I have added models in the file models2.py. Please check them out and give your review. I haven't added the userInfo model but it can be added easily.

These are not complete models and more will be added if the approach is finalised.

I have used the models not the JSONfield as mentioned in #10. I have kept the requirement of having anonymous scans in mind.

@RajuKoushik I know you have something useful going on in the picture that you have attached but I am unable to get it. An explanation is required.