Guest User

Untitled

a guest
May 13th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 12.06 KB | None | 0 0
  1. options:
  2.   type: INNODB
  3.   collate: utf8_czech_ci
  4.   charset: utf8
  5. Article:
  6.   tableName: article
  7.   actAs: [Timestampable]
  8.   columns:
  9.     id_category: int(20)
  10.     id_author:
  11.       type: int(20)
  12.       notnull: true
  13.     id_game: int(20)
  14.     title:
  15.       type: string(250)
  16.       notnull: true
  17.     text: string(99999)
  18.     published:
  19.       type: boolean
  20.       default: true
  21.   relations:
  22.     Author:
  23.       type: one
  24.       class: User
  25.       local: id_author
  26.       foreign: id
  27.       foreignType: many
  28.       foreignKeyName: Article_Author
  29.       foreignAlias: Articles
  30.       onDelete: RESTRICT
  31.       onUpdate: CASCADE
  32.     Game:
  33.       type: one
  34.       class: Game
  35.       local: id_game
  36.       foreign: id
  37.       foreignType: many
  38.       foreignKeyName: Article_Game
  39.       foreignAlias: Articles
  40.       onDelete: RESTRICT
  41.       onUpdate: CASCADE
  42.     Category:
  43.       type: one
  44.       class: Category
  45.       local: id_category
  46.       foreign: id
  47.       foreignType: many
  48.       foreignKeyName: Article_Category
  49.       foreignAlias: Articles
  50.       onDelete: RESTRICT
  51.       onUpdate: CASCADE
  52.  
  53. Comment:
  54.   tableName: comment
  55.   actAs:
  56.     Timestampable:
  57.       created:
  58.         name: created_at
  59.         type: timestamp
  60.       updated:
  61.         disabled: true
  62.   columns:
  63.     id_article: int(20)
  64.     id_author: int(20)
  65.     text: string(99999)
  66.     status:
  67.       type: boolean
  68.       default: true
  69.   relations:
  70.     Author:
  71.       type: one
  72.       class: User
  73.       local: id_author
  74.       foreign: id
  75.       foreignType: many
  76.       foreignKeyName: Comment_Author
  77.       foreignAlias: Comments
  78.       onDelete: CASCADE
  79.       onUpdate: CASCADE
  80.     Article:
  81.       type: one
  82.       class: Article
  83.       local: id_article
  84.       foreign: id
  85.       foreignType: many
  86.       foreignKeyName: Comment_Article
  87.       foreignAlias: Comments
  88.       onDelete: CASCADE
  89.       onUpdate: CASCADE
  90.      
  91. Category:
  92.   tableName: category
  93.   columns:
  94.     title:
  95.       type: string(250)
  96.       notnull: true
  97.     description:
  98.       type: string(99999)
  99.       notnull: true
  100.      
  101. User:
  102.   tableName: user
  103.   actAs:
  104.     Timestampable:
  105.       created:
  106.         name: created_at
  107.         type: timestamp
  108.       updated:
  109.         disabled: true
  110.   columns:
  111.     id_role: int(20)
  112.     username:
  113.       type: string(100)
  114.       notnull: true
  115.     firstname:
  116.       type: string(100)
  117.       notnull: true
  118.     lastname:
  119.       type: string(100)
  120.       notnull: true
  121.     email:
  122.       type: string(100)
  123.       notnull: true
  124.     password:
  125.       type: string(40)
  126.       notnull: true
  127.     avatar: string(200)
  128.     activated:
  129.       type: boolean
  130.       default: false
  131.     url:
  132.       type: string(100)
  133.   relations:
  134.       Role:
  135.         type: one
  136.         class: Role
  137.         local: id_role
  138.         foreign: id
  139.         foreignType: many
  140.         foreignKeyName: User_Role
  141.         foreignAlias: Users
  142.         onDelete: RESTRICT
  143.         onUpdate: CASCADE
  144.       Games:  
  145.         class: Game
  146.         local: id_user
  147.         foreign: id_game
  148.         foreignKeyName: User_Game
  149.         foreignAlias: Users
  150.         refClass: Game_User
  151.       FriendsRequestFromMe:
  152.         class: User
  153.         local: id_sender
  154.         foreign: id_receiver
  155.         foreignKeyName: User_Friend_Request
  156.         foreignAlias: FriendsRequestToMe
  157.         refClass: Friend_User_Request
  158.        
  159. Clan_Request:
  160.   tableName: clan_request
  161.   actAs:
  162.     Timestampable:
  163.       created:
  164.         name: created_at
  165.         type: timestamp
  166.       updated:
  167.         disabled: true
  168.   columns:
  169.     id_sender: int(20)
  170.     id_clan: int(20)
  171.     accepted:
  172.       type: boolean
  173.       default: null
  174.   relations:
  175.     Clan:
  176.       type: one
  177.       class: Clan
  178.       local: id_clan
  179.       foreign: id
  180.       foreignType: many
  181.       foreignKeyName: Clan_Request_Clan
  182.       foreignAlias: Clan_Requests
  183.       onDelete: CASCADE
  184.       onUpdate: CASCADE
  185.     User:
  186.       type: one
  187.       class: User
  188.       local: id_sender
  189.       foreign: id
  190.       foreignType: one
  191.       foreignKeyName: Clan_Request_User
  192.       foreignAlias: Clan_Requests
  193.       onDelete: CASCADE
  194.       onUpdate: CASCADE
  195.   indexes:
  196.     clan:
  197.       fields: [id_sender, id_clan]
  198.       type: unique
  199.        
  200. Friend_User_Request:
  201.   tableName: friend_user_request
  202.   actAs: [Timestampable]
  203.   columns:
  204.     id_sender: int(20)
  205.     id_receiver: int(20)
  206.     accepted:
  207.       type: boolean
  208.       default: null
  209.   relations:
  210.     Sender:
  211.       class: User
  212.       local: id_sender
  213.       foreign: id
  214.       foreignAlias: FriendUserSenderRequests
  215.       foreignKeyName: FriendUserRequests_Sender
  216.       onDelete: CASCADE
  217.       onUpdate: CASCADE
  218.     Receiver:
  219.       class: User
  220.       local: id_receiver
  221.       foreign: id
  222.       foreignAlias: FriendUserReceiverRequests
  223.       foreignKeyName: FriendUserRequests_Receiver
  224.       onDelete: CASCADE
  225.       onUpdate: CASCADE
  226.   indexes:
  227.     friend:
  228.       fields: [id_sender, id_receiver]
  229.       type: unique
  230.    
  231. Game_User:
  232.   tableName: game_user
  233.   columns:
  234.     id_game: int(20)
  235.     id_user: int(20)
  236.   relations:
  237.     Game:
  238.       local: id_game
  239.       foreign: id
  240.       foreignAlias: GameUsers
  241.       foreignKeyName: GameUsers_Game
  242.       onDelete: RESTRICT
  243.       onUpdate: CASCADE
  244.     User:
  245.       local: id_user
  246.       foreign: id
  247.       foreignAlias: GameUsers
  248.       foreignKeyName: GameUsers_User
  249.       onDelete: CASCADE
  250.       onUpdate: CASCADE
  251.  
  252. Role:
  253.   tableName: role
  254.   columns:
  255.     name: string(200)
  256.  
  257. Clan:
  258.   tableName: clan
  259.   actAs:
  260.     Timestampable:
  261.       created:
  262.         name: created_at
  263.         type: timestamp
  264.       updated:
  265.         disabled: true
  266.   columns:
  267.     id_leader:
  268.       type: int(20)
  269.       notnull: true    
  270.     name:
  271.       type: string(100)
  272.       notnull: true
  273.     description: string()
  274.     logo: string(200)
  275.     tag:
  276.       type: string(10)
  277.       notnull: true
  278.   relations:
  279.     Leader:
  280.       type: one
  281.       class: User
  282.       local: id_leader
  283.       foreign: id
  284.       foreignType: one
  285.       foreignKeyName: Clan_Leader
  286.       foreignAlias: Clan
  287.       onDelete: RESTRICT
  288.       onUpdate: CASCADE
  289.     Tournaments:  
  290.       local: id_clan
  291.       foreign: id_tournament
  292.       foreignKeyName: Clan_Tournament
  293.       foreignAlias: Clans
  294.       refClass: Tournament_Clan
  295.     Games:  
  296.       local: id_clan
  297.       foreign: id_game
  298.       foreignKeyName: Clan_Game
  299.       foreignAlias: Clans
  300.       refClass: Game_Clan          
  301.      
  302. Tournament_Clan:
  303.   tableName: tournament_clan
  304.   columns:
  305.     id_tournament: int(20)
  306.     id_clan: int(20)
  307.   relations:
  308.     Tournament:
  309.       local: id_tournament
  310.       foreign: id
  311.       foreignAlias: TournamentClans
  312.       foreignKeyName: TournamentClans_Tournament
  313.       onDelete: RESTRICT
  314.       onUpdate: CASCADE
  315.     Clan:
  316.       local: id_clan
  317.       foreign: id
  318.       foreignAlias: TournamentClans
  319.       foreignKeyName: TournamentClans_Clan
  320.       onDelete: RESTRICT
  321.       onUpdate: CASCADE
  322.    
  323. Game_Clan:
  324.   tableName: game_clan
  325.   columns:
  326.     id_game: int(20)
  327.     id_clan: int(20)
  328.   relations:
  329.     Game:
  330.       local: id_game
  331.       foreign: id
  332.       foreignAlias: GameClans
  333.       foreignKeyName: GameClans_Game
  334.       onDelete: RESTRICT
  335.       onUpdate: CASCADE
  336.     Clan:
  337.       local: id_clan
  338.       foreign: id
  339.       foreignAlias: GameClans
  340.       foreignKeyName: GameClans_Clan
  341.       onDelete: RESTRICT
  342.       onUpdate: CASCADE
  343.  
  344. Game:
  345.   tableName: game
  346.   columns:
  347.     name:
  348.       type: string(200)
  349.       notnull: true
  350.     description:
  351.       type: string()
  352.  
  353. Message:
  354.   tableName: message
  355.   actAs:
  356.     Timestampable:
  357.       created:
  358.         name: created_at
  359.         type: timestamp
  360.       updated:
  361.         disabled: true
  362.     SoftDelete:
  363.   columns:
  364.     id_sender:
  365.       type: int(20)
  366.       notnull: true
  367.     id_receiver:
  368.       type: int(20)
  369.       notnull: true
  370.     title:
  371.       type: string(200)
  372.       notnull: true
  373.     text:
  374.       type: string()
  375.       notnull: true
  376.   relations:
  377.     Sender:
  378.       type: one
  379.       class: User
  380.       local: id_sender
  381.       foreign: id
  382.       foreignType: many
  383.       foreignKeyName: Message_Sender
  384.       foreignAlias: Messages
  385.       onDelete: CASCADE
  386.       onUpdate: CASCADE
  387.     Receiver:
  388.       type: one
  389.       class: User
  390.       local: id_receiver
  391.       foreign: id
  392.       foreignType: many
  393.       foreignKeyName: Message_Receiver
  394.       foreignAlias: Messages
  395.       onDelete: CASCADE
  396.       onUpdate: CASCADE
  397.     indexes:
  398.       deleted_at:
  399.         fields: [deleted_at]
  400.  
  401. Tournament:
  402.   tableName: tournament
  403.   actAs: [Timestampable]
  404.   columns:
  405.     id_author: int(20)
  406.     id_tournament_type:
  407.       type: int(20)
  408.       notnull: true
  409.     id_game:
  410.       type: int(20)
  411.       notnull: true
  412.     title:
  413.       type: string(200)
  414.       notnull: true
  415.     description:
  416.       type: text
  417.       notnull: true
  418.     finished:
  419.       type: boolean
  420.       default: false
  421.     opened:
  422.       type: boolean
  423.       default: true
  424.   relations:
  425.     Author:
  426.       type: one
  427.       class: User
  428.       local: id_author
  429.       foreign: id
  430.       foreignType: many
  431.       foreignKeyName: Tournament_Author
  432.       foreignAlias: Tournaments
  433.       onDelete: SET NULL
  434.       onUpdate: CASCADE
  435.     Tournament_Type:
  436.       type: one
  437.       class: Tournament_Type
  438.       local: id_tournament_type
  439.       foreign: id
  440.       foreignType: many
  441.       foreignKeyName: Tournament_Tournament_Type
  442.       foreignAlias: Tournaments
  443.       onDelete: RESTRICT
  444.       onUpdate: CASCADE
  445.     Game:
  446.       type: one
  447.       class: Game
  448.       local: id_game
  449.       foreign: id
  450.       foreignType: many
  451.       foreignKeyName: Tournament_Game
  452.       foreignAlias: Tournaments
  453.       onDelete: RESTRICT
  454.       onUpdate: CASCADE
  455.      
  456. Tournament_Type:
  457.   tableName: tournament_type
  458.   columns:
  459.     name:
  460.       type: string(200)
  461.       notnull: true
  462.     description:
  463.       type: string()
  464.       notnull: true
  465.  
  466. Group:
  467.   tableName: tournament_groups
  468.   columns:
  469.     id_tournament:
  470.       type: int(20)
  471.       notnull: true
  472.     name:
  473.       type: string(20)
  474.       notnull: true
  475.   relations:
  476.     Tournament:
  477.       type: one
  478.       class: Tournament
  479.       local: id_tournament
  480.       foreign: id
  481.       foreignType: many
  482.       foreignKeyName: Group_Tournament
  483.       foreignAlias: Groups
  484.       onDelete: RESTRICT
  485.       onUpdate: CASCADE
  486.     Clans:  
  487.       local: id_group
  488.       foreign: id_clan
  489.       foreignKeyName: Group_Clan
  490.       foreignAlias: Groups
  491.       refClass: Clan_Group
  492.      
  493. Clan_Group:
  494.   tableName: clan_group
  495.   columns:
  496.     id_clan: int(20)
  497.     id_group: int(20)
  498.   relations:
  499.     Clan:
  500.       class: Clan
  501.       local: id_clan
  502.       foreign: id
  503.       foreignAlias: ClanGroups
  504.       foreignKeyName: ClanGroups_Clan
  505.       onDelete: CASCADE
  506.       onUpdate: CASCADE
  507.     Group:
  508.       class: Group
  509.       local: id_group
  510.       foreign: id
  511.       foreignAlias: ClanGroups
  512.       foreignKeyName: ClanGroups_Group
  513.       onDelete: CASCADE
  514.       onUpdate: CASCADE
  515.      
  516. Match:
  517.   tableName: tournament_match
  518.   columns:
  519.     id_group: int(20)
  520.     id_clan_home:
  521.       type: int(20)
  522.       notnull: true
  523.     id_clan_away:
  524.       type: int(20)
  525.       notnull: true
  526.     gamedate:
  527.       type: date
  528.       notnull: true
  529.     resultHome:
  530.       type: int(20)
  531.       notnull: true
  532.     resultAway:
  533.       type: int(20)
  534.       notnull: true
  535.     scoreHome:
  536.       type: int(20)
  537.       notnull: true
  538.     scoreAway:  
  539.       type: int(20)
  540.       notnull: true  
  541.   relations:
  542.     Groups:
  543.       type: one
  544.       class: Group
  545.       local: id_group
  546.       foreign: id
  547.       foreignType: many
  548.       foreignKeyName: Match_Groups
  549.       foreignAlias: Matches
  550.       onDelete: RESTRICT
  551.       onUpdate: CASCADE
  552.     ClanHome:
  553.       type: one
  554.       class: Clan
  555.       local: id_clan_home
  556.       foreign: id
  557.       foreignType: many
  558.       foreignKeyName: Match_HomeClans
  559.       foreignAlias: Matches
  560.       onDelete: CASCADE
  561.       onUpdate: CASCADE
  562.     ClanAway:
  563.       type: one
  564.       class: Clan
  565.       local: id_clan_away
  566.       foreign: id
  567.       foreignType: many
  568.       foreignKeyName: Match_AwayClans
  569.       foreignAlias: Matches
  570.       onDelete: CASCADE
  571.       onUpdate: CASCADE
Add Comment
Please, Sign In to add comment