@Entity(tableName = "disc_card")
public class CardEntity {
@PrimaryKey(autoGenerate = true)
private int id;
private int companyId;
private String title;
private String color;
private String textColor;
@ColumnInfo(name = "path_image")
private String image;
private float discount;
private String barcode;
private String format;
@ColumnInfo(name = "path_front_image")
private String frontImage;
@ColumnInfo(name = "path_back_image")
private String backImage;
private String comm;
private Boolean favorite;
@ColumnInfo(name = "record_type")
private int recordType;
}
@Entity(tableName = "disc_category")
public class CategoryEntity implements Serializable {
@PrimaryKey(autoGenerate = true)
private int id;
private String title;
private String description;
@ColumnInfo(name = "icon_cat_id")
private int iconCatId;
@ColumnInfo(name = "record_type")
private int recordType;
}
@Entity(tableName = "disc_card_category",
primaryKeys = { "cardId", "categoryId" },
foreignKeys = {
@ForeignKey(entity = CardEntity.class,
parentColumns = "id",
childColumns = "cards_id"),
@ForeignKey(entity = CategoryEntity.class,
parentColumns = "id",
childColumns = "category_id")
})
public class CardCategoryEntity {
@ColumnInfo(name = "cards_id")
private long cardId;
@ColumnInfo(name = "category_id")
private long catId;
@ColumnInfo(name = "record_type")
private int recordType;
}
$pb = getPage($baseUrl);
$scr = pq('script:contains("var xsrftoken =")');
$xsrftoken = preg_replace("var\s+xsrftoken\s*=\s*'([^']+)", "$1", $scr);