Example #1
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('email_stats_devices')->setCustomRepositoryClass('Mautic\\EmailBundle\\Entity\\StatDeviceRepository')->addIndex(['date_opened'], 'date_opened_search');
     $builder->addId();
     $builder->createManyToOne('device', 'Mautic\\LeadBundle\\Entity\\LeadDevice')->addJoinColumn('device_id', 'id', true, false, 'CASCADE')->build();
     $builder->createManyToOne('stat', 'Stat')->addJoinColumn('stat_id', 'id', true, false, 'CASCADE')->build();
     $builder->addIpAddress(true);
     $builder->createField('dateOpened', 'datetime')->columnName('date_opened')->build();
 }
Example #2
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('dynamic_content_lead_data');
     $builder->addIdColumns(false, false);
     $builder->addDateAdded(true);
     $builder->createManyToOne('lead', 'Mautic\\LeadBundle\\Entity\\Lead')->inversedBy('id')->addJoinColumn('lead_id', 'id')->build();
     $builder->createManyToOne('dynamicContent', 'DynamicContent')->inversedBy('id')->addJoinColumn('dynamic_content_id', 'id')->build();
     $builder->createField('slot', 'text')->columnName('slot')->build();
 }
Example #3
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('oauth1_access_tokens')->addIndex(['token'], 'oauth1_access_token_search');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('consumer', 'Consumer')->inversedBy('accessTokens')->addJoinColumn('consumer_id', 'id', false, false, 'CASCADE')->build();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', false, false, 'CASCADE')->build();
     $builder->addField('token', 'string');
     $builder->addField('secret', 'string');
     $builder->createField('expiresAt', 'bigint')->columnName('expires_at')->nullable()->build();
 }
Example #4
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('oauth2_refreshtokens')->addIndex(array('token'), 'oauth2_refresh_token_search');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('client', 'Client')->addJoinColumn('client_id', 'id', false, false, 'CASCADE')->build();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', false, false, 'CASCADE')->build();
     $builder->createField('token', 'string')->unique()->build();
     $builder->createField('expiresAt', 'bigint')->columnName('expires_at')->nullable()->build();
     $builder->createField('scope', 'string')->nullable()->build();
 }
Example #5
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('form_submissions')->setCustomRepositoryClass('Mautic\\FormBundle\\Entity\\SubmissionRepository')->addIndex(['tracking_id'], 'form_submission_tracking_search')->addIndex(['date_submitted'], 'form_date_submitted');
     $builder->addId();
     $builder->createManyToOne('form', 'Form')->inversedBy('submissions')->addJoinColumn('form_id', 'id', false, false, 'CASCADE')->build();
     $builder->addIpAddress();
     $builder->addLead(true, 'SET NULL');
     $builder->createField('trackingId', 'string')->columnName('tracking_id')->nullable()->build();
     $builder->createField('dateSubmitted', 'datetime')->columnName('date_submitted')->build();
     $builder->addField('referer', 'text');
     $builder->createManyToOne('page', 'Mautic\\PageBundle\\Entity\\Page')->addJoinColumn('page_id', 'id', true, false, 'SET NULL')->fetchExtraLazy()->build();
 }
Example #6
0
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('opportunities')->setCustomRepositoryClass('MauticPlugin\\CustomCrmBundle\\Entity\\OpportunityRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createField('status', 'string')->length(32)->build();
     $builder->createField('confidence', 'integer')->nullable()->build();
     $builder->createField('value', 'integer')->nullable()->build();
     $builder->createField('valueType', 'string')->length(32)->columnName('value_type')->nullable()->build();
     $builder->createField('estimatedClose', 'date')->columnName('estimated_close')->nullable()->build();
     $builder->createField('comments', 'text')->nullable()->build();
     $builder->createManyToOne('lead', 'Mautic\\LeadBundle\\Entity\\Lead')->addJoinColumn('lead_id', 'id', false, false)->cascadePersist()->build();
     $builder->createManyToOne('ownerUser', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('owner_user_id', 'id', true, false)->build();
 }
Example #7
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('webhook_queue')->setCustomRepositoryClass('Mautic\\WebhookBundle\\Entity\\WebhookQueueRepository');
     $builder->addId();
     // M:1 for webhook
     $builder->createManyToOne('webhook', 'Webhook')->inversedBy('queues')->addJoinColumn('webhook_id', 'id', false, false, 'CASCADE')->build();
     // date added
     $builder->createField('dateAdded', 'datetime')->columnName('date_added')->nullable()->build();
     // payload
     $builder->createField('payload', 'text')->columnName('payload')->build();
     // M:1 for event
     $builder->createManyToOne('event', 'Event')->inversedBy('queues')->addJoinColumn('event_id', 'id', false, false, 'CASCADE')->build();
 }
