feat(templates): create schemas for tags, companies, contacts, deals, activities
This commit is contained in:
parent
6eb9cb1ac1
commit
238854e778
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "pocketbase-lite",
|
||||
"version": "0.1.0",
|
||||
"paths": {
|
||||
"data": "collections/",
|
||||
"media": "media/",
|
||||
"indexes": ".gitapp/indexes/"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"id": "tags",
|
||||
"file": "schemas/tags.json",
|
||||
"glob": "collections/tags/*.json"
|
||||
},
|
||||
{
|
||||
"id": "companies",
|
||||
"file": "schemas/companies.json",
|
||||
"glob": "collections/companies/*.json"
|
||||
},
|
||||
{
|
||||
"id": "contacts",
|
||||
"file": "schemas/contacts.json",
|
||||
"glob": "collections/contacts/*.json"
|
||||
},
|
||||
{
|
||||
"id": "deals",
|
||||
"file": "schemas/deals.json",
|
||||
"glob": "collections/deals/*.json"
|
||||
},
|
||||
{
|
||||
"id": "activities",
|
||||
"file": "schemas/activities.json",
|
||||
"glob": "collections/activities/*.json"
|
||||
}
|
||||
],
|
||||
"operations": [],
|
||||
"policies": {
|
||||
"roles": [
|
||||
"viewer",
|
||||
"editor"
|
||||
],
|
||||
"acl": null
|
||||
},
|
||||
"lfs": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"$id": "activities",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type",
|
||||
"subject",
|
||||
"date"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"call",
|
||||
"email",
|
||||
"meeting",
|
||||
"note",
|
||||
"task"
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"completed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"contact": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "contacts",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"deal": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "deals",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"$id": "companies",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"industry"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"industry": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"1-10",
|
||||
"11-50",
|
||||
"51-200",
|
||||
"201-500",
|
||||
"500+"
|
||||
]
|
||||
},
|
||||
"website": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"logo": {
|
||||
"type": "string"
|
||||
},
|
||||
"revenue": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"$id": "contacts",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"email"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"company": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "companies",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"$id": "deals",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"title",
|
||||
"value",
|
||||
"stage"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"value": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"stage": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"lead",
|
||||
"qualified",
|
||||
"proposal",
|
||||
"negotiation",
|
||||
"won",
|
||||
"lost"
|
||||
]
|
||||
},
|
||||
"probability": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"closeDate": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"contact": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "contacts",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"company": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "companies",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"$id": "tags",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"color": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue