Model xerocreditnotes
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
admin | x | x | x | x |
owner | x | x | x | x |
user | | | | |
all | | | | |
Fields
Name | Type | Link | Maps To | Default | Indexed? | Unique? |
---|
__v | Number | | | | | |
_deleted | Boolean | | | false | x | |
_id | ObjectID | | | function defaultId() {
return new oid();
} | | |
_owner_id | ObjectID | User | _owner | | x | |
_updated_by_id | ObjectID | User | _updated_by | | x | |
allocations | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
contact | Mixed | | | | | |
createdAt | Date | | | | | |
credit_note_id | String | | | | | |
credit_note_number | String | | | | | |
currency_code | String | | | | | |
currency_rate | Number | | | | | |
date | Date | | | | x | |
fully_paid_on_date | Date | | | | | |
line_amount_types | String | | | | | |
location_id | ObjectID | Location | | | x | |
organisation_id | ObjectID | Organisation | | | x | |
remaining_credit | Number | | | | | |
status | String | | | | | |
sub_total | Number | | | | | |
total | Number | | | | | |
total_tax | Number | | | | | |
type | String | | | | | |
updatedAt | Date | | | | | |
updated_date_utc | Date | | | | | |
xero_tenant_id | String | | | | | |
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
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "crud",
"user": "",
"all": ""
},
"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": "crud",
"owner": "crud",
"user": "",
"all": ""
},
"pluralization": true
},
"caster": {
"path": "allocations",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"allocations"
],
"options": {},
"_index": null,
"_arrayPath": "allocations.$",
"_arrayParentPath": "allocations"
},
"$embeddedSchemaType": {
"path": "allocations",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"allocations"
],
"options": {},
"_index": null,
"_arrayPath": "allocations.$",
"_arrayParentPath": "allocations"
},
"$isMongooseArray": true,
"path": "allocations",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"allocations"
],
"options": {
"type": [
null
]
},
"_index": null
}
{
"path": "contact",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"contact"
],
"options": {},
"_index": null
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true
}
{
"enumValues": [],
"regExp": null,
"path": "credit_note_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"credit_note_id"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "credit_note_number",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"credit_note_number"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "currency_code",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"currency_code"
],
"options": {},
"_index": null
}
{
"path": "currency_rate",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"currency_rate"
],
"options": {},
"_index": null
}
{
"path": "date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date"
],
"options": {
"index": true
},
"_index": true
}
{
"path": "fully_paid_on_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fully_paid_on_date"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "line_amount_types",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"line_amount_types"
],
"options": {},
"_index": null
}
{
"path": "location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location",
"index": true
},
"_index": true
}
{
"path": "organisation_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"link": "Organisation",
"index": true
},
"_index": true
}
{
"path": "remaining_credit",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"remaining_credit"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "status",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"status"
],
"options": {},
"_index": null
}
{
"path": "sub_total",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"sub_total"
],
"options": {},
"_index": null
}
{
"path": "total",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"total"
],
"options": {},
"_index": null
}
{
"path": "total_tax",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"total_tax"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "type",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"type"
],
"options": {},
"_index": null
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null
}
{
"path": "updated_date_utc",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updated_date_utc"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "xero_tenant_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_tenant_id"
],
"options": {},
"_index": null
}