<commit_before>package com.conveyal.analysis.models;

import com.conveyal.analysis.UserPermissions;
import org.bson.types.ObjectId;

public class BaseModel {
    // Can retrieve `createdAt` from here
    public ObjectId _id = new ObjectId();

    // For version management. ObjectId's contain a timestamp, so can retrieve `updatedAt` from here.
    public ObjectId nonce = new ObjectId();

    public String createdBy = null;
    public String updatedBy = null;

    // Who owns this?
    public String accessGroup = null;

    // Everything has a name
    public String name = null;

    // package private to encourage use of static factory methods
    BaseModel (UserPermissions user, String name) {
        this.createdBy = user.email;
        this.updatedBy = user.email;
        this.accessGroup = user.accessGroup;
        this.name = name;
    }


    BaseModel () {
        // No-arg
    }

}<commit_msg>refactor(db): make id of BaseModel final<commit_after>package com.conveyal.analysis.models;

import com.conveyal.analysis.UserPermissions;
import org.bson.types.ObjectId;

public class BaseModel {
    // Can retrieve `createdAt` from here
    public final ObjectId _id = new ObjectId();

    // For version management. ObjectId's contain a timestamp, so can retrieve `updatedAt` from here.
    public ObjectId nonce = new ObjectId();

    public String createdBy = null;
    public String updatedBy = null;

    // Who owns this?
    public String accessGroup = null;

    // Everything has a name
    public String name = null;

    // package private to encourage use of static factory methods
    BaseModel (UserPermissions user, String name) {
        this.createdBy = user.email;
        this.updatedBy = user.email;
        this.accessGroup = user.accessGroup;
        this.name = name;
    }

    /**
     * No-arg constructor required for Mongo POJO serialization
     */
    public BaseModel () {
        
    }
}
{'fraction_non_alphanumeric': 0.08527131782945736, 'fraction_numerical': 0.0, 'mean_word_length': 2.701720841300191, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7388927', 'n_tokens_mistral': 540, 'n_tokens_neox': 526, 'n_words': 181}