Model proposals


Permissions

User GroupCreate?Read?Update?Delete?
adminxxx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?
__vNumber
_deletedBooleanfalsex
_idObjectIDfunction defaultId() { return new oid(); }
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
convertedBooleanfalse
createdAtDate
filenameString
lead_idObjectIDLeadx
line_itemsArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
location_idObjectIDLocationx
nameStringx
opportunity_idObjectIDOpportunityx
proposal_dateDatex
proposal_numberNumberx
proposal_stateStringx
proposal_typeStringx
referenceString
track_idObjectIDTrackx
updatedAtDate
valid_untilDate1734728461241x
valueNumber0

Raw definition

{
	"path": "__v",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"__v"
	],
	"options": {},
	"_index": null
}
{
	"path": "_deleted",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"_deleted"
	],
	"options": {
		"default": false,
		"index": true
	},
	"_index": true,
	"defaultValue": false
}
{
	"path": "_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [
		null
	],
	"_presplitPath": [
		"_id"
	],
	"options": {
		"auto": true,
		"type": "ObjectId"
	},
	"_index": null
}
{
	"path": "_owner_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"_owner_id"
	],
	"options": {
		"link": "User",
		"map_to": "_owner",
		"index": true
	},
	"_index": true
}
{
	"path": "_updated_by_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"_updated_by_id"
	],
	"options": {
		"link": "User",
		"map_to": "_updated_by",
		"index": true
	},
	"_index": true
}
{
	"path": "converted",
	"instance": "Boolean",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"converted"
	],
	"options": {
		"default": false
	},
	"_index": null,
	"defaultValue": false
}
{
	"path": "createdAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [
		null,
		null
	],
	"_presplitPath": [
		"createdAt"
	],
	"options": {
		"immutable": true
	},
	"_index": null,
	"$immutable": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "filename",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"filename"
	],
	"options": {},
	"_index": null
}
{
	"path": "lead_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"lead_id"
	],
	"options": {
		"link": "Lead",
		"index": true
	},
	"_index": true
}
{
	"schemaOptions": {
		"timestamps": true,
		"toJSON": {
			"virtuals": true
		},
		"toObject": {
			"virtuals": true
		},
		"perms": {
			"admin": "cru"
		},
		"typeKey": "type",
		"id": true,
		"_id": true,
		"validateBeforeSave": true,
		"read": null,
		"shardKey": null,
		"discriminatorKey": "__t",
		"autoIndex": null,
		"minimize": true,
		"optimisticConcurrency": false,
		"versionKey": "__v",
		"capped": false,
		"bufferCommands": true,
		"strictQuery": true,
		"strict": true,
		"_perms": {
			"admin": "cru",
			"owner": "",
			"user": "",
			"all": ""
		},
		"pluralization": true
	},
	"caster": {
		"path": "line_items",
		"instance": "Mixed",
		"validators": [],
		"getters": [],
		"setters": [],
		"_presplitPath": [
			"line_items"
		],
		"options": {},
		"_index": null,
		"_arrayPath": "line_items.$",
		"_arrayParentPath": "line_items"
	},
	"$embeddedSchemaType": {
		"path": "line_items",
		"instance": "Mixed",
		"validators": [],
		"getters": [],
		"setters": [],
		"_presplitPath": [
			"line_items"
		],
		"options": {},
		"_index": null,
		"_arrayPath": "line_items.$",
		"_arrayParentPath": "line_items"
	},
	"$isMongooseArray": true,
	"path": "line_items",
	"instance": "Array",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"line_items"
	],
	"options": {
		"type": []
	},
	"_index": null
}
{
	"path": "location_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"location_id"
	],
	"options": {
		"link": "Location",
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "name",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"name"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"path": "opportunity_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"opportunity_id"
	],
	"options": {
		"link": "Opportunity",
		"index": true
	},
	"_index": true
}
{
	"path": "proposal_date",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"proposal_date"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"path": "proposal_number",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"proposal_number"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"enumValues": [
		"draft",
		"sent",
		"accepted",
		"declined"
	],
	"regExp": null,
	"path": "proposal_state",
	"instance": "String",
	"validators": [
		{
			"message": "`{VALUE}` is not a valid enum value for path `{PATH}`.",
			"type": "enum",
			"enumValues": [
				"draft",
				"sent",
				"accepted",
				"declined"
			]
		}
	],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"proposal_state"
	],
	"options": {
		"index": true,
		"enum": [
			"draft",
			"sent",
			"accepted",
			"declined"
		]
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "proposal_type",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"proposal_type"
	],
	"options": {
		"index": true
	},
	"_index": true
}
{
	"enumValues": [],
	"regExp": null,
	"path": "reference",
	"instance": "String",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"reference"
	],
	"options": {},
	"_index": null
}
{
	"path": "track_id",
	"instance": "ObjectID",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"track_id"
	],
	"options": {
		"link": "Track",
		"index": true
	},
	"_index": true
}
{
	"path": "updatedAt",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"updatedAt"
	],
	"options": {},
	"_index": null
}
{
	"path": "valid_until",
	"instance": "Date",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"valid_until"
	],
	"options": {
		"index": true,
		"default": 1734728461241
	},
	"_index": true,
	"defaultValue": 1734728461241
}
{
	"path": "value",
	"instance": "Number",
	"validators": [],
	"getters": [],
	"setters": [],
	"_presplitPath": [
		"value"
	],
	"options": {
		"default": 0
	},
	"_index": null,
	"defaultValue": 0
}