UserConsents.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * User content model. |
| 4 | * |
| 5 | * @package Tutor\GDPR\Models |
| 6 | * @author Themeum <support@themeum.com> |
| 7 | * @link https://themeum.com |
| 8 | * @since 4.0.0 |
| 9 | */ |
| 10 | |
| 11 | namespace Tutor\GDPR\Models; |
| 12 | |
| 13 | use Tutor\GDPR\DB\UserConsents as Table; |
| 14 | use TUTOR\Input; |
| 15 | use Tutor\Models\BaseModel; |
| 16 | |
| 17 | defined( 'ABSPATH' ) || exit; |
| 18 | |
| 19 | /** |
| 20 | * User content model class. |
| 21 | * |
| 22 | * @since 4.0.0 |
| 23 | */ |
| 24 | class UserConsents extends BaseModel { |
| 25 | |
| 26 | /** |
| 27 | * Table name without prefix. |
| 28 | * |
| 29 | * @since 4.0.0 |
| 30 | * |
| 31 | * @var string |
| 32 | */ |
| 33 | protected $table_name = 'tutor_user_contents'; |
| 34 | |
| 35 | /** |
| 36 | * Fillable fields for create/update. |
| 37 | * |
| 38 | * @since 4.0.0 |
| 39 | * |
| 40 | * @var array |
| 41 | */ |
| 42 | protected $fillable = array( |
| 43 | 'user_id', |
| 44 | 'user_email', |
| 45 | 'consent_title', |
| 46 | 'label_snapshot', |
| 47 | 'label_snapshot_plain_text', |
| 48 | 'links_snapshot', |
| 49 | 'consent_method', |
| 50 | 'version', |
| 51 | 'ip_address', |
| 52 | 'user_agent', |
| 53 | 'source', |
| 54 | 'created_at_gmt', |
| 55 | ); |
| 56 | |
| 57 | /** |
| 58 | * Constructor. |
| 59 | * |
| 60 | * @since 4.0.0 |
| 61 | */ |
| 62 | public function __construct() { |
| 63 | $this->table_name = Table::get_table_name(); |
| 64 | parent::__construct(); |
| 65 | } |
| 66 | } |
| 67 |