我将MongoDB用于数据库,将Mongoose用于架构定义。
我收集了一些像这样的酒店:
IFMIS-ear .......................................... FAILURE [ 26.330 s]
IFMIS .............................................. SKIPPED
BUILD FAILURE
------------------------------------------------------------------------
Total time: 01:07 min
Finished at: 2019-04-23T10:57:35+05:30
Final Memory: 49M/660M
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:JBoss-as-maven-
plugin:7.4.Final: deploy (default) on project IFMIS-ear: Deployment failed
and was rolled back. -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :IFMIS-ear
由于酒店价格在一年中是动态的,所以我想将一年中每一天的价格分配给每个住宿类别。
用户仪表板的创建方式可以使管理员可以按周,数月,按季分配价格,也可以采用他/她希望的任何方式
我不知道应该怎么存储它。
建议提供一种容纳结构的好方法,该结构中每个住宿的价格可以为一年356/366天。
答案 0 :(得分:-1)
you need to create a CATEGORY collection, separate CATEGORY collection from main a
hotel collection. You need to read these posts.
https://www.mongodb.com/blog/post/6-rules-of-thumb-for-mongodb-schema-design-part-1
https://www.mongodb.com/blog/post/building-with-patterns-the-polymorphic-pattern