Example #8
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('sms_message_stats')->setCustomRepositoryClass('Mautic\\SmsBundle\\Entity\\StatRepository')->addIndex(['sms_id', 'lead_id'], 'stat_sms_search')->addIndex(['tracking_hash'], 'stat_sms_hash_search')->addIndex(['source', 'source_id'], 'stat_sms_source_search');
     $builder->addId();
     $builder->createManyToOne('sms', 'Sms')->inversedBy('stats')->addJoinColumn('sms_id', 'id', true, false, 'SET NULL')->build();
     $builder->addLead(true, 'SET NULL');
     $builder->createManyToOne('list', 'Mautic\\LeadBundle\\Entity\\LeadList')->addJoinColumn('list_id', 'id', true, false, 'SET NULL')->build();
     $builder->addIpAddress(true);
     $builder->createField('dateSent', 'datetime')->columnName('date_sent')->build();
     $builder->createField('trackingHash', 'string')->columnName('tracking_hash')->nullable()->build();
     $builder->createField('source', 'string')->nullable()->build();
     $builder->createField('sourceId', 'integer')->columnName('source_id')->nullable()->build();
     $builder->createField('tokens', 'array')->nullable()->build();
 }
Example #9
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('campaign_lead_event_log')->setCustomRepositoryClass('Mautic\\CampaignBundle\\Entity\\LeadEventLogRepository')->addIndex(array('is_scheduled'), 'event_upcoming_search');
     $builder->createManyToOne('event', 'Event')->isPrimaryKey()->inversedBy('log')->addJoinColumn('event_id', 'id', false, false, 'CASCADE')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->createManyToOne('campaign', 'Campaign')->addJoinColumn('campaign_id', 'id')->build();
     $builder->addIpAddress(true);
     $builder->createField('dateTriggered', 'datetime')->columnName('date_triggered')->nullable()->build();
     $builder->createField('isScheduled', 'boolean')->columnName('is_scheduled')->build();
     $builder->createField('triggerDate', 'datetime')->columnName('trigger_date')->nullable()->build();
     $builder->createField('systemTriggered', 'boolean')->columnName('system_triggered')->build();
     $builder->createField('metadata', 'array')->nullable()->build();
     $builder->addNullableField('nonActionPathTaken', 'boolean', 'non_action_path_taken');
 }
Example #10
0
 /**
  * @param ClassMetadata $builder
  * @param               $entityClass
  */
 protected static function addVariantMetadata(ClassMetadataBuilder $builder, $entityClass)
 {
     $builder->createManyToOne('variantParent', $entityClass)->inversedBy('variantChildren')->addJoinColumn('variant_parent_id', 'id', true, false, 'CASCADE')->build();
     $builder->createOneToMany('variantChildren', $entityClass)->setIndexBy('id')->setOrderBy(['isPublished' => 'DESC'])->mappedBy('variantParent')->build();
     $builder->createField('variantSettings', 'array')->columnName('variant_settings')->nullable()->build();
     $builder->createField('variantStartDate', 'datetime')->columnName('variant_start_date')->nullable()->build();
 }
