Model specialoffers
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
manager | x | x | x | x |
line_manager | x | x | x | x |
finance | x | x | x | x |
admin | | x | | |
all | | x | | |
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 | |
body | String | | | | | |
createdAt | Date | | | | | |
date | Date | | | function now() { [native code] } | x | |
description | String | | | | | |
end_date | Date | | | function now() { [native code] } | x | |
img | String | | | | | |
link | String | | | | | |
location_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
name | String | | | | x | x |
partner | String | | | | | |
partner_code | String | | | | | |
start_date | Date | | | function now() { [native code] } | x | |
updatedAt | Date | | | | | |
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
}
{
"enumValues": [],
"regExp": null,
"path": "body",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"body"
],
"options": {},
"_index": null
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true
}
{
"path": "date",
"instance": "Date",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"date"
],
"options": {
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true
}
{
"enumValues": [],
"regExp": null,
"path": "description",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"description"
],
"options": {},
"_index": null
}
{
"path": "end_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"end_date"
],
"options": {
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "img",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"img"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "link",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"link"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"manager": "crud",
"line_manager": "crud",
"finance": "crud",
"admin": "r",
"all": "r"
},
"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": "r",
"owner": "",
"user": "",
"all": "r",
"manager": "crud",
"line_manager": "crud",
"finance": "crud"
},
"pluralization": true
},
"caster": {
"path": "location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location"
},
"_index": null,
"_arrayPath": "location_id.$",
"_arrayParentPath": "location_id"
},
"$embeddedSchemaType": {
"path": "location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location"
},
"_index": null,
"_arrayPath": "location_id.$",
"_arrayParentPath": "location_id"
},
"$isMongooseArray": true,
"path": "location_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"type": [
{
"link": "Location"
}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "name",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"name"
],
"options": {
"unique": true,
"index": true
},
"_index": {
"unique": true,
"background": true
}
}
{
"enumValues": [],
"regExp": null,
"path": "partner",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"partner"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "partner_code",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"partner_code"
],
"options": {},
"_index": null
}
{
"path": "start_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"start_date"
],
"options": {
"index": true
},
"_index": true
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null
}