|
73 | 73 | { "field.long": { "name": "id", "extends": "Program.id", |
74 | 74 | "children": [ { "origin.passthrough": { "@from": "Program.id" } } ] } }, |
75 | 75 | { "field.string": { "name": "title", "children": [ { "origin.passthrough": { "@from": "Program.title" } } ] } }, |
76 | | - { "field.enum": { "name": "status", "@values": ["DRAFT", "PUBLISHED", "ARCHIVED"], |
| 76 | + { "field.enum": { "name": "status", "extends": "Program.status", |
77 | 77 | "children": [ { "origin.passthrough": { "@from": "Program.status" } } ] } }, |
78 | 78 | { "identity.primary": { "name": "id", "extends": "Program.id", "@fields": "id" } } |
79 | 79 | ] |
|
115 | 115 | { "field.long": { "name": "id" } }, |
116 | 116 | { "field.string": { "name": "title", "@required": true, "@maxLength": 200 } }, |
117 | 117 | { "relationship.association": { "name": "tags", "@cardinality": "many", "@objectRef": "Tag", "@through": "PostTag" } }, |
| 118 | + { "relationship.association": { "name": "referrals", "@cardinality": "many", "@objectRef": "ReferralAuth", "@through": "PostReferral" } }, |
118 | 119 | { "identity.primary": { "name": "id", "@fields": "id", "@generation": "increment" } } |
119 | 120 | ] |
120 | 121 | }}, |
|
179 | 180 | "children": [ |
180 | 181 | { "source.rdb": { "@table": "auths" } }, |
181 | 182 | { "field.long": { "name": "id" } }, |
182 | | - { "field.enum": { "name": "type", "@values": ["Bridge", "Copay", "PriorAuth"] } }, |
| 183 | + { "field.enum": { "name": "type", "@values": ["Bridge", "Copay", "PriorAuth", "Referral"] } }, |
183 | 184 | { "field.string": { "name": "reference", "@required": true, "@maxLength": 80 } }, |
184 | 185 | { "identity.primary": { "name": "id", "@fields": "id", "@generation": "increment" } } |
185 | 186 | ] |
|
208 | 209 | { "field.string": { "name": "approver", "@maxLength": 80 } } |
209 | 210 | ] |
210 | 211 | }}, |
| 212 | + { "object.entity": { |
| 213 | + "name": "ReferralAuth", |
| 214 | + "extends": "Auth", |
| 215 | + "@discriminatorValue": "Referral", |
| 216 | + "children": [ |
| 217 | + { "field.string": { "name": "urgency", "@required": true, "@default": "routine", "@maxLength": 16 } }, |
| 218 | + { "relationship.association": { "name": "posts", "@cardinality": "many", "@objectRef": "Post", "@through": "PostReferral" } } |
| 219 | + ] |
| 220 | + }}, |
| 221 | + { "object.entity": { |
| 222 | + "name": "PostReferral", |
| 223 | + "children": [ |
| 224 | + { "source.rdb": { "@table": "post_referrals" } }, |
| 225 | + { "field.long": { "name": "postId", "@required": true } }, |
| 226 | + { "field.long": { "name": "referralId", "@required": true } }, |
| 227 | + { "identity.primary": { "name": "id", "@fields": ["postId", "referralId"] } }, |
| 228 | + { "identity.reference": { "name": "fkPost", "@fields": "postId", "@references": "Post" } }, |
| 229 | + { "identity.reference": { "name": "fkReferral", "@fields": "referralId", "@references": "ReferralAuth" } } |
| 230 | + ] |
| 231 | + }}, |
211 | 232 | { "object.value": { |
212 | 233 | "name": "Settings", |
213 | 234 | "children": [ |
|
0 commit comments