Example #11
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('asset_downloads')->setCustomRepositoryClass('Mautic\\AssetBundle\\Entity\\DownloadRepository')->addIndex(['tracking_id'], 'download_tracking_search')->addIndex(['source', 'source_id'], 'download_source_search')->addIndex(['date_download'], 'asset_date_download');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createField('dateDownload', 'datetime')->columnName('date_download')->build();
     $builder->createManyToOne('asset', 'Asset')->addJoinColumn('asset_id', 'id', true, false, 'CASCADE')->build();
     $builder->addIpAddress();
     $builder->addLead(true, 'SET NULL');
     $builder->addField('code', 'integer');
     $builder->createField('referer', 'string')->nullable()->build();
     $builder->createField('trackingId', 'string')->columnName('tracking_id')->build();
     $builder->createField('source', 'string')->nullable()->build();
     $builder->createField('sourceId', 'integer')->columnName('source_id')->nullable()->build();
     $builder->createManyToOne('email', 'Mautic\\EmailBundle\\Entity\\Email')->addJoinColumn('email_id', 'id', true, false, 'SET NULL')->build();
 }
Example #12
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('companies')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\CompanyRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('owner', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('owner_id', 'id', true, false, 'SET NULL')->build();
 }
Example #13
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('push_ids')->setCustomRepositoryClass('Mautic\\NotificationBundle\\Entity\\PushIDRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createField('pushID', 'string')->columnName('push_id')->nullable(false)->build();
     $builder->createManyToOne('lead', 'Mautic\\LeadBundle\\Entity\\Lead')->addJoinColumn('lead_id', 'id', true, false, 'SET NULL')->inversedBy('pushIds')->build();
 }
Example #14
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('monitoring_leads')->setCustomRepositoryClass('MauticPlugin\\MauticSocialBundle\\Entity\\LeadRepository');
     $builder->createManyToOne('monitor', 'Monitoring')->isPrimaryKey()->addJoinColumn('monitor_id', 'id', false, false, 'CASCADE')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->addNamedField('dateAdded', 'datetime', 'date_added');
 }
Example #15
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('point_lead_action_log')->setCustomRepositoryClass('Mautic\\PointBundle\\Entity\\LeadPointLogRepository');
     $builder->createManyToOne('point', 'Point')->isPrimaryKey()->addJoinColumn('point_id', 'id', true, false, 'CASCADE')->inversedBy('log')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->addIpAddress(true);
     $builder->createField('dateFired', 'datetime')->columnName('date_fired')->build();
 }
Example #16
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('monitor_post_count')->setCustomRepositoryClass('MauticPlugin\\MauticSocialBundle\\Entity\\PostCountRepository');
     $builder->addId();
     $builder->createManyToOne('monitor', 'Monitoring')->addJoinColumn('monitor_id', 'id', true, false, 'CASCADE')->build();
     $builder->addNamedField('postDate', 'date', 'post_date');
     $builder->addNamedField('postCount', 'integer', 'post_count');
 }
Example #17
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('focus_stats')->setCustomRepositoryClass('MauticPlugin\\MauticFocusBundle\\Entity\\StatRepository')->addIndex(['type'], 'focus_type')->addIndex(['type', 'type_id'], 'focus_type_id')->addIndex(['date_added'], 'focus_date_added');
     $builder->addId();
     $builder->createManyToOne('focus', 'Focus')->addJoinColumn('focus_id', 'id', false, false, 'CASCADE')->build();
     $builder->addField('type', 'string');
     $builder->addNamedField('typeId', 'integer', 'type_id', true);
     $builder->addNamedField('dateAdded', 'datetime', 'date_added');
 }
Example #18
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('form_actions')->setCustomRepositoryClass('Mautic\\FormBundle\\Entity\\ActionRepository')->addIndex(array('type'), 'form_action_type_search');
     $builder->addIdColumns();
     $builder->createField('type', 'string')->length(50)->build();
     $builder->createField('order', 'integer')->columnName('action_order')->build();
     $builder->addField('properties', 'array');
     $builder->createManyToOne('form', 'Form')->inversedBy('actions')->addJoinColumn('form_id', 'id', false, false, 'CASCADE')->build();
 }
Example #19
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('companies_leads')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\CompanyLeadRepository');
     $builder->createManyToOne('company', 'Company')->isPrimaryKey()->inversedBy('leads')->addJoinColumn('company_id', 'id', false, false, 'CASCADE')->build();
     $builder->addLead(false, 'CASCADE', true);
     $builder->addDateAdded();
     $builder->createField('manuallyRemoved', 'boolean')->columnName('manually_removed')->build();
     $builder->createField('manuallyAdded', 'boolean')->columnName('manually_added')->build();
 }
