-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Реалізація можливості мержити контракти #116
Реалізація можливості мержити контракти #116
Conversation
add empty line
period = ModelType(Period) | ||
value = ModelType(Value) | ||
dateSigned = IsoDateTimeType() | ||
documents = ListType(ModelType(Document), default=list()) | ||
items = ListType(ModelType(Item)) | ||
suppliers = ListType(ModelType(Organization), min_size=1, max_size=1) | ||
date = IsoDateTimeType() | ||
additionalAwardIDs = ListType(ModelType(AwardID), default=list()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можливо краще щоб був простий перелік ідентифікаторів авардів а не AwardID модель. Таке можливо чи є якась складність?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наприклад additionalAwardIDs = ListType(StringType, default=list())
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MD5Type було б ще краще
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Змінив StringType на MD5Type
update validation for additionalAwardIDs update tests
|
|
Без таких поправок функціонал об'єдниних контрактів не повний. Контракт не може бути підписаний якщо умови не справджуються не тільки для основного аварда а й для додаткових. |
Додав модель AwardID, її функція зберігати ід смержених авардів, та перевіряти що аварда інсує, та має статус active.
Додав новий статус "merged" для контракта.
Додав поле additionalAwardIDs, в якому повинні зберігатися ід смержених авардів, та поле mergedInto де збереження ід контракта в який було смержено.
Додав валідацію для цих полів.
В utils винесена перевірка check_merged_contracts, яка перевіряє що конракти ще не були смержени, та мержить їх.
Також додано тести для перевірки нової функціональності.
This change is