Skip to content

Commit

Permalink
feat(core): 🔧 model registry file to json file
Browse files Browse the repository at this point in the history
Converting model registry file to json file in profile module

Ref: #47
  • Loading branch information
jyoti1610 committed May 18, 2024
1 parent 8b8eb33 commit 58616a7
Show file tree
Hide file tree
Showing 5 changed files with 510 additions and 0 deletions.
69 changes: 69 additions & 0 deletions service/models/models_json/AddressTypes.model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"table": "AddressTypes",
"database": "application",
"attributes": {
"_status": {
"type": "STRING"
},
"deletedAt": {
"allowNull": true,
"type": "DATE"
},
"id": {
"autoIncrement": true,
"primaryKey": true,
"type": "INTEGER"
},
"isActive": {
"defaultValue": true,
"type": "BOOLEAN"
},
"type": {
"defaultValue": "",
"type": "STRING"
}
},
"associations": [
{
"data": [
{
"data": {
"as": "Owner",
"sourceKey": "id",
"foreignKey": "createdBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Updater",
"sourceKey": "id",
"foreignKey": "updatedBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Destroyer",
"sourceKey": "id",
"foreignKey": "deletedBy"
},
"type": "belongsTo"
}
],
"model": "Users"
},
{
"model": "PersonAddresses",
"data": [
{
"type": "hasMany",
"data": {
"foreignKey": "addressTypeId",
"sourceKey": "id"
}
}
]
}
]
}
138 changes: 138 additions & 0 deletions service/models/models_json/PersonAddresses.model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"table": "PersonAddresses",
"database": "application",
"attributes": {
"_status": {
"type": "STRING"
},
"addLine1": {
"defaultValue": "",
"type": "STRING"
},
"addLine2": {
"defaultValue": "",
"type": "STRING"
},
"city": {
"defaultValue": "",
"type": "STRING"
},
"country": {
"defaultValue": "",
"type": "STRING"
},
"deletedAt": {
"allowNull": true,
"type": "DATE"
},
"district": {
"defaultValue": "",
"type": "STRING"
},
"fullName": {
"defaultValue": "",
"type": "STRING"
},
"id": {
"autoIncrement": true,
"primaryKey": true,
"type": "INTEGER"
},
"isActive": {
" defaultValue": true,
" type": "BOOLEAN"
},
"isDefault": {
" defaultValue": true,
" type": "BOOLEAN"
},
"landmark": {
" defaultValue": "",
" type": "STRING"
},
"phone": {
" defaultValue": "",
" type": "STRING"
},
"pin": {
" defaultValue": "",
" type": "STRING"
},
"state": {
" defaultValue": "",
" type": "STRING"
},
"status": {
" defaultValue": "",
" type": "STRING"
}
},
"associations": [
{
"data": [
{
"data": {
"as": "Owner",
"sourceKey": "id",
"foreignKey": "createdBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Updater",
"sourceKey": "id",
"foreignKey": "updatedBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Destroyer",
"sourceKey": "id",
"foreignKey": "deletedBy"
},
"type": "belongsTo"
}
],
"model": "Users"
},
{
"model": "Persons",
"data": [
{
"type": "belongsTo",
"data": {
"as": "Person",
"foreignKey": "personId",
"sourceKey": "id"
}
}
]
},
{
"model": "AddressTypes",
"data": [
{
"type": "belongsTo",
"data": {
"foreignKey": "addressTypeId",
"sourceKey": "id"
}
}
]
},
{
"model": "Clinics",
"data": [
{
"type": "hasOne",
"data": {
"foreignKey": "personAddressId",
"sourceKey": "id"
}
}
]
}
]
}
77 changes: 77 additions & 0 deletions service/models/models_json/PersonDocs.model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"table": "PersonDocs",
"database": "application",
"attributes": {
"_status": {
"": "STRING"
},
"deletedAt": {
"allowNull": true,
"type": "TIMESTAMP"
},
"description": {
"defaultValue": "",
"type": "STRING"
},
"docUrl": {
"defaultValue": "",
"type": "STRING"
},
"id": {
"autoIncrement": true,
"primaryKey": true,
"type": "INTEGER"
},
"isActive": {
"defaultValue": true,
"type": "BOOLEAN"
},
"type": {
"defaultValue": "",
"type": "STRING"
}
},
"associations": [
{
"data": [
{
"data": {
"as": "Owner",
"sourceKey": "id",
"foreignKey": "createdBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Updater",
"sourceKey": "id",
"foreignKey": "updatedBy"
},
"type": "belongsTo"
},
{
"data": {
"as": "Destroyer",
"sourceKey": "id",
"foreignKey": "deletedBy"
},
"type": "belongsTo"
}
],
"model": "Users"
},
{
"model": "Persons",
"data": [
{
"type": "belongsTo",
"data": {
"foreignKey": "personId",
"sourceKey": "id"
}
}
]
}
]
}
Loading

0 comments on commit 58616a7

Please sign in to comment.