Example #20
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('channel_url_trackables')->setCustomRepositoryClass('Mautic\\PageBundle\\Entity\\TrackableRepository')->addIndex(['channel', 'channel_id'], 'channel_url_trackable_search');
     $builder->createManyToOne('redirect', 'Mautic\\PageBundle\\Entity\\Redirect')->addJoinColumn('redirect_id', 'id', true, false, 'CASCADE')->cascadePersist()->inversedBy('trackables')->isPrimaryKey()->build();
     $builder->createField('channelId', 'integer')->columnName('channel_id')->isPrimaryKey()->build();
     $builder->addField('channel', 'string');
     $builder->addField('hits', 'integer');
     $builder->addNamedField('uniqueHits', 'integer', 'unique_hits');
 }
Example #21
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('permissions')->setCustomRepositoryClass('Mautic\\UserBundle\\Entity\\PermissionRepository')->addUniqueConstraint(['bundle', 'name', 'role_id'], 'unique_perm');
     $builder->addId();
     $builder->createField('bundle', 'string')->length(50)->build();
     $builder->createField('name', 'string')->length(50)->build();
     $builder->createManyToOne('role', 'Role')->inversedBy('permissions')->addJoinColumn('role_id', 'id', false, false, 'CASCADE')->build();
     $builder->addField('bitwise', 'integer');
 }
Example #22
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('point_trigger_events')->setCustomRepositoryClass('Mautic\\PointBundle\\Entity\\TriggerEventRepository')->addIndex(['type'], 'trigger_type_search');
     $builder->addIdColumns();
     $builder->createField('type', 'string')->length(50)->build();
     $builder->createField('order', 'integer')->columnName('action_order')->build();
     $builder->addField('properties', 'array');
     $builder->createManyToOne('trigger', 'Trigger')->inversedBy('events')->addJoinColumn('trigger_id', 'id', false, false, 'CASCADE')->build();
     $builder->createOneToMany('log', 'LeadTriggerLog')->mappedBy('event')->cascadePersist()->cascadeRemove()->fetchExtraLazy()->build();
 }
Example #23
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('page_redirects')->setCustomRepositoryClass('Mautic\\PageBundle\\Entity\\RedirectRepository');
     $builder->addId();
     $builder->createField('redirectId', 'string')->columnName('redirect_id')->length(25)->build();
     $builder->addField('url', 'text');
     $builder->addField('hits', 'integer');
     $builder->createField('uniqueHits', 'integer')->columnName('unique_hits')->build();
     $builder->createManyToOne('email', 'Mautic\\EmailBundle\\Entity\\Email')->addJoinColumn('email_id', 'id', true, false, 'SET NULL')->build();
 }
Example #24
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('lead_stages_change_log')->setCustomRepositoryClass('Mautic\\LeadBundle\\Entity\\StagesChangeLogRepository');
     $builder->addId();
     $builder->addLead(false, 'CASCADE', false, 'stageChangeLog');
     $builder->createField('eventName', 'string')->columnName('event_name')->build();
     $builder->createField('actionName', 'string')->columnName('action_name')->build();
     $builder->createManyToOne('stage', 'Mautic\\StageBundle\\Entity\\Stage')->inversedBy('stageChangeLog')->addJoinColumn('stage_id', 'id', true, false, 'CASCADE')->build();
     $builder->addDateAdded();
 }
Example #25
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('plugin_integration_settings')->setCustomRepositoryClass('Mautic\\PluginBundle\\Entity\\IntegrationRepository');
     $builder->createField('id', 'integer')->isPrimaryKey()->generatedValue()->build();
     $builder->createManyToOne('plugin', 'Plugin')->inversedBy('integrations')->addJoinColumn('plugin_id', 'id', true, false, 'CASCADE')->build();
     $builder->addField('name', 'string');
     $builder->createField('isPublished', 'boolean')->columnName('is_published')->build();
     $builder->createField('supportedFeatures', 'array')->columnName('supported_features')->nullable()->build();
     $builder->createField('apiKeys', 'array')->columnName('api_keys')->build();
     $builder->createField('featureSettings', 'array')->columnName('feature_settings')->nullable()->build();
 }
