<?php

namespace app\model;

use think\Model;

class BpsAdLandingUrl extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'bps.bps_ads_landing_url';

    // 设置主键
//    protected $pk = 'creative_id';

    // 设置自动时间戳
    protected $autoWriteTimestamp = true;

    // 定义时间戳字段
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

    // 设置字段类型和默认值
    protected $casts = [
        'platform_type' => 'int',
        'account_id' => 'string',
        'ad_id' => 'string',
        'landing_url' => 'string',
        'landing_access' => 'string',
        'create_at' => 'timestamp',
        'update_at' => 'timestamp',
    ];

    // 默认值设置
    protected $defaults = [
        'landing_access' => '',
        'landing_url' => '',
    ];

}