Example #26
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('webhook_logs')->setCustomRepositoryClass('Mautic\\WebhookBundle\\Entity\\LogRepository');
     // id columns
     $builder->addId();
     // M:1 for webhook
     $builder->createManyToOne('webhook', 'Webhook')->inversedBy('logs')->addJoinColumn('webhook_id', 'id', false, false, 'CASCADE')->build();
     // status code
     $builder->createField('statusCode', 'string')->columnName('status_code')->length(50)->build();
     // date added
     $builder->createField('dateAdded', 'datetime')->columnName('date_added')->nullable()->build();
 }
Example #27
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('webhook_events')->setCustomRepositoryClass('Mautic\\WebhookBundle\\Entity\\EventRepository');
     // id columns
     $builder->addId();
     // M:1 for webhook
     $builder->createManyToOne('webhook', 'Webhook')->inversedBy('events')->addJoinColumn('webhook_id', 'id', false, false, 'CASCADE')->build();
     // 1:M for queues
     $builder->createOneToMany('queues', 'WebhookQueue')->mappedBy('event')->build();
     // event type field
     $builder->createField('event_type', 'string')->columnName('event_type')->length(50)->build();
 }
Example #28
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('notifications')->setCustomRepositoryClass('Mautic\\CoreBundle\\Entity\\NotificationRepository')->addIndex(['is_read'], 'notification_read_status')->addIndex(['type'], 'notification_type')->addIndex(['is_read', 'user_id'], 'notification_user_read_status');
     $builder->addId();
     $builder->createManyToOne('user', 'Mautic\\UserBundle\\Entity\\User')->addJoinColumn('user_id', 'id', false, false, 'CASCADE')->build();
     $builder->createField('type', 'string')->nullable()->length(25)->build();
     $builder->createField('header', 'string')->nullable()->build();
     $builder->addField('message', 'text');
     $builder->addDateAdded();
     $builder->createField('iconClass', 'string')->columnName('icon_class')->nullable()->build();
     $builder->createField('isRead', 'boolean')->columnName('is_read')->build();
 }
Example #29
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('email_donotemail')->setCustomRepositoryClass('Mautic\\CoreBundle\\Entity\\NotificationRepository')->addIndex(array('address'), 'dnc_search');
     $builder->addId();
     $builder->createManyToOne('email', 'Email')->addJoinColumn('email_id', 'id', true, false, 'SET NULL')->build();
     $builder->createField('emailAddress', 'string')->columnName('address')->build();
     $builder->addLead(true, 'CASCADE', false, 'doNotEmail');
     $builder->addDateAdded();
     $builder->addField('unsubscribed', 'boolean');
     $builder->addField('bounced', 'boolean');
     $builder->addNullableField('manual', 'boolean');
     $builder->createField('comments', 'text')->nullable()->build();
 }
Example #30
0
 /**
  * @param ORM\ClassMetadata $metadata
  */
 public static function loadMetadata(ORM\ClassMetadata $metadata)
 {
     $builder = new ClassMetadataBuilder($metadata);
     $builder->setTable('dynamic_content_stats')->setCustomRepositoryClass('Mautic\\DynamicContentBundle\\Entity\\StatRepository')->addIndex(['dynamic_content_id', 'lead_id'], 'stat_dynamic_content_search')->addIndex(['source', 'source_id'], 'stat_dynamic_content_source_search');
     $builder->addId();
     $builder->createManyToOne('dynamicContent', 'DynamicContent')->inversedBy('stats')->addJoinColumn('dynamic_content_id', 'id', true, false, 'SET NULL')->build();
     $builder->addLead(true, 'SET NULL');
     $builder->createField('dateSent', 'datetime')->columnName('date_sent')->build();
     $builder->createField('source', 'string')->nullable()->build();
     $builder->createField('sourceId', 'integer')->columnName('source_id')->nullable()->build();
     $builder->createField('tokens', 'array')->nullable()->build();
     $builder->addNullableField('sentCount', 'integer', 'sent_count');
     $builder->addNullableField('lastSent', 'datetime', 'last_sent');
     $builder->addNullableField('sentDetails', 'array', 'sent_details');
 }